/* Responsive Layout Styles */

/* Large Desktop */
@media (max-width: 1440px) {
    .container {
        max-width: 1140px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Tablet Landscape */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    /* Navigation */
    .nav-toggle {
        display: flex;
    }
    
    /* Standard navigation */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        transform: translateX(-100%);
        transition: transform var(--transition-smooth);
        box-shadow: 0 4px 20px var(--shadow-medium);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    /* Alternative navigation for team, testimonials, blog, faq pages */
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .nav-container .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        transform: translateX(-100%);
        transition: transform var(--transition-smooth);
        box-shadow: 0 4px 20px var(--shadow-medium);
    }
    
    .nav-container .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-links {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 2rem;
        padding: 3rem 0;
        height: 100%;
        width: 100%;
    }
    
    .nav-link {
        font-size: 1.25rem;
        padding: 1rem 0;
    }
    
    /* Mobile menu animation */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .learning-illustration {
        width: 250px;
        height: 250px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .legal-links {
        justify-content: center;
    }
    
    /* CTA Actions */
    .cta-actions {
        flex-direction: column;
        align-items: center;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .cta-actions .btn-primary,
    .cta-actions .btn-outline {
        width: 100%;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }
    
    /* Typography scaling */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.375rem; }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    /* Sections */
    :root {
        --section-padding: 4rem 0;
    }
    
    .hero-section {
        padding: 5rem 0;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    /* Programs */
    .programs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .cookie-actions {
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

/* Mobile Large */
@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Header */
    .navigation-bar {
        padding: 0.75rem 0;
    }
    
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .brand-logo h1 {
        font-size: 1.5rem;
    }
    
    .nav-brand span {
        font-size: 1.3rem;
    }
    
    .nav-brand .logo-icon,
    .brand-logo .logo-icon {
        width: 28px;
        height: 28px;
    }
    
    /* Hero */
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        max-width: 280px;
    }
    
    .learning-illustration {
        width: 200px;
        height: 200px;
    }
    
    .brain-icon {
        width: 100px;
        height: 100px;
    }
    
    .node {
        width: 16px;
        height: 16px;
    }
    
    /* Sections */
    :root {
        --section-padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-header h3 {
        font-size: 1.75rem;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 1.5rem 1rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .feature-icon svg {
        width: 24px;
        height: 24px;
    }
    
    /* Program Cards */
    .program-image {
        height: 160px;
    }
    
    .program-icon {
        width: 60px;
        height: 60px;
    }
    
    .program-icon::before {
        width: 30px;
        height: 30px;
    }
    
    .program-content {
        padding: 1.5rem;
    }
    
    /* CTA Section */
    .cta-content h3 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.125rem;
    }
    
    /* Buttons */
    .btn-primary, .btn-secondary, .btn-outline {
        padding: 0.75rem 1.5rem;
        font-size: 0.925rem;
    }
    
    /* Cookie Banner */
    .nova-cookie-banner {
        padding: 0.75rem 0;
    }
    
    .cookie-content {
        padding: 0 0.75rem;
    }
    
    .cookie-content p {
        font-size: 0.925rem;
    }
    
    .btn-accept, .btn-decline {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.925rem;
    }
    
    .section-header h3 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .feature-card,
    .program-content {
        padding: 1.25rem 0.75rem;
    }
    
    .cta-content h3 {
        font-size: 1.75rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Programs Page Responsive */
    .program-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .program-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .program-actions .btn-primary,
    .program-actions .btn-outline {
        width: 100%;
        max-width: 280px;
    }
    
    .program-icon-large {
        width: 150px;
        height: 150px;
    }
    
    .icon-animation {
        width: 60px;
        height: 60px;
    }
    
    .formats-grid {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    /* Contact Page Responsive */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .transport-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    /* Insights Page Responsive */
    .featured-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .event-card {
        flex-direction: column;
        text-align: center;
    }
    
    /* About Page Responsive */
    .mission-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .philosophy-diagram {
        width: 250px;
        height: 250px;
    }
    
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 3rem;
    }
    
    .timeline-year {
        left: 1rem;
        transform: none;
    }
    
    .timeline-content {
        width: 100% !important;
        margin: 0 !important;
        margin-top: 1rem !important;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    /* Thank You Page Responsive */
    .thank-you-content h1 {
        font-size: 2.5rem;
    }
    
    .success-icon {
        width: 80px;
        height: 80px;
    }
    
    .success-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .thank-you-actions .btn-primary,
    .thank-you-actions .btn-outline {
        width: 100%;
        max-width: 280px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile Extra Small */
@media (max-width: 360px) {
    /* Header and Logo */
    .nav-brand span {
        font-size: 1.1rem;
    }
    
    .nav-brand .logo-icon,
    .brand-logo .logo-icon {
        width: 24px;
        height: 24px;
    }
    
    .brand-logo h1 {
        font-size: 1.25rem;
    }
    
    /* Hero */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        max-width: 240px;
    }
    
    .learning-illustration {
        width: 180px;
        height: 180px;
    }
    
    .brain-icon {
        width: 80px;
        height: 80px;
    }
    
    .node {
        width: 14px;
        height: 14px;
    }
    
    .feature-icon {
        width: 45px;
        height: 45px;
    }
    
    .feature-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .program-icon {
        width: 50px;
        height: 50px;
    }
    
    .program-icon::before {
        width: 25px;
        height: 25px;
    }
    
    .program-icon-large {
        width: 120px;
        height: 120px;
    }
    
    .icon-animation {
        width: 50px;
        height: 50px;
    }
    
    .page-header-content h1 {
        font-size: 2rem;
    }
    
    .thank-you-content h1 {
        font-size: 2rem;
    }
    
    .success-icon {
        width: 70px;
        height: 70px;
    }
    
    .success-icon svg {
        width: 35px;
        height: 35px;
    }
}

/* High DPI / Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .feature-icon,
    .program-icon,
    .format-icon,
    .value-icon,
    .info-icon,
    .resource-icon,
    .method-icon {
        backface-visibility: hidden;
        transform: translateZ(0);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .brain-icon,
    .node,
    .hero-text,
    .hero-visual,
    .wave,
    .icon-animation,
    .success-icon {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-bg: #1a1a1a;
        --tertiary-bg: #2a2a2a;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-light: #999999;
        --white: #2a2a2a;
        --shadow-light: rgba(0, 0, 0, 0.3);
        --shadow-medium: rgba(0, 0, 0, 0.4);
        --shadow-strong: rgba(0, 0, 0, 0.5);
    }
    
    .nova-header {
        background-color: #2a2a2a;
        border-bottom: 1px solid #3a3a3a;
    }
    
    .feature-card,
    .program-card,
    .value-card,
    .format-card,
    .insight-card,
    .testimonial-card,
    .event-card,
    .resource-card,
    .contact-card,
    .next-steps {
        background-color: #2a2a2a;
        border: 1px solid #3a3a3a;
    }
    
    .nav-menu {
        background-color: #2a2a2a;
    }
    
    .contact-form,
    .newsletter-form input,
    .contact-details,
    .additional-info,
    .transport-info,
    .faq-item,
    .legal-text {
        background-color: #2a2a2a;
        border: 1px solid #3a3a3a;
    }
}

/* Focus Styles for Accessibility */
.btn-primary:focus,
.btn-secondary:focus,
.btn-outline:focus,
.nav-link:focus,
.btn-accept:focus,
.btn-decline:focus,
.filter-btn:focus,
.resource-link:focus,
.read-more:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .nova-header,
    .nova-cookie-banner,
    .nav-toggle,
    .hero-visual,
    .cta-section,
    .newsletter-section,
    .philosophy-diagram,
    .learning-illustration,
    .insight-illustration,
    .success-icon,
    .thank-you-actions,
    .additional-resources,
    .contact-reminder {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: #000;
    }
    
    .feature-card,
    .program-card,
    .value-card,
    .format-card,
    .insight-card,
    .testimonial-card,
    .event-card,
    .resource-card,
    .contact-card,
    .next-steps {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .page-header {
        background: none !important;
        color: #000 !important;
    }
    
    .page-header-content h1 {
        color: #000 !important;
    }
    
    .legal-text a {
        color: #000;
        text-decoration: underline;
    }
}