/* Mobile First Responsive Design */

/* Extra Small Devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography Adjustments */
    h1, .display-4 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    h2, .display-5 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 80vh;
        padding: 60px 0;
    }
    
    #hero .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Section Spacing */
    section {
        padding: 40px 0;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Team Images */
    .team-member img,
    .rounded-circle {
        width: 150px;
        height: 150px;
    }
    
    /* Gallery Images */
    #gallery img {
        height: 200px;
        margin-bottom: 15px;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    /* Forms */
    .form-control {
        padding: 10px 12px;
    }
    
    /* Timeline adjustments for mobile */
    .timeline-item::before {
        display: none;
    }
    
    /* Process steps for mobile */
    .process-step {
        margin-bottom: 30px;
    }
    
    /* Footer adjustments */
    #footer .text-md-end {
        text-align: left;
        margin-top: 15px;
    }
    
    /* No animations on mobile for reduced motion */
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    h1, .display-4 {
        font-size: 2rem;
    }
    
    h2, .display-5 {
        font-size: 1.75rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 85vh;
    }
    
    /* Section Spacing */
    section {
        padding: 50px 0;
    }
    
    /* Team Images */
    .team-member img,
    .rounded-circle {
        width: 180px;
        height: 180px;
    }
    
    /* Gallery Images */
    #gallery img {
        height: 250px;
    }
    
    /* Reduced animations on mobile */
    .card:hover {
        transform: translateY(-3px);
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1, .display-4 {
        font-size: 2.25rem;
    }
    
    h2, .display-5 {
        font-size: 1.9rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 90vh;
    }
    
    /* Section Spacing */
    section {
        padding: 60px 0;
    }
    
    /* Cards in grid */
    .card-columns {
        column-count: 2;
    }
    
    /* Team Images */
    .team-member img,
    .rounded-circle {
        width: 200px;
        height: 200px;
    }
    
    /* Gallery Images */
    #gallery img {
        height: 280px;
    }
    
    /* Timeline */
    .timeline-item::before {
        left: 30px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Full typography */
    h1, .display-4 {
        font-size: 2.5rem;
    }
    
    h2, .display-5 {
        font-size: 2rem;
    }
    
    /* Hero Section */
    #hero {
        min-height: 100vh;
    }
    
    /* Section Spacing */
    section {
        padding: 70px 0;
    }
    
    /* Cards in grid */
    .card-columns {
        column-count: 3;
    }
    
    /* Gallery Images */
    #gallery img {
        height: 300px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container max-width for very large screens */
    .container {
        max-width: 1200px;
    }
    
    /* Full section spacing */
    section {
        padding: 80px 0;
    }
    
    /* Hero adjustments for large screens */
    #hero .container {
        max-width: 1200px;
    }
    
    /* Gallery grid for large screens */
    #gallery .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Adjust hero for ultra-wide */
    #hero {
        padding: 100px 0;
    }
    
    /* Increased section spacing */
    section {
        padding: 100px 0;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    /* Reduce hero height on landscape mobile */
    #hero {
        min-height: 70vh;
        padding: 40px 0;
    }
    
    /* Reduce section padding */
    section {
        padding: 30px 0;
    }
    
    /* Adjust navbar for landscape */
    .navbar {
        padding: 0.5rem 0;
    }
}

/* 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.15);
    }
    
    .btn {
        border-width: 1px;
    }
    
    /* Optimized images for retina */
    .img-fluid {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles */
@media print {
    /* Hide unnecessary elements */
    .navbar,
    #footer,
    .btn,
    .card:hover {
        display: none;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black;
        page-break-after: avoid;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    section {
        padding: 20px 0;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Disable hover effects */
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none !important;
    }
    
    /* Disable scroll behavior */
    html {
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    /* Increase contrast for better accessibility */
    body {
        background: white;
        color: black;
    }
    
    .card {
        border: 2px solid black;
    }
    
    .btn {
        border: 2px solid black;
    }
    
    .text-muted {
        color: #333 !important;
    }
}

/* Dark Mode Preferences */

/* Focus and Navigation Improvements */
@media (min-width: 768px) {
    /* Improve focus visibility on larger screens */
    .nav-link:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 4px;
    }
    
    /* Better button spacing */
    .btn + .btn {
        margin-left: 10px;
    }
}

/* Container Queries (Modern Browsers) */
@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;
        }
    }
}

/* Flexible Grid Adjustments */
@media (min-width: 576px) {
    .row-cols-sm-auto > * {
        flex: 0 0 auto;
        width: auto;
    }
}

@media (min-width: 768px) {
    .row-cols-md-auto > * {
        flex: 0 0 auto;
        width: auto;
    }
}

@media (min-width: 992px) {
    .row-cols-lg-auto > * {
        flex: 0 0 auto;
        width: auto;
    }
}

/* Utility Classes for Responsive Design */
.d-mobile-none {
    display: block;
}

@media (max-width: 767.98px) {
    .d-mobile-none {
        display: none !important;
    }
}

.d-mobile-only {
    display: none;
}

@media (max-width: 767.98px) {
    .d-mobile-only {
        display: block !important;
    }
}

/* Performance Optimizations */
@media (max-width: 767.98px) {
    /* Reduce complexity on mobile */
    .shadow,
    .shadow-sm,
    .shadow-lg {
        box-shadow: none;
    }
    
    /* Simplify gradients on mobile */
    #hero::before {
        display: none;
    }
} 