/* --- Responsive & Mobile Optimization --- */

/* --- Mobile Navigation --- */
@media (max-width: 768px) {
    /* Navigation - removed display: none to allow mobile menu to work */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0;
        padding: 70px 25px 30px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.15);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 1001;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: var(--color-text);
        margin: 5px 0;
        transition: 0.3s;
    }
    
    /* Hero Sections */
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content-new h1 {
        font-size: 3.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    /* Sections */
    section {
        padding: 80px 5%;
    }
    
    /* Flex Containers */
    .flex-container,
    .area-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .flex-img {
        order: -1;
        aspect-ratio: 16/9;
    }
    
    /* Features Grid */
    .features {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .feature-item {
        padding: 30px 25px;
    }
    
    /* Service Cards */
    .service-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* News Section */
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 25px 0;
    }
    
    .news-meta {
        width: 100%;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        border-left: none;
    }
    
    .stat-box {
        border-bottom: 1px solid var(--color-border);
        border-right: none;
        padding: 30px;
    }
    
    /* Case Studies Slider */
    .work-card-slide {
        flex: 0 0 280px;
    }
    
    .work-img {
        height: 200px;
    }
    
    /* CTA Section */
    .cta-buttons-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-features {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    /* Footer */
    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-nav-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    /* Sub Pages */
    .sub-hero {
        height: 30vh;
        min-height: 250px;
    }
    
    .sub-hero-content h1 {
        font-size: 2rem;
    }
    
    .company-info-item {
        flex-direction: column;
        gap: 10px;
        padding: 25px 0;
    }
    
    .info-label {
        width: 100%;
        font-size: 0.8rem;
    }
    
    /* Access Page */
    .access-info {
        margin-top: 30px;
    }
    
    .access-item {
        margin-bottom: 30px;
    }
    
    /* Policy Pages */
    .policy-content {
        margin-top: 30px;
    }
    
    .policy-content h3 {
        font-size: 1.2rem;
        margin: 30px 0 15px 0;
    }
    
    .policy-content p {
        margin-bottom: 20px;
    }
}

/* --- Tablet --- */
@media (max-width: 1024px) {
    /* Footer */
    .footer-nav-wrapper {
        grid-template-columns: repeat(2, 1fr);
        min-width: 100%;
    }
    
    .footer-container {
        gap: 40px;
    }
    
    /* Features */
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Service Grid */
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Small Mobile --- */
@media (max-width: 480px) {
    /* Hero */
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content-new h1 {
        font-size: 2.8rem;
    }
    
    /* Sections */
    section {
        padding: 60px 4%;
    }
    
    /* Feature Items */
    .feature-item {
        padding: 25px 20px;
    }
    
    /* Buttons */
    .btn-minimal {
        min-width: 180px;
        padding: 12px 30px;
    }
    
    /* CTA */
    .cta-section {
        padding: 80px 4%;
    }
    
    /* Stats */
    .stat-num {
        font-size: 2.8rem;
    }
    
    /* Work Cards */
    .work-card-slide {
        flex: 0 0 250px;
    }
    
    .work-content {
        padding: 20px;
    }
    
    /* Sub Hero */
    .sub-hero {
        height: 25vh;
        min-height: 200px;
    }
    
    .sub-hero-content h1 {
        font-size: 1.8rem;
    }
}

/* --- Touch Device Optimization --- */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .feature-link:hover,
    .service-card-link:hover,
    .work-card-slide:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    .nav-links a {
        padding: 15px 10px;
    }
    
    .btn-minimal {
        padding: 20px 40px;
    }
    
    .cta-btn {
        padding: 25px 40px;
    }
}

/* --- High DPI Displays --- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* --- Print Styles --- */
@media print {
    nav,
    .hero-scroll-guide,
    .cta-section,
    .footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .feature-item {
        page-break-inside: avoid;
    }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Dark Mode Support --- */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles here if needed */
}

/* --- Landscape Mobile --- */
@media (max-width: 768px) and (orientation: landscape) {
    .sub-hero {
        height: 50vh;
    }
    
    .hero-content-new h1 {
        font-size: 3rem;
    }
}
