/* Mobile First Responsive Design */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    .display-4 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #E9ECEF;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 70vh;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .hero-section .row {
        text-align: center;
    }
    
    .hero-section .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
    
    /* Disable animations on mobile for better performance */
    .hero-section::before {
        animation: none;
        opacity: 0.05;
    }
    
    /* Sections */
    .py-5 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card:hover {
        transform: none;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Team members - stack vertically */
    .team .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    /* Process steps */
    .process-step::after {
        display: none;
    }
    
    /* Forms */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Gallery adjustments */
    .gallery .col-lg-3 {
        margin-bottom: 1rem;
    }
    
    /* Footer */
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    footer .text-end {
        text-align: center !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2.25rem;
    }
    
    .hero-section {
        min-height: 80vh;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    /* Buttons can be inline again */
    .btn {
        width: auto;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    /* Team members - 2 per row */
    .team .col-lg-2 {
        flex: 0 0 auto;
        width: 50%;
        margin-bottom: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        min-height: 90vh;
    }
    
    /* Team members - 3 per row */
    .team .col-lg-2 {
        flex: 0 0 auto;
        width: 33.333333%;
        margin-bottom: 1.5rem;
    }
    
    /* Cards can have hover effects */
    .card:hover {
        transform: translateY(-3px);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        min-height: 100vh;
    }
    
    /* Full hover effects */
    .card:hover {
        transform: translateY(-5px);
    }
    
    /* Team members - 4 per row */
    .team .col-lg-2 {
        flex: 0 0 auto;
        width: 25%;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    /* Team members - 5 per row as designed */
    .team .col-lg-2 {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .display-4 {
        font-size: 3rem;
    }
    
    .hero-section {
        min-height: 100vh;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: auto;
        padding-top: 6rem;
        padding-bottom: 2rem;
    }
    
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure images look crisp on high DPI displays */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    overflow-x: hidden;
}
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
        break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        break-after: avoid;
    }
    
    .py-5 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Accessibility - Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .card,
    .btn,
    .nav-link,
    img,
    .hero-section::before {
        transition: none;
        animation: none;
        transform: none;
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Dark mode support */

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-link {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .gallery img:hover {
        transform: none;
    }
}

/* Focus improvements for keyboard navigation */
@media (hover: hover) and (pointer: fine) {
    .btn:focus-visible,
    .nav-link:focus-visible,
    .form-control:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Container adjustments for different screen sizes */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Ensure proper spacing on all devices */
.row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.row > * {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Image optimization for different screen sizes */
@media (max-width: 767.98px) {
    .card-img-top,
    .hero-section img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}

@media (min-width: 768px) {
    .card-img-top {
        object-fit: cover;
    }
} 

.hero-section h1 {
    padding-top: 100px;
}