/*
 * Responsive Styles
 * All media queries and responsive adjustments
 * 
 * @package IntrosMatter
 * @since 1.0.0
 */

/* Mobile navigation - Show hamburger menu and hide regular navigation on screens 833px and below */
@media (max-width: 833px) {
    .menu-toggle {
        display: block !important; /* Show hamburger menu */
    }
    
    .main-navigation {
        position: inherit;
    }
    
    .main-navigation ul {
        display: none !important; /* Hide regular navigation */
        position: absolute;
        top: 65px;
        left: 0;
        right: 0;
        background: #FFFFFF;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .main-navigation ul.active {
        display: flex !important; /* Show when menu is toggled */
    }
    
    /* Ensure mobile menu is visible when active */
    .main-navigation .nav-menu.active,
    .main-navigation #primary-menu.active {
        display: flex !important;
    }
    
    /* Additional fallback for mobile menu visibility */
    body.menu-open .main-navigation ul {
        display: flex !important;
    }
    
    .main-navigation li {
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
    }

    .main-navigation .button {
        width: 90%;
    }

    .main-navigation .button-secondary {
        width: 90%;
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem 1.5rem;
        color: #333;
        width: 100%;
    }
    
    .main-navigation a:hover,
    .main-navigation a:focus {
        background-color: #f8f9fa;
        color: #0073aa;
    }
    
    /* Mobile dropdown styling */
    .main-navigation .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #f8f9fa;
        margin: 0;
        padding: 0;
        min-width: auto;
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
    }
    
    .main-navigation .sub-menu li {
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
        display: block;
        flex-shrink: 0;
    }
    
    .main-navigation .sub-menu a {
        padding: 12px 2rem;
        font-size: 14px;
        color: #666;
        border-left: 3px solid transparent;
    }
    
    .main-navigation .sub-menu a:hover,
    .main-navigation .sub-menu a:focus {
        background-color: #e9ecef;
        color: #0073aa;
        border-left-color: #0073aa;
        padding-left: 2rem;
    }
    
    .main-navigation .menu-item-has-children > a::before {
        display: none; /* Hide chevron on mobile */
    }
    
    /* Mobile dropdown active states */
    .main-navigation .sub-menu.active {
        display: block;
    }
    
    .main-navigation .menu-item-has-children.active > a {
        background-color: #e9ecef;
        color: #0073aa;
    }
}

/* Large screens - hide hamburger, show regular navigation */
@media (min-width: 834px) {
    .menu-toggle {
        display: none !important; /* Force hide hamburger on large screens */
    }
    
    .main-navigation ul {
        display: flex !important; /* Force show regular navigation */
        flex-direction: row;
        align-items: center;
        gap: 24px;
        height: 72px;
    }
    
    .header-content {
        width: 100%;
        height: 75px;
        padding: 0;
    }
    
    .site-branding {
        max-width: 259px; /* Larger logo width for desktop */
    }
}

/* General responsive adjustments - Extra small mobile (max-width: 374px) */
@media (max-width: 374px) {
    .site {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 16px;
        overflow-x: hidden;
    }
    
    .site-header .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        gap: 0;
        width: 100%;
        height: 64px;
        background: #FFFFFF;
    }
}

/* General responsive adjustments - 375px to 639px (Small mobile) */
@media (min-width: 375px) and (max-width: 639px) {
    .site {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 24px;
        overflow-x: hidden;
    }
    .site-header .container {
        padding: 0 24px;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        gap: 0;
        width: 100%;
        height: 64px;
        background: #FFFFFF;
    }
    
}

/* General responsive adjustments - 640px to 833px (Larger mobile/Small tablet) */
@media (min-width: 640px) and (max-width: 833px) {
    
    .container {
        padding: 0 32px;
        overflow-x: hidden;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        gap: 0;
        width: 100%;
        height: 64px;
        background: #FFFFFF;
    }

}

/* Footer Responsive Styles */

