/* Responsive Design */

/* Large Tablets and Small Desktops */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    :root {
        --section-padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
    
    .course-card.featured {
        transform: none;
    }
    
    .subscription-content,
    .contact-form-content,
    .enrollment-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .office-hours-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Tablets */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .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(5px, -5px);
    }
    
    /* Hero */
    .hero {
        min-height: 80vh;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Grids */
    .info-grid,
    .benefits-grid,
    .achievements-grid,
    .team-grid,
    .contact-grid,
    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .approach-steps {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .testimonials-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .course-actions {
        flex-direction: column;
    }
    
    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* CTA Buttons */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .thank-you-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Categories Filter */
    .categories-filter {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
    }
    
    /* Tables */
    .cookie-table {
        font-size: 0.875rem;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Mobile Phones */
@media screen and (max-width: 480px) {
    :root {
        --section-padding: 40px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    /* Navigation */
    .navbar .container {
        padding: 0.75rem 10px;
    }
    
    .nav-brand {
        font-size: 1.25rem;
    }
    
    .logo {
        height: 35px;
    }
    
    /* Hero */
    .hero {
        margin-top: 70px;
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 100px 0 40px;
    }
    
    .page-icon {
        height: 60px;
        width: 60px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    /* Cards */
    .info-card,
    .benefit-card,
    .course-card,
    .achievement-card,
    .team-member,
    .contact-card,
    .contact-info-card,
    .value-card,
    .faq-item,
    .testimonial-card,
    .review-card {
        padding: 1.5rem;
    }
    
    /* Forms */
    .subscription-form,
    .contact-form,
    .enrollment-form {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    /* Cookie Banner */
    .cookie-banner {
        padding: 15px 10px;
    }
    
    .cookie-buttons .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-brand {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Achievement Numbers */
    .achievement-number {
        font-size: 2rem;
    }
    
    /* Step Numbers */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Section Icons */
    .section-icon {
        height: 50px;
        width: 50px;
    }
    
    /* Course Details */
    .detail-item {
        flex-direction: column;
        gap: 0.25rem;
        text-align: left;
    }
    
    .course-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* Member Photos */
    .member-photo {
        height: 100px;
        width: 100px;
    }
    
    /* Thank You Page */
    .success-icon {
        height: 80px;
        width: 80px;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Legal Content */
    .legal-content {
        padding: 0 10px;
    }
    
    /* Radio and Checkbox Groups */
    .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Contact Info */
    .contact-link {
        word-break: break-all;
    }
    
    /* Schedule */
    .schedule-day {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    /* Tables Responsive */
    .cookie-table table {
        font-size: 0.75rem;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* Extra Small Phones */
@media screen and (max-width: 360px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .info-card,
    .benefit-card,
    .course-card,
    .achievement-card,
    .team-member,
    .contact-card,
    .contact-info-card,
    .value-card,
    .faq-item,
    .testimonial-card,
    .review-card {
        padding: 1rem;
    }
    
    .subscription-form,
    .contact-form,
    .enrollment-form {
        padding: 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
    
    .filter-btn {
        width: 180px;
    }
}

/* Landscape Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 60vh;
        padding: 1rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .page-header {
        padding: 80px 0 30px;
    }
    
    :root {
        --section-padding: 30px 0;
    }
}

/* High DPI Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .logo,
    .footer-logo,
    .section-icon,
    .benefit-icon,
    .course-icon,
    .value-icon,
    .resource-icon,
    .info-icon,
    .contact-info-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed */
    /* This would require additional implementation */
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        animation: none;
        opacity: 1;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Responsive */
@media print {
    .container {
        max-width: none;
        padding: 0;
    }
    
    .info-grid,
    .benefits-grid,
    .courses-grid,
    .team-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .course-card,
    .info-card,
    .benefit-card,
    .team-member {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    h1, h2, h3, h4 {
        break-after: avoid;
        margin-top: 1rem;
    }
}

/* Container Queries (Modern Browser Support) */
@supports (container-type: inline-size) {
    .course-card {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .course-actions {
            flex-direction: column;
        }
        
        .course-actions .btn {
            width: 100%;
        }
    }
}

/* Hover States for Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .nav-links a:hover,
    .course-card:hover,
    .info-card:hover,
    .benefit-card:hover,
    .team-member:hover,
    .value-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    .btn-primary:hover {
        background-color: var(--primary-color);
    }
    
    .btn-outline:hover {
        background-color: transparent;
        color: var(--primary-color);
    }
}

/* Focus Visible for Better Accessibility */
@supports selector(:focus-visible) {
    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
    }
    
    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}
