/* Mobile First Responsive Design */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography */
    .display-4 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 60px 0 40px;
        text-align: center;
    }
    
    /* Sections */
    section {
        padding: 40px 0;
    }
    
    /* Cards */
    .card-img-top {
        height: 180px;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.95rem;
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* Icons */
    .fa-3x {
        font-size: 2.5em;
    }
    
    .fa-2x {
        font-size: 1.8em;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 15px;
        text-align: center;
    }
    
    /* Form */
    .form-control {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    /* Gallery */
    #gallery .col-md-6 {
        margin-bottom: 15px;
    }
    
    /* Process Steps */
    .bg-primary.rounded-circle {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Team Cards */
    .card .card-img-top {
        height: 200px;
    }
    
    /* Disable animations on mobile for performance */
    * {
        animation-duration: 0s !important;
        animation-delay: 0s !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .text-center:hover .fa {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
        opacity: 1;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 70px 0 50px;
    }
    
    section {
        padding: 50px 0;
    }
    
    .btn-lg {
        padding: 11px 24px;
        font-size: 1rem;
    }
    
    .card-img-top {
        height: 190px;
    }
    
    /* Disable scroll animations on mobile */
    @media (prefers-reduced-motion: no-preference) {
        .sal-animate {
            transition: none !important;
        }
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-4 {
        font-size: 2.2rem;
    }
    
    .hero-section {
        padding: 80px 0 60px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    /* Tablet-specific adjustments */
    .navbar-nav .nav-link {
        padding: 8px 15px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .display-4 {
        font-size: 2.3rem;
    }
    
    .card-img-top {
        height: 200px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .card-img-top {
        height: 220px;
    }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding: 40px 0 20px;
        min-height: auto;
    }
    
    section {
        padding: 30px 0;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer,
    #gallery,
    .sal-animate {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    overflow-x: hidden;
}
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: #000;
    }
    
    .card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .sal-animate {
        transition: none !important;
    }
    
    .card:hover,
    .text-center:hover .fa,
    #gallery img:hover {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    .btn-primary:hover {
        background-color: #333;
        border-color: #333;
    }
    
    .text-primary {
        color: #000 !important;
    }
}

/* Dark Mode Support */

/* Focus Indicators for Keyboard Navigation */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
} 

.hero-section h1 {
    padding-top: 275px;
}