/* Mobile and small tablets - 640px to 833px */
@media (min-width: 640px) and (max-width: 833px) {
    .site-footer {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    .site-footer .container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 40px 32px;
        gap: 38px;
        width: 100%;
        max-width: 833px;
        background: #001214;
    }
    
    .footer-top {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0px;
        width: 100%;
        max-width: 770px;
        flex: none;
        order: 0;
        flex-grow: 0;
    }
    
    .footer-menu-section {
        flex: 1;
        max-width: none;
    }
    
    .footer-menu a {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0px;
        gap: 10px;
        width: auto;
        height: 20px;
        text-decoration: none;
        font-family: 'Outfit';
        font-style: normal;
        font-weight: 400;
        font-size: 14px;
        line-height: 20px;
        color: #F3FDFF;
        flex: none;
        order: 0;
        flex-grow: 0;
        transition: color 0.3s ease;
    }
    
    .footer-menu a:hover {
        color: #059CB0;
    }
    
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0px;
        gap: 12px;
        width: auto;
        min-width: 200px;
        flex: none;
    }
    
    .footer-email {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0px;
        gap: 8px;
        width: auto;
        height: 24px;
        flex: none;
        order: 0;
        flex-grow: 0;
    }
    
    .email-icon {
        width: 24px;
        height: 24px;
        flex: none;
        order: 0;
        flex-grow: 0;
        color: #FFFFFF;
    }
    
    .email-link {
        width: auto;
        height: 24px;
        font-family: 'Be Vietnam';
        font-style: normal;
        font-weight: 400;
        font-size: 16px;
        line-height: 150%;
        text-decoration-line: underline;
        color: #FFFFFF;
        flex: none;
        order: 1;
        flex-grow: 0;
        transition: color 0.3s ease;
    }
    
    .email-link:hover {
        color: #059CB0;
    }
    
    .footer-copyright {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0px;
        gap: 12px;
        width: auto;
        flex: none;
        order: 1;
        flex-grow: 0;
    }
    
    .footer-legal {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0px;
        gap: 16px;
        width: auto;
        height: 20px;
        flex: none;
        order: 1;
        flex-grow: 0;
    }
    
    .footer-logo {
        margin: 0 auto;
        justify-content: center;
        order: 6;
    }
    
    .footer-logo-icon {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0px;
        gap: 6.86px;
        width: auto;
        height: 32px;
        flex: none;
        order: 0;
        flex-grow: 0;
    }
    
    .logo-isotype {
        width: 32px;
        height: 32px;
        flex: none;
        order: 0;
        flex-grow: 0;
    }
    
    .footer-logo-text {
        width: auto;
        height: 22.78px;
        flex: none;
        order: 1;
        flex-grow: 0;
    }
}

/* Tablet screens - 834px to 1023px */
@media (min-width: 834px) and (max-width: 1023px) {
    .site-footer {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    .site-footer .container {
        padding: 40px 36px;
        gap: 3%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-logo {
        width: 100%;
        margin: 38px auto 0 auto;
        order: 6;
    }
    
    .footer-menu-section {
        width: auto;
        max-width: 200px;
    }
    
    .footer-contact {
        width: 33%;
        max-width: 400px;
        margin: 0 auto;
        order: 5;
    }
}

/* Larger tablet/Small desktop - 1024px to 1279px */
@media (min-width: 1024px) and (max-width: 1279px) {
    .site-footer {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    .site-footer .container {
        padding: 32px 24px;
        gap: 24px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-logo {
        width: calc(25% - 24px);
        max-width: 300px;
        margin: 0;
    }
    
    .footer-menu-section {
        width: 25%;
        max-width: 220px;
        margin: 0;
    }
    
    .footer-contact {
        width: 25%;
        max-width: 450px;
        margin: 0 auto;
        order: 5;
    }
}

/* Small mobile - 375px to 639px */
@media (max-width: 639px) {
    .site-footer {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    .site-footer .container {
        padding: 30px 24px;
        gap: 1.5rem;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .footer-logo {
        width: 100%;
        max-width: none;
        margin: 0 auto;
        order: 6;
        justify-content: center;
    }
    
    .footer-menu-section {
        max-width: 180px;
        margin: 0 auto;
    }
    
    .footer-contact {
        width: 100%;
        max-width: fit-content;
        margin: 24px auto 0 auto;
        order: 4;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    .footer-copyright {
        align-items: center;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .main-navigation {
        display: none;
    }
    
    .site {
        max-width: none;
        padding: 0;
    }
}
