/* Responsive Design */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-text h1 {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Medium screens (768px to 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .featured-card {
        gap: 2rem;
        padding: 2rem;
    }
    
    .story-content {
        gap: 2rem;
    }
    
    .course-content {
        gap: 2rem;
    }
    
    .map-container {
        gap: 2rem;
    }
}

/* Small screens (768px and down) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header */
    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav.active {
        transform: translateY(0);
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem 0;
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 2rem;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.35rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    /* Grid layouts */
    .features-grid,
    .services-grid,
    .pricing-grid,
    .team-grid,
    .categories-grid,
    .stories-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .hours-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Specific components */
    .featured-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    
    .story-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .course-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .map-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Form layouts */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .newsletter-form input {
        margin-bottom: 1rem;
    }
    
    /* Cookie banner */
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Article navigation */
    .article-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Stats row */
    .stats-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* CTA buttons */
    .cta-buttons {
        flex-direction: column;
    }
    
    /* Step items */
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    /* Module items */
    .module-item {
        flex-direction: column;
        text-align: center;
    }
    
    /* Contact details */
    .contact-details {
        grid-template-columns: 1fr;
    }
    
    /* Story results */
    .story-results {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Popular items */
    .popular-item {
        flex-direction: column;
        text-align: center;
    }
    
    /* Link cards */
    .link-card {
        flex-direction: column;
        text-align: center;
    }
    
    /* Padding adjustments */
    .hero,
    .features,
    .process,
    .testimonials,
    .cta,
    .stats,
    .blog-categories,
    .popular-articles,
    .faq,
    .contact-form,
    .map,
    .office-hours,
    .pricing,
    .learning-modules,
    .additional-services,
    .company-story,
    .mission-values,
    .course-info,
    .team,
    .success-stories,
    .video-testimonials,
    .review-form,
    .thanks-section,
    .newsletter-section {
        padding: 3rem 0;
    }
    
    .legal-content,
    .article-content {
        padding: 2rem 0;
    }
    
    /* Card padding */
    .feature-card,
    .testimonial-card,
    .article-card,
    .category-card,
    .service-card,
    .pricing-card,
    .team-member,
    .story-card,
    .video-card,
    .contact-card,
    .hours-card,
    .mission-card {
        padding: 1.5rem;
    }
    
    .legal-document,
    .form-wrapper,
    .review-form-content {
        padding: 2rem;
    }
    
    /* Table responsive */
    .cookies-table {
        font-size: 0.9rem;
    }
    
    .cookies-table th,
    .cookies-table td {
        padding: 8px;
    }
    
    /* FAQ adjustments */
    .faq-question {
        padding: 1rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem;
    }
}

/* Extra small screens (480px and down) */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn.large {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Cookie buttons */
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    /* Form elements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* Pricing */
    .price {
        font-size: 2rem;
    }
    
    /* Step and module numbers */
    .step-number,
    .module-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Popular numbers */
    .popular-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* Testimonial avatars */
    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }
    
    /* Member photos */
    .member-photo {
        width: 100px;
        height: 100px;
    }
    
    /* Icons */
    .feature-icon img,
    .service-icon img,
    .contact-icon img,
    .category-icon img,
    .link-icon img {
        width: 40px;
        height: 40px;
    }
    
    /* Thanks icon */
    .thanks-icon img {
        width: 80px;
        height: 80px;
    }
    
    /* Video thumbnails */
    .video-thumbnail img {
        height: 150px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Article images */
    .article-image img {
        height: 150px;
    }
    
    /* Story images */
    .story-image img {
        height: 150px;
    }
    
    /* Featured images */
    .featured-image img {
        height: 200px;
    }
    
    /* Hero SVG */
    .hero-svg {
        max-width: 300px;
    }
    
    /* Page header SVG */
    .page-header-svg {
        width: 80px;
        height: 80px;
    }
    
    /* Padding adjustments */
    .hero,
    .features,
    .process,
    .testimonials,
    .cta,
    .stats,
    .blog-categories,
    .popular-articles,
    .faq,
    .contact-form,
    .map,
    .office-hours,
    .pricing,
    .learning-modules,
    .additional-services,
    .company-story,
    .mission-values,
    .course-info,
    .team,
    .success-stories,
    .video-testimonials,
    .review-form,
    .thanks-section,
    .newsletter-section {
        padding: 2rem 0;
    }
    
    /* Card padding */
    .feature-card,
    .testimonial-card,
    .article-card,
    .category-card,
    .service-card,
    .pricing-card,
    .team-member,
    .story-card,
    .video-card,
    .contact-card,
    .hours-card,
    .mission-card {
        padding: 1rem;
    }
    
    .legal-document,
    .form-wrapper,
    .review-form-content {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero-text h1 {
        font-size: 2.25rem;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .thanks-section {
        padding: 3rem 0;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .mobile-menu-toggle,
    .btn,
    .cookie-buttons,
    .cta,
    .newsletter-section {
        display: none !important;
    }
    
    main {
        margin-top: 0;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .legal-document,
    .article-body {
        box-shadow: none;
        padding: 0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .article-content,
    .legal-content {
        padding: 0;
    }
    
    .page-header {
        background: none;
        color: #333;
        padding: 1rem 0;
    }
    
    .page-header h1 {
        color: #333;
    }
    
    .page-header p {
        color: #666;
    }
    
    .page-header-svg {
        display: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn.primary {
        background-color: #000;
        color: #fff;
        border: 2px solid #000;
    }
    
    .btn.primary:hover {
        background-color: #333;
    }
    
    .btn.secondary {
        background-color: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .btn.secondary:hover {
        background-color: #000;
        color: #fff;
    }
    
    .nav-link:hover,
    .nav-link.active {
        color: #000;
    }
    
    .feature-card,
    .testimonial-card,
    .article-card,
    .category-card,
    .service-card,
    .pricing-card,
    .team-member,
    .story-card,
    .video-card,
    .contact-card,
    .hours-card,
    .mission-card {
        border: 1px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in {
        opacity: 1;
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .feature-card:hover,
    .testimonial-card:hover,
    .article-card:hover,
    .category-card:hover,
    .service-card:hover,
    .pricing-card:hover,
    .link-card:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* This would be implemented if dark mode was desired */
    /* For now, keeping light theme as per requirements */
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
input:focus,
select:focus,
textarea:focus,
.faq-question:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #3498db;
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Ensure text remains visible during font load */
.font-display-swap {
    font-display: swap;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3498db;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error states */
.error {
    color: #e74c3c;
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Success states */
.success {
    color: #27ae60;
    border-color: #27ae60;
}

.success-message {
    color: #27ae60;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
