/*
Theme Name: Twenty Twenty-Four
Description: Twenty Twenty-Four is designed to be flexible, versatile and applicable to any website. Its collection of templates and patterns tailor to different needs, such as presenting a business, blogging and writing or showcasing work.
Version: 1.3
Author: the WordPress team
Author URI: https://wordpress.org/
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentyfour
Tags: accessibility-ready, blog, one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready
*/

/* ======================
   Hero slider - custom CSS
   ====================== */
.hero-fit {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-1 * ((100vw - 100%) / 2)) !important;
    margin-right: calc(-1 * ((100vw - 100%) / 2)) !important;
    aspect-ratio: 2.5 / 1;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    position: relative;
    overflow: hidden;
    padding: 0 !important;
}

.hero-fit-inner {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 1rem 2rem;
    color: white;
    border-radius: 8px;
    text-align: left;
    max-width: 40ch;
    margin-left: 5vw;
    margin-right: auto;
    margin-top: auto;
    margin-bottom: 10vh;
    font-size: 1.25rem;
    line-height: 1.4;
    transition: transform 0.3s ease-out;
    will-change: transform;
    position: relative;
    z-index: 1;
}

@media (min-width: 1200px) {
    .hero-fit-inner {
        font-size: 1.75rem;
        padding: 2rem 3rem;
    }
}

@media (max-width: 768px) {
    .hero-fit-inner {
        font-size: 1rem;
        max-width: 90%;
        margin-left: 5vw;
        margin-bottom: 5vh;
    }
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide-active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.wp-block-group.hero-slide {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.hero-slider-wrapper {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-1 * ((100vw - 100%) / 2));
    margin-right: calc(-1 * ((100vw - 100%) / 2));
    aspect-ratio: 2.5 / 1;
    overflow: hidden;
}

@media (max-width: 480px) {
    .hero-fit {
        height: 75vh;
    }
}

/* ======================
   Wyłączenie margin-block-start
   ====================== */
.wp-block-group,
.wp-block-cover,
.wp-block-columns,
.wp-block-column {
    margin-block-start: 0 !important;
}

.no-margin-block-start {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}

.reset-block-margins {
    margin-block: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

/* ===================================
   DESKTOP MEGA MENU STYLES
   =================================== */

/* Header container */
.header_menu_custom {
    position: relative;
    z-index: 1001;
    background: #ffffff;
    padding: 0;
    transition: box-shadow 0.2s ease;
}

.header_menu_custom.mega-active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header_menu_custom.mega-active ~ * {
    filter: blur(3px);
    pointer-events: none;
    transition: filter 0.3s ease;
}

/* Nav wrapper */
.nav-wrapper {
    position: relative;
    width: 100%;
    border-bottom: 1px solid #d5dbdb;
}

.nav-wrapper::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    width: 100%;
    height: 1px;
    background-color: #d5dbdb;
    z-index: 1000;
}

/* Navigation grid */
.custom-nav {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1000;
    background: #ffffff;
    height: 76px;
}

/* Main list */
.nav-main-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

/* Logo */
.nav-logo-item {
    margin-right: 16px;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.nav-logo-link:hover {
    background-color: rgba(0,0,0,0.05);
}

.nav-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* Navigation links */
.custom-nav-item {
    position: relative;
}

.custom-nav-link {
    display: flex;
    align-items: center;
    height: 31px; 
    padding: 0 16px;
    color: #232f3e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
    transition: all 0.15s ease;
    border-radius: 8px;
    white-space: nowrap;
    position: relative;
    transform: translateY(1px);
}

.custom-nav-link:hover {
    background-color: #f7f7f7;
    color: #232f3e;
}

/* Active link states */
.custom-nav-item.active .custom-nav-link {
    background-color: transparent !important;
    color: #232f3e !important;
    border-radius: 8px 8px 0 0 !important;
    position: relative !important;
    z-index: 1003 !important;
}

.custom-nav-item.active .custom-nav-link::after {
    content: '';
    position: absolute;
    bottom: 1px; 
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ff9900;
    border-radius: 0;
    z-index: 1004;
}

.custom-nav-item.active .custom-nav-link:hover {
    background-color: #f7f7f7 !important;
}

/* Mega menu dropdown */
.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #d5dbdb;
    border-radius: 0 0 24px 24px;
    padding: 0;
    margin-top: -1px !important;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    display: none;
    max-height: 0;
    overflow: hidden;
}

.mega-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
    max-height: 600px;
}

