/* GleamStorm Education - Responsive Styles */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .goals-grid,
    .services-grid,
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    :root {
        --spacing-xxl: 2rem;
        --spacing-xl: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .content-visual {
        order: -1;
    }
    
    .large-icon {
        width: 120px;
        height: 120px;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .contact-info-container {
        order: -1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-content p {
        min-width: auto;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid,
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Mobile Large (576px to 767px) */
@media (max-width: 767px) {
    :root {
        --container-max-width: 100%;
        --spacing-xxl: 1.5rem;
        --spacing-xl: 1rem;
        --header-height: 70px;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Mobile Navigation */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: var(--spacing-xl) 0;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: var(--spacing-md) 0;
    }
    
    .nav-link {
        font-size: var(--font-size-lg);
        padding: var(--spacing-md);
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: var(--font-size-base);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Page Header */
    .page-header {
        padding: calc(var(--header-height) + 40px) 0 40px;
    }
    
    .page-header-content h1 {
        font-size: 2rem;
    }
    
    .page-header-content p {
        font-size: var(--font-size-base);
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: var(--font-size-base);
    }
    
    /* Grid Layouts */
    .goals-grid,
    .services-grid,
    .features-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .team-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    /* Cards */
    .goal-card,
    .service-card,
    .feature-card,
    .stat-card {
        padding: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* CTA Section */
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .legal-links {
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .contact-info {
        align-items: center;
    }
    
    /* Forms */
    .contact-form-container {
        padding: var(--spacing-lg);
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .contact-methods {
        gap: var(--spacing-md);
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .service-areas-list {
        gap: var(--spacing-sm);
    }
    
    /* Modal */
    .modal {
        padding: var(--spacing-md);
    }
    
    .modal-content {
        padding: var(--spacing-lg);
        max-height: 90vh;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    /* Cookie Banner */
    .cookie-banner {
        padding: var(--spacing-md);
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-buttons .btn {
        flex: 1;
        min-width: 0;
        font-size: var(--font-size-sm);
        padding: 10px 12px;
    }
    
    /* Legal Content */
    .legal-document {
        padding: var(--spacing-lg);
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .cookie-details {
        font-size: var(--font-size-sm);
    }
    
    .cookie-details th,
    .cookie-details td {
        padding: var(--spacing-sm);
    }
    
    /* Thank You Page */
    .thank-you-section {
        padding: calc(var(--header-height) + 40px) 0 40px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
    }
    
    .thank-you-content h1 {
        font-size: 1.75rem;
    }
    
    .contact-options {
        flex-direction: column;
    }
    
    .thank-you-actions {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .thank-you-actions .btn {
        margin: 0;
        width: 100%;
        max-width: 300px;
        align-self: center;
    }
    
    /* Benefits & Resources */
    .benefits-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .benefit-card,
    .resource-item {
        padding: var(--spacing-lg);
    }
}

/* Mobile Small (up to 575px) */
@media (max-width: 575px) {
    :root {
        --spacing-xl: 0.75rem;
        --spacing-lg: 0.75rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero {
        min-height: 80vh;
    }
    
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .goal-card,
    .service-card,
    .feature-card,
    .stat-card {
        padding: var(--spacing-md);
    }
    
    .contact-form-container,
    .contact-info-card,
    .service-areas-card,
    .quick-response-card {
        padding: var(--spacing-md);
    }
    
    .legal-document {
        padding: var(--spacing-md);
    }
    
    .benefit-card,
    .resource-item {
        padding: var(--spacing-md);
    }
    
    .cookie-buttons .btn {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: var(--font-size-sm);
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: var(--font-size-base);
    }
    
    /* Table responsiveness */
    .cookie-details {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .cookie-details th,
    .cookie-details td {
        min-width: 100px;
    }
}

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

/* Landscape orientation adjustments for mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: var(--spacing-lg) 0;
    }
    
    .nav-menu {
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
}

/* Accessibility - Reduce motion for users who prefer it */
@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;
    }
    
    .hero-background {
        animation: none;
    }
}

/* Dark mode support (for system preference) */
@media (prefers-color-scheme: dark) {
    /* Note: The requirements specify no dark mode, but we can add system preference support */
    /* This section can be expanded if dark mode is needed in the future */
}

/* Print optimizations */
@media print {
    .hero {
        min-height: auto;
        page-break-after: always;
    }
    
    .section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .card,
    .goal-card,
    .service-card,
    .feature-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .cta {
        background: none !important;
        color: #000 !important;
    }
    
    .btn {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
}

/* Focus management for keyboard navigation */
@media (max-width: 767px) {
    .nav-menu.active .nav-link:first-child {
        margin-top: var(--spacing-lg);
    }
    
    .hamburger:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .nav-menu.active {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;  /* Minimum touch target size */
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .contact-option,
    .social-links a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover,
    .card:hover,
    .goal-card:hover,
    .service-card:hover,
    .feature-card:hover,
    .benefit-card:hover,
    .resource-item:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
}

/* Very small screens (320px and below) */
@media (max-width: 320px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-buttons .btn {
        width: 100%;
        margin-bottom: var(--spacing-xs);
    }
}

/* Safari specific fixes */
@supports (-webkit-appearance: none) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        -webkit-appearance: none;
        border-radius: var(--border-radius);
    }
    
    .form-group select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
        padding-right: 40px;
    }
}

/* Internet Explorer fixes (if needed) */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .grid,
    .goals-grid,
    .services-grid,
    .features-grid,
    .stats-grid,
    .footer-content {
        display: -ms-grid;
    }
}
