/*
 * Responsive Styles for Nouryon Theme
 * Mobile-first responsive design
 */

/* ==========================================
   LARGE DESKTOP (1440px+)
   ========================================== */

@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
}

/* ==========================================
   DESKTOP (1200px - 1439px)
   ========================================== */

@media (max-width: 1439px) {
    :root {
        --font-size-hero: 42px;
    }
    
    .mega-menu {
        max-width: 1200px;
    }
}

/* ==========================================
   LAPTOP (992px - 1199px)
   ========================================== */

@media (max-width: 1199px) {
    :root {
        --font-size-hero: 36px;
        --font-size-xxl: 28px;
    }
    
    .header-inner {
        gap: var(--spacing-sm);
    }
    
    .nav-menu {
        gap: var(--spacing-xs);
    }
    
    .nav-menu > li > a {
        font-size: 13px;
        padding: var(--spacing-sm) 8px;
    }
}

/* ==========================================
   TABLET (768px - 991px)
   ========================================== */

@media (max-width: 991px) {
    :root {
        --nav-height: 70px;
        --font-size-hero: 32px;
        --font-size-xxl: 24px;
        --spacing-xxl: 48px;
    }
    
    /* Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--white);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    
    .main-navigation.active {
        transform: translateX(0);
    }
    
    .nav-menu {
        flex-direction: column;
        padding: var(--spacing-md);
        gap: 0;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--medium-gray);
    }
    
    .nav-menu > li > a {
        padding: var(--spacing-sm) 0;
        font-size: var(--font-size-base);
        justify-content: space-between;
    }
    
    .mega-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        padding: var(--spacing-sm) 0 var(--spacing-sm) var(--spacing-md);
        grid-template-columns: 1fr;
        border-top: none;
        display: none;
    }
    
    .nav-menu > li.active .mega-menu {
        display: grid;
    }
    
    .dropdown-arrow {
        transition: transform 0.3s ease;
    }
    
    .nav-menu > li.active > a .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* Hero */
    .hero {
        min-height: 500px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    /* Cards */
    .hero-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .careers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

/* ==========================================
   MOBILE LARGE (576px - 767px)
   ========================================== */

@media (max-width: 767px) {
    :root {
        --font-size-hero: 28px;
        --font-size-xxl: 22px;
        --font-size-xl: 20px;
        --spacing-xxl: 40px;
        --spacing-xl: 32px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Header Actions */
    .header-actions .contact-btn span {
        display: none;
    }
    
    .header-actions .contact-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    /* Hero */
    .hero {
        min-height: 400px;
        padding-top: var(--spacing-xxl);
    }
    
    .hero-cards {
        grid-template-columns: 1fr;
    }
    
    /* News */
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card:first-child {
        grid-column: span 1;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Careers */
    .careers-grid {
        grid-template-columns: 1fr;
    }
    
    /* Section Header */
    .section-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .footer-legal {
        justify-content: center;
    }
}

/* ==========================================
   MOBILE SMALL (up to 575px)
   ========================================== */

@media (max-width: 575px) {
    :root {
        --font-size-hero: 24px;
        --font-size-xxl: 20px;
        --font-size-xl: 18px;
    }
    
    .hero-title {
        font-size: var(--font-size-hero);
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .hero-actions .btn {
        text-align: center;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .site-header,
    .site-footer,
    .mobile-menu-toggle,
    .search-toggle,
    .back-to-top,
    .sidebar {
        display: none !important;
    }
    
    .site-main {
        margin: 0;
        padding: 0;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 80%;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #005a5f;
        --text-color: #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================
   DARK MODE (Optional - can be enabled via JS)
   ========================================== */

body.dark-mode {
    --white: #1a1a1a;
    --light-gray: #2a2a2a;
    --medium-gray: #3a3a3a;
    --text-color: #ffffff;
    --text-light: #aaaaaa;
}

body.dark-mode .site-header {
    background-color: #1a1a1a;
}

body.dark-mode .site-header.scrolled {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
}

body.dark-mode .nav-menu > li > a {
    color: #ffffff;
}

body.dark-mode .mega-menu {
    background-color: #2a2a2a;
}