.mega-dropdown::before,
.mega-dropdown::after {
    display: none;
}

/* Layout grid */
.mega-grid {
    display: grid;
    grid-template-columns: 1fr 250px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0;
    padding: 0;
}

/* Content wrapper */
.mega-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 24px 0 24px 0px;
}

/* Main header */
.mega-main-header {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    color: #7f7f7f;
    margin: 0px 0px 16px 23px;
    letter-spacing: 0.5px;
    transform: translate(-5px, 15px);
    padding-left: 8px;
}

/* Main content */
.mega-content {
    display: flex;
    gap: 0px;
    width: 100%;
    margin-right: 24px;
}

/* Columns */
.mega-column {
    flex: 1;
    min-width: 0;
}

.mega-column:last-child {
    padding-right: 0;
}

.mega-column-header {
    display: none;
}

/* Cards */
.mega-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mega-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 19px 25px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
    min-height: 60px;
}

.mega-card::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    bottom: -4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    transition: all 0.15s ease;
    z-index: -1;
}

.mega-card:hover::before {
    background: #f2f2f6;
    transform: translateY(-1px);
}

.mega-card-title {
    font-size: 16px;
    font-weight: 400;
    color: #232f3e;
    margin-bottom: 4px;
    line-height: 1.4;
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
}

.mega-card-desc {
    font-size: 14px;
    color: #687078;
    line-height: 1.4;
    margin: 4px 0 0 0;
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
}

.mega-card-arrow {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.2s ease;
    width: 16px;
    height: 16px;
    fill: #687078;
}

.mega-card:hover .mega-card-arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

/* Categories */
.mega-categories {
    background: transparent;
    border-left: 1px solid #d5dbdb;
    padding: 0 0 8px 0px;
    margin-left: 48px;
    margin-top: 0;
    width: 300px;
    flex-shrink: 0;
    position: relative;
}

.mega-categories::before {
    display: none;
}

.mega-category-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-left: 46px;
    margin-top: 21px;
    margin-bottom: 33px;
}

.mega-category-item {
    display: block;
    align-items: center;
    padding: 15px 21px;
    color: #232f3e;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
    position: relative;
    background: transparent;
}

.mega-category-item::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    bottom: -4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    transition: all 0.15s ease;
    z-index: -1;
}

.mega-category-item:hover::before {
    background: #f2f2f6;
    transform: translateY(-1px);
}

.mega-category-item::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.2s ease;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M1 7.00001H11.91L8.32 3.74001L9.67 2.26001L15.17 7.26001C15.38 7.45001 15.5 7.72001 15.5 8.00001C15.5 8.28001 15.38 8.55001 15.17 8.74001L9.67 13.74L8.32 12.26L11.91 9.00001H1V7.00001Z" fill="%23687078"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

.mega-category-item:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

.mega-category-item:hover {
    color: #232f3e;
}

/* Browse All */
.mega-browse-all {
    background: #f7f9fc !important;
    border: 1px solid #d5dbdb !important;
    margin-top: 12px;
}

.mega-browse-all .mega-card-title {
    color: #0073bb;
    font-weight: 400;
}

.mega-browse-all:hover {
    background: #eef4f7 !important;
}

