/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography */
    h1 {
        font-size: 1.95rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.68rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.30rem;
    }
    
    h4 {
        font-size: 1.23rem;
    }
    
    h5 {
        font-size: 1rem;
    }
    
    p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .lead {
        font-size: 16px;
    }
    
    /* Hero Section */
    #hero {
        padding-top: 70px;
        min-height: 100vh;
    }
    
    #hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    #hero .lead {
        font-size: 1.25rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        margin: 0;
    }
    
    /* Sections */
    section {
        padding: 2rem 0;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.81rem;
    }
    
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Buttons */
    .btn {
        width: 100%;
        margin-bottom: 0.88rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Forms */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }
    
    /* Team Section */
    #team .col-md-6 {
        margin-bottom: 2rem;
    }
    
    #team img {
        width: 120px;
        height: 120px;
    }
    
    /* Process Section */
    .process-step::after {
        display: none;
    }
    
    .process-step {
        margin-bottom: 2rem;
    }
    
    /* Footer */
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* Gallery */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Contact Info */
    .contact-info {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* No animations on mobile for performance */
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero Section */
    #hero h1 {
        font-size: 2.37rem;
    }
    
    #hero .lead {
        font-size: 1.43rem;
    }
    
    /* Sections */
    section {
        padding: 2.5rem 0;
    }
    
    /* Cards */
    .card-columns {
        column-count: 2;
    }
    
    /* Process Section */
    .process-step::after {
        display: none;
    }
    
    /* Team Section */
    #team img {
        width: 140px;
        height: 140px;
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero Section */
    #hero h1 {
        font-size: 2.65rem;
    }
    
    #hero .lead {
        font-size: 1.54rem;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        margin: 0 0.25rem;
    }
    
    /* Cards */
    .card-columns {
        column-count: 2;
    }
    
    /* Services Section */
    #services .col-md-6 {
        margin-bottom: 2rem;
    }
    
    /* Team Section */
    #team .row {
        justify-content: center;
    }
    
    #team .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
        margin-bottom: 2rem;
    }
    
    /* Process Section - Show connecting lines */
    .process-step::after {
        display: none; /* Hide on tablet for cleaner look */
    }
    
    /* FAQ Section */
    #faq .col-lg-6 {
        margin-bottom: 1rem;
    }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) {
    /* Hero Section */
    #hero {
        padding-top: 80px;
    }
    
    #hero h1 {
        font-size: 3rem;
    }
    
    #hero .lead {
        font-size: 1.60rem;
    }
    
    /* Sections */
    section {
        padding: 4rem 0;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        margin: 0 0.5rem;
    }
    
    /* Team Section */
    #team .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Process Section - Show connecting lines */
    .process-step::after {
        display: block;
    }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container max width */
    .container {
        max-width: 1140px;
    }
    
    /* Hero Section */
    #hero h1 {
        font-size: 3.67rem;
    }
    
    #hero .lead {
        font-size: 1.84rem;
    }
    
    /* Sections */
    section {
        padding: 5rem 0;
    }
    
    /* Cards */
    .card-img-top {
        height: 220px;
    }
    
    /* Team Section */
    #team img {
        width: 160px;
        height: 160px;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Hero Section */
    #hero h1 {
        font-size: 4rem;
    }
    
    /* Sections */
    section {
        padding: 6rem 0;
    }
}

/* Landscape Orientation Adjustments */
@media screen and (orientation: landscape) and (max-height: 500px) {
    #hero {
        padding-top: 60px;
        min-height: auto;
    }
    
    #hero h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and icons for high DPI */
    .card-img-top {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    #footer {
        display: none;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #afa2a0;
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
    
    .card:hover,
    .btn-primary:hover,
    #gallery img:hover {
        transform: none;
    }
}

/* Dark Mode Support */

/* Focus Improvements for Keyboard Navigation */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .btn {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Container Queries (Future-proofing) */
@container (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Specific Mobile Fixes */
@media (max-width: 480px) {
    /* Very small screens */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    /* Improve touch targets */
    .navbar-toggler {
        padding: 0.5rem;
        margin-right: -0.5rem;
    }
    
    /* Stack hero content */
    #hero .row {
        text-align: center;
    }
    
    #hero .col-lg-6:first-child {
        order: 2;
    }
    
    #hero .col-lg-6:last-child {
        order: 1;
        margin-bottom: 2rem;
    }
} 