/* Mobile-First Responsive Design */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.35rem;
    }
    
    .display-4 {
        font-size: 1.87rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.625rem 1.5rem;
    }
    
    .py-5 {
        padding-top: 2.66rem;
        padding-bottom: 2.75rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .rounded-circle {
        width: 100px !important;
        height: 100px !important;
    }
    
    .fa-3x {
        font-size: 2em !important;
    }
    
    .col-lg-2-4 {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    /* No animations on mobile for performance */
    @media (prefers-reduced-motion: no-preference) {
        .card {
            transition: none;
        }
        
        .card:hover {
            transform: none;
        }
        
        #gallery img {
            transition: none;
        }
        
        #gallery img:hover {
            transform: none;
        }
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2.26rem;
    }
    
    .col-lg-2-4 {
        width: 50%;
    }
    
    .card-img-top {
        height: 200px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .col-lg-2-4 {
        width: 33.333333%;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item::before {
        left: 30px;
    }
    
    .timeline-item .offset-md-6 {
        margin-left: 0;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .col-lg-2-4 {
        flex: 0 0 auto;
        width: 20%;
    }
    
    .timeline::before {
        left: 50%;
    }
    
    .timeline-item::before {
        left: 50%;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .breadcrumb {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    overflow-x: hidden;
}
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .card {
        border: 1px solid #d8d8d8;
        break-inside: avoid;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape Orientation on Mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    #hero {
        min-height: 70vh;
    }
    
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Container Fluid Adjustments */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Gallery Responsive Grid */
@media (max-width: 575.98px) {
    #gallery .col-md-4 {
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 0.58rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    #gallery .col-md-4 {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* Form Improvements on Mobile */
@media (max-width: 767.98px) {
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Card Layout Adjustments */
@media (max-width: 575.98px) {
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.15rem;
    }
    
    .card-text {
        font-size: 0.92rem;
    }
}

/* Hero Section Mobile Optimizations */
@media (max-width: 767.98px) {
    #hero .row {
        text-align: center;
    }
    
    #hero .col-lg-6:first-child {
        order: 2;
        margin-top: 2rem;
    }
    
    #hero .col-lg-6:last-child {
        order: 1;
    }
}

/* Footer Responsive */
@media (max-width: 767.98px) {
    footer .row > div {
        margin-bottom: 2rem;
    }
    
    footer .text-md-end {
        text-align: start !important;
    }
} 