/* Close button */
.mega-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #d5dbdb;
    border-radius: 4px;
    font-size: 16px;
    color: #687078;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 1004;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mega-close:hover {
    background: #f7f7f7;
    border-color: #aab7b8;
    color: #232f3e;
    transform: scale(1.05);
}

/* Categories header */
.mega-categories-header {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    color: #7f7f7f;
    margin: 25px 0px 16px 63px;
    letter-spacing: 0.5px;
    transform: translate(-5px, 15px);
    padding-left: 8px;
}

/* Desktop responsywność */
@media (max-width: 1024px) {
    .mega-content {
        gap: 32px;
    }
    
    .mega-categories {
        width: 220px;
    }
}

@media (max-width: 1372px) {
    .custom-nav-logo {
        margin-left: calc(-136px + max(0px, (1372px - 100vw) / 2));
    }
}

@media (max-width: 1200px) {
    .custom-nav-logo {
        margin-left: 0;
    }
    
    .custom-nav {
        padding: 0 16px;
    }
}

/* ===================================
   MOBILE MENU STYLES
   =================================== */

/* Reset marginesów dla mobile header */
.header_menu_custom {
    margin: 0 !important;
    padding-top: 0 !important;
}

.header_menu_custom > * {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

/* Topbar */
.mobile-topbar {
    background: #000000 !important;
    color: #ffffff !important;
    padding: 8px 0;
    margin: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    position: relative;
    z-index: 1001;
}

/* Mobile header */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff !important;
    border-bottom: 1px solid #d5dbdb !important;
    height: 60px;
    position: relative;
    z-index: 1002;
    color: #232f3e !important;
}

.mobile-topbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.mobile-topbar-text {
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
}

/* Mobile header */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff !important;
    border-bottom: 1px solid #d5dbdb !important;
    height: 60px;
    position: relative;
    z-index: 1004;
    color: #232f3e !important;
}

.mobile-hamburger {
    background: none;
    border: none;
    font-size: 24px;
    color: #232f3e !important;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-hamburger:hover {
    background-color: #f7f7f7 !important;
}


.mobile-logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.mobile-logo-container .nav-logo-img {
    width: 40px;
    height: 40px;
}

.mobile-header-right {
    width: 40px;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff !important;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-100%);
    transition: all 0.3s ease;
    color: #232f3e !important;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Overlay header */
.mobile-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff !important;
    border-bottom: 1px solid #d5dbdb !important;
    height: 60px;
    color: #232f3e !important;
}

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #232f3e !important;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-close-btn:hover {
    background-color: #f7f7f7 !important;
}

.mobile-overlay-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.mobile-overlay-logo .nav-logo-img {
    width: 40px;
    height: 40px;
}

.mobile-overlay-right {
    width: 40px;
}

/* Main menu list - POPRAWIONE WYSOKOŚCI */
.mobile-menu-list {
    padding: 0;
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px; /* Zmniejszony padding dla mniejszej wysokości */
    color: #232f3e !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
    min-height: 48px; /* Jednolita minimalna wysokość */
}

.mobile-menu-link:hover {
    background-color: #f7f7f7 !important;
    color: #232f3e !important;
}

.mobile-menu-arrow {
    width: 16px;
    height: 16px;
    color: #687078;
    flex-shrink: 0;
}

