/**
 * Responsywne hamburger menu dla skórki classic (ciemnej)
 * Autor: System zabezpieczeń Fotoferia
 * Data: 2024-11-01
 */

/* ================================================================
   HAMBURGER MENU - OGÓLNE STYLE
   ================================================================ */

.menu .menucontainer.desktop-visible {
    display: block !important;
}

.mobile-menu-toggle {
    display: none; /* Domyślnie ukryte na desktop */
    position: fixed;
    top: 50px; /* Pod user menu */
    left: 15px;
    z-index: 9999;
    width: 40px;
    height: 40px;
    background: rgba(31, 32, 33, 0.95);
    border: 2px solid #6a1010;
    border-radius: 5px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(49, 50, 51, 0.95);
    border-color: #871610;
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Hamburger ikona */
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #e1e1e1;
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Animacja hamburger -> X */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
    background-color: #871610;
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
    background-color: #871610;
}

/* ================================================================
   MOBILE MENU - STYLE PODSTAWOWE
   ================================================================ */

#mainmenu.mobile-active {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(17, 17, 17, 0.98);
    z-index: 9998;
    overflow-y: auto;
    padding-top: 100px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
}

#mainmenu.mobile-hidden {
    transform: translateX(-100%);
}

/* Overlay tło */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9997;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ================================================================
   MEDIA QUERIES - RESPONSIVE
   ================================================================ */

/* Tablet i poniżej (max 1024px) */
@media screen and (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Ukryj desktop menu */
    #mainmenu:not(.mobile-active) {
        display: none !important;
    }
    
    /* Dostosuj szerokość contentu */
    .holder2 {
        width: 100% !important;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    #content {
        width: 100% !important;
        padding: 0 5px;
        box-sizing: border-box;
    }
    
    /* Dostosuj user menu */
    #usermenu {
        min-width: 100% !important;
    }
    
    #usermenu ul {
        width: 100% !important;
        padding: 0 10px;
        box-sizing: border-box;
    }
}

/* Mobile (max 768px) */
@media screen and (max-width: 768px) {
    
    /* Menu mobilne - style elementów */
    #mainmenu.mobile-active > ul {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    #mainmenu.mobile-active > ul > li.menuitem {
        float: none !important;
        width: 100%;
        border-bottom: 1px solid #313131;
    }
    
    #mainmenu.mobile-active > ul > li.menuitem > a {
        display: block;
        padding: 15px 20px;
        color: #e1e1e1;
        font-size: 14px;
        text-transform: uppercase;
        background: url('/gfx/menu_item_bg.jpg') repeat-x;
    }
    
    #mainmenu.mobile-active > ul > li.menuitem > a:hover {
        background-color: #252525;
        color: #ffffff;
    }
    
    /* Submenu */
    #mainmenu.mobile-active .menucontainer {
        position: relative !important;
        display: none;
        margin: 0 !important;
        box-shadow: none !important;
        background: #1a1a1a !important;
    }
    
    #mainmenu.mobile-active .menuitem.expanded > .menucontainer {
        display: block !important;
    }
    
    #mainmenu.mobile-active .menucontainer ul {
        width: 100% !important;
        padding: 0;
    }
    
    #mainmenu.mobile-active .menucontainer ul li {
        float: none !important;
        width: 100%;
        border-bottom: 1px solid #252525;
    }
    
    #mainmenu.mobile-active .menucontainer ul li a {
        display: block !important;
        padding: 12px 20px 12px 40px !important;
        color: #c1c1c1 !important;
        font-size: 13px;
        background: transparent !important;
    }
    
    #mainmenu.mobile-active .menucontainer ul li a:hover {
        background: #222222 !important;
        color: #ffffff !important;
    }
    
    /* Strzałka dla submenu */
    #mainmenu.mobile-active .menuitem:has(.menucontainer) > a::after {
        content: '▼';
        float: right;
        font-size: 10px;
        transition: transform 0.3s ease;
    }
    
    #mainmenu.mobile-active .menuitem.expanded > a::after {
        transform: rotate(180deg);
    }
    
    /* Dostosuj kolumny na mobile */
    #hp #lcol,
    #hp #rcol {
        width: 100% !important;
        float: none !important;
        margin: 10px 0;
    }
    
    #hp #tc1,
    #hp #tc2 {
        width: 100% !important;
        float: none !important;
        margin: 10px 0;
    }
    
    /* Spotlight - responsywny */
    #spotlight {
        width: 100% !important;
        height: auto !important;
        max-width: 450px;
        margin: 0 auto 20px;
    }
    
    #spotlight_in {
        width: 100% !important;
        height: auto !important;
        position: relative !important;
    }
    
    /* User menu - responsywny */
    #usermenu ul {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }
    
    #usermenu > ul > li.menuitem {
        display: inline-block;
        float: none;
    }
    
    /* Obrazki responsywne */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Tabele responsywne */
    table {
        width: 100% !important;
        overflow-x: auto;
        display: block;
    }
}

/* Small mobile (max 480px) */
@media screen and (max-width: 480px) {
    
    .mobile-menu-toggle {
        width: 35px;
        height: 35px;
        padding: 6px;
    }
    
    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
        margin: 3px 0;
    }
    
    #mainmenu.mobile-active {
        width: 240px;
    }
    
    #mainmenu.mobile-active > ul > li.menuitem > a {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    #mainmenu.mobile-active .menucontainer ul li a {
        padding: 10px 15px 10px 30px !important;
        font-size: 12px !important;
    }
    
    /* User menu - kompaktowy */
    #usermenu {
        font-size: 11px;
    }
    
    #usermenu > ul > li.menuitem {
        padding: 0 8px;
    }
    
    /* Mniejsze marginesy */
    .holder2 {
        padding: 0 5px;
    }
    
    h2, h3, h4 {
        font-size: 14px !important;
    }
    
    /* Kompaktowe newsy */
    div.news {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
    
    div.news_body {
        font-size: 11px;
        line-height: 14px;
    }
}

/* ================================================================
   LANDSCAPE MODE - DODATKOWE OPTYMALIZACJE
   ================================================================ */

@media screen and (max-width: 768px) and (orientation: landscape) {
    #mainmenu.mobile-active {
        padding-top: 60px;
    }
    
    .mobile-menu-toggle {
        top: 10px;
    }
}

/* ================================================================
   PRINT MODE - UKRYJ MENU
   ================================================================ */

@media print {
    .mobile-menu-toggle,
    .mobile-menu-overlay,
    #mainmenu {
        display: none !important;
    }
}

/* ================================================================
   ACCESSIBILITY - ULEPSZONA DOSTĘPNOŚĆ
   ================================================================ */

/* Focus dla klawiatury */
.mobile-menu-toggle:focus,
#mainmenu.mobile-active a:focus {
    outline: 2px solid #871610;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .mobile-menu-toggle {
        border-width: 3px;
    }
    
    #mainmenu.mobile-active > ul > li.menuitem {
        border-bottom-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu-toggle,
    .mobile-menu-toggle span,
    #mainmenu.mobile-active,
    .mobile-menu-overlay {
        transition: none !important;
        animation: none !important;
    }
}











