/* Responsive Design - Mobile First Approach */

/* Base Mobile Styles (320px and up) */
@media (max-width: 575.98px) {
    /* Typography */
    .display-5 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .lead {
        font-size: 0.95rem;
    }
    
    h1, .h1 {
        font-size: 1.8rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.3rem;
    }
    
    /* Header */
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 80vh;
        text-align: center;
    }
    
    #hero .container .row {
        flex-direction: column-reverse;
    }
    
    #hero .col-lg-6:first-child {
        margin-top: 2rem;
    }
    
    /* Sections */
    section {
        padding: 2rem 0;
    }
    
    .py-5 {
        padding: 2rem 0;
    }
    
    /* Cards */
    .card-img-top {
        height: 180px;
    }
    
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Buttons */
    .btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
    
    .btn-lg {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
    
    /* Grid Adjustments */
    .col-lg-3,
    .col-lg-4,
    .col-lg-6 {
        margin-bottom: 1.5rem;
    }
    
    /* Team Images */
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Contact Form */
    .form-control {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    /* Footer */
    #footer .col-lg-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Process Steps - Stack vertically */
    .process-step:not(:last-child)::after {
        display: none;
    }
    
    .process-step {
        margin-bottom: 2rem;
    }
    
    /* Hide decorative elements on mobile */
    #hero::before {
        display: none;
    }
}

/* Small Tablets (576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hero adjustments */
    #hero {
        min-height: 85vh;
    }
    
    /* Cards */
    .card-img-top {
        height: 200px;
    }
    
    /* Team images */
    .team-member img {
        width: 110px;
        height: 110px;
    }
    
    /* Grid spacing */
    .g-4 > * {
        margin-bottom: 1.5rem;
    }
}

/* Medium Tablets (768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    .display-5 {
        font-size: 2.2rem;
    }
    
    .lead {
        font-size: 1.05rem;
    }
    
    /* Hero */
    #hero {
        min-height: 90vh;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 0.8rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 220px;
    }
    
    /* Team images */
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    /* Process steps - show connectors */
    .process-step:not(:last-child)::after {
        width: 2rem;
        right: -1rem;
    }
}

/* Large Tablets and Small Desktops (992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Typography */
    .display-5 {
        font-size: 2.4rem;
    }
    
    /* Hero */
    #hero {
        min-height: 95vh;
    }
    
    /* Cards */
    .card-img-top {
        height: 240px;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    /* Process steps */
    .process-step:not(:last-child)::after {
        width: 3rem;
        right: -1.5rem;
    }
}

/* Large Desktops (1200px and up) */
@media (min-width: 1200px) {
    /* Container max width */
    .container {
        max-width: 1140px;
    }
    
    /* Typography */
    .display-5 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    /* Hero */
    #hero {
        min-height: 100vh;
    }
    
    /* Cards */
    .card-img-top {
        height: 250px;
    }
    
    /* Sections */
    section {
        padding: 5rem 0;
    }
    
    /* Process steps - full connectors */
    .process-step:not(:last-child)::after {
        width: 4rem;
        right: -2rem;
    }
}

/* Extra Large Desktops (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Typography scaling */
    .display-5 {
        font-size: 2.8rem;
    }
    
    .lead {
        font-size: 1.2rem;
    }
    
    /* Enhanced spacing */
    section {
        padding: 6rem 0;
    }
    
    /* Cards */
    .card-img-top {
        height: 280px;
    }
}

/* Landscape Mobile Devices */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    section {
        padding: 1.5rem 0;
    }
    
    /* Disable animations on landscape mobile for performance */
    * {
        transition: none;
        animation: none;
    }
}

/* Print Media Queries */
@media print {
    /* Hide interactive elements */
    .navbar,
    .btn,
    #footer,
    .breadcrumb {
        display: none;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    .container {
        max-width: none;
        width: 100%;
        padding: 0;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #000;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: #000;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders and shadows */
    .card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .btn {
        border-width: 0.5px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    /* Remove all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
    
    /* Remove hover effects that rely on motion */
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .rounded-circle:hover {
        transform: none;
    }
}

/* Dark Mode Support */

/* Container Queries Support */
@supports (container-type: inline-size) {
    .card-container {
        container-type: inline-size;
    }
    
    @container (max-width: 300px) {
        .card-body {
            padding: 0.75rem;
        }
        
        .card-title {
            font-size: 1rem;
        }
    }
}

/* Focus Management for Accessibility */
@media (prefers-reduced-motion: no-preference) {
    .skip-link {
        position: absolute;
        top: -40px;
        left: 6px;
        background: var(--primary-color);
        color: white;
        padding: 8px;
        text-decoration: none;
        transition: top 0.3s;
    }
    
    .skip-link:focus {
        top: 6px;
    }
}

/* Hover Support Detection */
@media (hover: hover) and (pointer: fine) {
    /* Enhanced hover effects for devices with precise pointers */
    .card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    }
    
    .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
}

@media (hover: none) and (pointer: coarse) {
    /* Touch-friendly adjustments */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Remove hover effects */
    .card:hover,
    .btn:hover,
    .rounded-circle:hover {
        transform: none;
        box-shadow: none;
    }
} 