/* Submenu */
.mobile-submenu {
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Submenu header - POPRAWIONE */
.mobile-submenu-header {
    padding: 16px 20px;
    background: #f7f9fc !important;
    border-bottom: 1px solid #d5dbdb !important;
    position: sticky;
    top: 0;
    z-index: 10;
    color: #232f3e !important;
    display: block !important; /* Wymuszenie wyświetlania */
    visibility: visible !important;
}

.mobile-back-btn {
    display: flex !important; /* Wymuszenie flex */
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    color: #232f3e !important;
    font-size: 16px;
    font-weight: 500;
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.15s ease;
    width: 100%;
    text-align: left;
    visibility: visible !important; /* Wymuszenie widoczności */
}

.mobile-back-btn:hover {
    color: #ff9900 !important;
}

.mobile-back-arrow {
    width: 20px;
    height: 20px;
    color: #687078 !important;
    flex-shrink: 0;
    display: block !important; /* Wymuszenie wyświetlania strzałki */
}

.mobile-submenu-content {
    padding: 0;
    padding-bottom: 40px;
    background: #ffffff !important;
}

/* Section headers */
.mobile-submenu-section-header {
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #7f7f7f !important;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 24px 20px 16px 20px;
    text-transform: uppercase;
    background: #ffffff !important;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
}

/* Cards section */
.mobile-submenu-cards {
    background: #ffffff !important;
    border-bottom: 8px solid #f7f9fc;
}

.mobile-submenu-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #f0f0f0 !important;
    padding: 0 0 1px 0;
}

.mobile-submenu-card {
    display: block;
    padding: 18px 16px; /* Zwiększony padding dla lepszej proporcji */
    background: #ffffff !important;
    color: #232f3e !important;
    text-decoration: none;
    transition: background-color 0.15s ease;
    border: none;
    position: relative;
    min-height: 72px; /* Minimalna wysokość */
}

.mobile-submenu-card:hover {
    background: #f7f9fc !important;
    color: #232f3e !important;
}

.mobile-card-title {
    font-size: 15px;
    font-weight: 400;
    color: #232f3e !important;
    margin-bottom: 6px;
    line-height: 1.3;
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
}

.mobile-card-desc {
    font-size: 13px;
    color: #687078 !important;
    line-height: 1.4;
    margin: 0;
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Browse All card */
.mobile-browse-all {
    grid-column: 1 / -1;
    background: #f7f9fc !important;
    border: 1px solid #d5dbdb !important;
    border-radius: 4px;
    margin: 8px 16px 16px 16px;
    padding: 18px !important; /* Zwiększony padding */
    color: #232f3e !important;
}

.mobile-browse-all .mobile-card-title {
    color: #0073bb !important;
    font-weight: 500;
}

.mobile-browse-all:hover {
    background: #eef4f7 !important;
}

/* Categories section - POPRAWIONE WYSOKOŚCI */
.mobile-submenu-categories {
    background: #ffffff !important;
}

.mobile-submenu-categories-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #f0f0f0 !important;
    padding: 0 0 1px 0;
}

.mobile-submenu-category {
    display: flex; /* Zmienione z block na flex */
    align-items: center;
    padding: 14px 20px; /* Zmniejszony padding - taki sam jak mobile-menu-link */
    background: #ffffff !important;
    color: #232f3e !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    font-family: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
    transition: background-color 0.15s ease;
    position: relative;
    min-height: 48px; /* Taka sama wysokość jak mobile-menu-link */
}

.mobile-submenu-category:hover {
    background: #f7f9fc !important;
    color: #232f3e !important;
}

.mobile-submenu-category::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6 12l4-4-4-4" stroke="%23687078" stroke-width="2" fill="none"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.mobile-submenu-category:hover::after {
    opacity: 1;
}

/* Animations */
.mobile-menu-list.slide-out {
    transform: translateX(-100%);
}

.mobile-menu-list.slide-in {
    transform: translateX(0);
}

