/* Mobile-first responsive design */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Medium screens (768px to 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .section {
        padding: 60px 0;
    }
}

/* Tablet screens (768px to 991px) */
@media (max-width: 991px) {
    .container {
        padding: 0 15px;
    }
    
    /* Navigation */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        text-align: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f8f9fa;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
    }
    
    /* Hero */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Grids */
    .two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .team-preview {
        grid-template-columns: 1fr;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .leadership-grid {
        grid-template-columns: 1fr;
    }
    
    .team-intro {
        grid-template-columns: 1fr;
    }
    
    .case-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .case-content {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .process-step::after {
        display: none;
    }
    
    .tech-showcase {
        grid-template-columns: 1fr;
    }
    
    .tech-categories {
        grid-template-columns: 1fr;
    }
    
    /* Section spacing */
    .section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
}

/* Small tablets and large phones (576px to 767px) */
@media (max-width: 767px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    /* Page header */
    .page-header {
        padding: 100px 0 40px;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Cards */
    .service-card,
    .mission-card,
    .success-card,
    .team-member,
    .project-card {
        padding: 1.5rem;
    }
    
    /* Contact */
    .contact-detail {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .urgent-contact-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Cookie banner */
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    /* CTA buttons */
    .cta-buttons,
    .hero-buttons,
    .thanks-actions {
        flex-direction: column;
        align-items: center;
    }
    
    /* Project results */
    .project-results {
        grid-template-columns: 1fr;
    }
    
    /* Team stats */
    .team-stats {
        align-items: center;
    }
    
    /* Steps grid */
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile phones (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 10px;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    /* Cards */
    .service-card,
    .mission-card,
    .success-card,
    .team-member,
    .project-card,
    .sector-item,
    .resource-card {
        padding: 1.25rem;
    }
    
    /* Form */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    /* Legal content */
    .legal-content {
        padding: 2rem 1.5rem;
    }
    
    /* Navigation */
    .logo img {
        height: 35px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2rem;
    }
    
    /* Thanks page */
    .thanks-section {
        padding: 100px 0 60px;
    }
    
    .thanks-details {
        padding: 1.5rem;
    }
    
    /* Hero */
    .hero {
        padding: 80px 0 50px;
    }
    
    /* Sections */
    .section {
        padding: 40px 0;
    }
    
    .page-header {
        padding: 80px 0 30px;
    }
    
    /* Cookie modal */
    .cookie-modal {
        padding: 1rem;
    }
    
    .cookie-modal-content {
        padding: 1.5rem;
    }
    
    /* Social links */
    .social-links a {
        width: 35px;
        height: 35px;
    }
    
    /* Contact items */
    .contact-item {
        padding: 1rem;
        min-width: auto;
    }
    
    /* Tech tags */
    .tech-tags span,
    .project-tech span,
    .member-expertise span {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    
    /* Table */
    .cookie-table {
        font-size: 0.8rem;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.5rem;
    }
    
    /* Cookie settings */
    .cookie-settings-panel {
        padding: 1.5rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Extra small screens (up to 400px) */
@media (max-width: 400px) {
    h1 {
        font-size: 1.75rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        width: 100%;
        max-width: 280px;
    }
    
    .stats-grid {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .service-card,
    .mission-card,
    .success-card,
    .team-member,
    .project-card {
        padding: 1rem;
    }
    
    .legal-content {
        padding: 1.5rem 1rem;
    }
    
    .thanks-details {
        padding: 1rem;
    }
    
    .contact-detail {
        padding: 0.75rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .cookie-settings-panel {
        padding: 1rem;
    }
    
    .cookie-category-setting {
        padding: 1rem;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal,
    .btn,
    .social-links {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: #333 !important;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .page-header {
        background: none !important;
        color: #333 !important;
    }
    
    * {
        box-shadow: none !important;
    }
    
    .service-card,
    .mission-card,
    .success-card,
    .team-member,
    .project-card {
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .btn-outline {
        border-width: 3px !important;
    }
    
    .service-card,
    .mission-card,
    .success-card,
    .team-member,
    .project-card {
        border: 2px solid #333 !important;
    }
}

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

/* Focus management for keyboard navigation */
@media (any-hover: none) {
    .service-card:hover,
    .mission-card:hover,
    .success-card:hover,
    .team-member:hover,
    .project-card:hover {
        transform: none;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .page-header {
        padding: 60px 0 30px;
    }
}

/* Support for older browsers */
@supports not (display: grid) {
    .stats-grid,
    .services-grid,
    .mission-grid,
    .success-grid,
    .team-grid,
    .projects-grid,
    .sectors-grid,
    .tech-showcase,
    .tech-categories,
    .testimonials-grid,
    .faq-grid,
    .resources-grid,
    .footer-content {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .stats-grid > *,
    .services-grid > *,
    .mission-grid > *,
    .success-grid > *,
    .team-grid > *,
    .projects-grid > *,
    .sectors-grid > *,
    .tech-showcase > *,
    .tech-categories > *,
    .testimonials-grid > *,
    .faq-grid > *,
    .resources-grid > *,
    .footer-content > * {
        flex: 1 1 300px;
    }
}
