/**
 * Mobile Menu Styles
 * Responsive navigation for both left and top menu layouts
 */

/* Hide mobile header by default */
.mobile-header {
    display: none;
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Reset layout for mobile */
    body.menu-left .site-container,
    body.menu-top .site-container {
        flex-direction: column !important;
        min-height: 100vh;
    }

    /* Show mobile header */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: #fff;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1001;
        border-bottom: 1px solid #eee;
    }

    .site-branding-mobile .custom-logo {
        max-height: 40px;
        width: auto;
    }

    .site-branding-mobile .site-title {
        margin: 0;
        font-size: 20px;
        line-height: 1.2;
    }

    .site-branding-mobile .site-title a {
        color: #333;
        text-decoration: none;
    }

    .site-branding-mobile .site-title a:hover {
        color: #333;
        text-decoration: none;
    }

    /* Hamburger button */
    .mobile-menu-toggle {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        z-index: 1002;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        width: 26px;
        height: 18px;
        position: relative;
    }

    .hamburger span {
        display: block;
        width: 26px;
        height: 3px;
        background: #333;
        transition: all 0.3s ease;
        border-radius: 2px;
        position: absolute;
    }

    .hamburger span:nth-child(1) {
        top: 0;
    }

    .hamburger span:nth-child(2) {
        top: 50%;
        transform: translateY(-50%);
    }

    .hamburger span:nth-child(3) {
        bottom: 0;
    }

    /* Active state - X icon */
    .mobile-menu-toggle.active .hamburger span:nth-child(1) {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }

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

    .mobile-menu-toggle.active .hamburger span:nth-child(3) {
        bottom: auto;
        top: 50%;
        transform: translateY(-50%) rotate(-45deg);
    }

    /* Hide desktop branding on mobile */
    .site-branding {
        display: none !important;
    }

    /* Navigation styles for mobile */
    .site-navigation {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
        padding: 20px;
    }

    .site-navigation.active {
        transform: translateX(0);
    }

    /* Menu items vertical */
    .site-navigation ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        text-align: left !important;
    }

    .site-navigation li {
        margin: 0 !important;
        border-bottom: 1px solid #eee;
    }

    .site-navigation li:last-child {
        border-bottom: none;
    }

    .site-navigation a {
        display: block !important;
        padding: 15px 0 !important;
        font-size: 16px !important;
    }

    /* Override both menu-left and menu-top styles */
    body.menu-left .site-header,
    body.menu-top .site-header {
        position: relative;
        width: 100%;
        padding: 0;
    }

    body.menu-left .site-main-wrapper,
    body.menu-top .site-main-wrapper {
        margin-left: 0 !important;
        padding-top: 70px !important;
        flex: 1;
        width: 100%;
    }

    body.menu-left .site-content,
    body.menu-top .site-content {
        padding: 20px !important;
    }

    body.menu-top .site-navigation,
    body.menu-top.logo-left .site-navigation,
    body.menu-top.logo-left-contained .site-navigation {
        position: fixed;
        top: 70px;
        padding: 20px;
        background: #fff;
    }

    /* Keep sticky navigation on mobile */
    body.menu-top.sticky-header .site-navigation.is-sticky {
        position: fixed;
        top: 70px;
    }

    /* Social media links - hide on mobile for menu-left */
    body.menu-left .site-header .social-media-links {
        display: none !important;
    }

    /* Social media links in navigation for mobile */
    .site-navigation .social-media-links {
        margin-top: 30px !important;
        padding-top: 30px !important;
        border-top: 1px solid #eee;
    }

    /* Footer - always show on mobile */
    .site-footer {
        display: block !important;
        width: 100%;
    }

    /* Darkmode for mobile */
    body.darkmode .mobile-header {
        background: #000;
        border-bottom: 1px solid #333;
    }

    body.darkmode .hamburger span {
        background: #fff;
    }

    body.darkmode .site-branding-mobile .site-title a {
        color: #fff;
    }

    body.darkmode .site-branding-mobile .site-title a:hover {
        color: #fff;
    }

    body.darkmode .site-navigation,
    body.darkmode.menu-top.logo-left .site-navigation,
    body.darkmode.menu-top.logo-left-contained .site-navigation {
        background: #000;
    }

    body.darkmode .site-navigation a {
        color: #ccc;
    }

    body.darkmode .site-navigation li {
        border-bottom: 1px solid #333;
    }

    body.darkmode .social-media-links a {
        color: #fff;
    }

    body.darkmode .site-navigation .social-media-links {
        border-top: 1px solid #333;
    }
}