/* Separators */
.mobile-submenu-cards + .mobile-submenu-categories {
    border-top: 8px solid #f7f9fc;
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* Hide/show menu based on screen size */
@media (max-width: 768px) {
    /* Hide desktop menu */
    .nav-wrapper,
    .mega-dropdown {
        display: none !important;
    }
    
    /* Show mobile menu */
    .mobile-topbar,
    .mobile-header,
    .mobile-menu-overlay {
        display: block;
    }
    
    /* Desktop nav adjustments */
    .nav-main-list {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .custom-nav {
        height: auto;
        padding: 16px;
    }
    
    .nav-logo-item {
        margin-right: 16px;
    }
}

@media (min-width: 769px) {
    /* Hide mobile menu */
    .mobile-topbar,
    .mobile-header,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Mobile responsywność */
@media (min-width: 400px) {
    .mobile-submenu-cards-grid {
        gap: 8px;
        padding: 8px;
        background: transparent !important;
    }
    
    .mobile-submenu-card {
        border-radius: 4px;
        border: 1px solid #f0f0f0 !important;
        background: #ffffff !important;
    }
    
    .mobile-browse-all {
        margin: 8px 8px 16px 8px;
    }
    
    .mobile-submenu-categories-list {
        gap: 4px;
        padding: 8px;
        background: transparent !important;
    }
    
    .mobile-submenu-category {
        border-radius: 4px;
        border: 1px solid #f0f0f0 !important;
        margin: 0;
        background: #ffffff !important;
    }
}

@media (max-width: 350px) {
    .mobile-submenu-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 480px) and (max-width: 768px) {
    .mobile-submenu-cards-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 12px;
    }
    
    .mobile-browse-all {
        grid-column: 1 / -1;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .mobile-header,
    .mobile-overlay-header {
        padding: 8px 12px;
    }
    
    .mobile-submenu-section-header,
    .mobile-menu-link,
    .mobile-submenu-card,
    .mobile-submenu-category {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .mobile-topbar-content {
        padding: 0 12px;
        font-size: 11px;
    }
}

/* Landscape orientation */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .mobile-topbar {
        display: none;
    }
    
    .mobile-header,
    .mobile-overlay-header {
        height: 50px;
        padding: 8px 16px;
    }
    
    .mobile-submenu-section-header {
        padding: 16px 20px 12px 20px;
    }
}

/* ===================================
   ACCESSIBILITY & UX ENHANCEMENTS
   =================================== */

/* Focus states */
.mobile-hamburger:focus,
.mobile-close-btn:focus,
.mobile-back-btn:focus {
    outline: 2px solid #ff9900;
    outline-offset: 2px;
}

.mobile-menu-link:focus,
.mobile-submenu-card:focus,
.mobile-submenu-category:focus {
    outline: 2px solid #ff9900;
    outline-offset: -2px;
    background-color: #fff3cd !important;
}

/* Touch device support - POPRAWIONE */
@media (hover: none) and (pointer: coarse) {
    .mobile-menu-link,
    .mobile-submenu-card,
    .mobile-submenu-category {
        min-height: 48px; /* Jednolita wysokość dla wszystkich */
    }
    
    .mobile-hamburger,
    .mobile-close-btn,
    .mobile-back-btn {
        min-width: 48px;
        min-height: 48px;
    }
}

/* Performance optimizations */
.mobile-menu-overlay,
.mobile-menu-list {
    will-change: transform, opacity;
}

.mobile-submenu-card,
.mobile-submenu-category,
.mobile-menu-link {
    will-change: background-color;
}

/* Loading states */
.mobile-menu-list.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Prevent text selection during animations */
.mobile-menu-list.slide-out,
.mobile-menu-list.slide-in {
    user-select: none;
    -webkit-user-select: none;
}

/* Body scroll lock */
body.mobile-menu-open {
    overflow: hidden;
}

/* Overlay behavior */
.mobile-menu-overlay {
    overscroll-behavior: contain;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .mobile-topbar {
        border-bottom: 2px solid #ffffff;
    }
    
    .mobile-header,
    .mobile-overlay-header {
        border-bottom: 2px solid #000000;
    }
    
    .mobile-submenu-card,
    .mobile-submenu-category {
        border: 2px solid #000000 !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu-overlay,
    .mobile-menu-list,
    .mobile-submenu-card,
    .mobile-submenu-category,
    .mobile-menu-link {
        transition: none;
    }
    
    .mobile-menu-list.slide-out,
    .mobile-menu-list.slide-in {
        transform: none;
    }
}
