/* ===== RESPONSIVE DESIGN ===== */

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    h1 {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

/* Large Devices (992px to 1199px) */
@media (max-width: 1199px) {
    .container {
        padding: 0 1.5rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero-content {
        gap: 3rem;
    }
    
    .service-content {
        gap: 3rem;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .why-content {
        gap: 3rem;
    }
    
    .contact-content {
        gap: 3rem;
    }
}

/* Medium Devices (768px to 991px) */
@media (max-width: 991px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem 0;
    }
    
    .nav-list li {
        margin: 0;
        text-align: center;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: 6rem 0 4rem;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Page Headers */
    .page-header {
        padding: 6rem 0 3rem;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    /* Grid Layouts */
    .service-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .service-detail.reverse .service-content {
        direction: ltr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .why-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .additional-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Process Steps */
    .process-steps {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
    
    .approach-steps .step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Cookie Consent */
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    /* Forms */
    .form-container {
        padding: 2rem;
    }
}

/* Small Devices (576px to 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Sections */
    .hero {
        padding: 5rem 0 3rem;
    }
    
    .page-header {
        padding: 5rem 0 2rem;
    }
    
    section {
        padding: 3rem 0 !important;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* Service Cards */
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .service-icon-large {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    /* Contact Items */
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .contact-icon {
        margin: 0 auto;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Mission Vision Cards */
    .mv-card {
        padding: 2rem 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Tables */
    .cookie-table {
        font-size: 0.875rem;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Forms */
    .checkbox-label {
        font-size: 0.9rem;
    }
}

/* Extra Small Devices (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Navigation */
    .nav-brand {
        font-size: 1.1rem;
    }
    
    .nav-brand img.logo {
        width: 28px;
        height: 28px;
    }
    
    /* Hero */
    .hero {
        padding: 4rem 0 2rem;
    }
    
    .page-header {
        padding: 4rem 0 2rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .additional-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Cards */
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .mv-card {
        padding: 1.5rem 1rem;
    }
    
    .additional-service {
        padding: 1.5rem;
    }
    
    .faq-item {
        padding: 1.5rem;
    }
    
    /* Icons */
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .service-icon-large {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    .mv-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    /* Technology tags */
    .service-technologies {
        gap: 0.25rem;
    }
    
    .tech-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Forms */
    .form-container {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    /* Cookie Consent */
    .cookie-consent {
        padding: 1rem;
    }
    
    .cookie-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
    
    /* Legal Pages */
    .legal-meta {
        padding: 1rem;
    }
    
    .legal-section {
        margin-bottom: 2rem;
    }
    
    .company-details,
    .contact-details {
        padding: 1rem;
    }
    
    /* Tables - Stack vertically on very small screens */
    .cookie-table table,
    .cookie-table thead,
    .cookie-table tbody,
    .cookie-table th,
    .cookie-table td,
    .cookie-table tr {
        display: block;
    }
    
    .cookie-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .cookie-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .cookie-table td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .cookie-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .page-header {
        padding: 2rem 0 1rem;
    }
    
    .nav-menu.active {
        max-height: 300px;
        overflow-y: auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .service-icon,
    .mv-icon,
    .step-icon,
    .contact-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .cookie-consent,
    .nav-toggle,
    .btn,
    .social-links,
    .cta-section {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .page-header {
        padding: 1rem 0;
        background: none !important;
        color: #000 !important;
    }
    
    .legal-document {
        max-width: none;
    }
    
    h1, h2, h3, h4 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    .legal-section {
        page-break-inside: avoid;
    }
}

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

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* This can be expanded when dark mode is implemented */
    .cookie-table {
        color-scheme: dark;
    }
}

/* Focus styles for better accessibility */
@media (max-width: 991px) {
    .nav-link:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }
    
    .btn:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }
}
