/* ===== RESPONSIVE DESIGN ===== */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 2rem 0;
        min-height: 70vh;
    }
    
    .hero-section h1 {
        font-size: 1.72rem;
        margin-bottom: 1rem;
    padding-top: 200px;
}
    
    .hero-section h2 {
        font-size: 1.18rem;
        margin-bottom: 1.04rem;
    }
    
    .hero-section p {
        font-size: 14px;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .navbar-brand {
        font-size: 1.18rem;
    }
    
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .card-img-top {
        height: 180px;
    }
    
    .btn {
        font-size: 14px;
        padding: 0.5rem 1rem;
    }
    
    .process-number {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .timeline-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .fa-3x {
        font-size: 2rem !important;
    }
    
    .fa-2x {
        font-size: 1.58rem !important;
    }
    
    h2 {
        font-size: 1.61rem;
    }
    
    h3 {
        font-size: 1.30rem;
    }
    
    h4, h5 {
        font-size: 1.20rem;
    }
    
    /* Disable animations on small screens */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* Contact form adjustments */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Gallery spacing */
    #gallery .col-sm-6 {
        margin-bottom: 1rem;
    }
    
    /* Team member images */
    .team img,
    .team .rounded-circle {
        width: 120px;
        height: 120px;
    }
    
    /* Footer adjustments */
    footer .col-lg-4,
    footer .col-lg-2,
    footer .col-lg-3 {
        margin-bottom: 2rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 1.92rem;
    padding-top: 200px;
}
    
    .hero-section h2 {
        font-size: 1.22rem;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    .card-img-top {
        height: 190px;
    }
    
    /* Disable scroll animations */
    [data-sal] {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        min-height: 85vh;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    padding-top: 200px;
}
    
    .hero-section h2 {
        font-size: 1.34rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    /* Reduce animation on tablets */
    @media (prefers-reduced-motion: no-preference) {
        [data-sal] {
            transform: none !important;
            opacity: 1 !important;
        }
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section h1 {
        font-size: 2.11rem;
    padding-top: 200px;
}
    
    .hero-section h2 {
        font-size: 1.49rem;
    }
    
    .card-img-top {
        height: 200px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section h1 {
        font-size: 2.24rem;
    padding-top: 200px;
}
    
    .hero-section h2 {
        font-size: 1.49rem;
    }
    
    .container {
        max-width: 1140px;
    }
}

/* ===== UTILITY CLASSES FOR RESPONSIVE DESIGN ===== */

/* Hide elements on mobile */
@media (max-width: 767.98px) {
    .d-none-mobile {
        display: none !important;
    }
    
    .text-center-mobile {
        text-align: center !important;
    }
    
    .mb-4-mobile {
        margin-bottom: 1.74rem !important;
    }
}

/* Show only on mobile */
@media (min-width: 768px) {
    .d-mobile-only {
        display: none !important;
    }
}

/* ===== NAVIGATION RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--primary-color);
        margin-top: 1rem;
        border-radius: 5px;
        padding: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        text-align: center;
    }
}

/* ===== GRID ADJUSTMENTS ===== */
@media (max-width: 767.98px) {
    .row.g-4 > * {
        margin-bottom: 1.69rem;
    }
    
    .col-md-6,
    .col-md-4,
    .col-md-3 {
        margin-bottom: 1rem;
    }
}

/* ===== FORM RESPONSIVE ===== */
@media (max-width: 767.98px) {
    .contact-form .row {
        margin: 0;
    }
    
    .contact-form .col-md-6,
    .contact-form .col-md-12 {
        padding: 0;
        margin-bottom: 1rem;
    }
}

/* ===== SPACING RESPONSIVE ===== */
@media (max-width: 767.98px) {
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1rem !important;
    }
}

/* ===== TYPOGRAPHY RESPONSIVE ===== */
@media (max-width: 575.98px) {
    .display-4 {
        font-size: 1.94rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* ===== GALLERY RESPONSIVE ===== */
@media (max-width: 575.98px) {
    #gallery .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    #gallery .g-2 > * {
        padding: 0.25rem;
    }
}

/* ===== CARD RESPONSIVE ===== */
@media (max-width: 767.98px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    .card h5 {
        font-size: 1.13rem;
    }
    
    .card p {
        font-size: 14px;
    }
}

/* ===== BUTTON RESPONSIVE ===== */
@media (max-width: 575.98px) {
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.69rem;
    }
    
    .btn + .btn {
        margin-left: 0;
    }
}

/* ===== ICON RESPONSIVE ===== */
@media (max-width: 575.98px) {
    .fa-3x {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .fa-2x {
        font-size: 1.58rem !important;
    }
}

/* ===== ASPECT RATIOS ===== */
@media (max-width: 767.98px) {
    .ratio {
        margin-bottom: 1rem;
    }
}

/* ===== OVERFLOW HANDLING ===== */
@media (max-width: 767.98px) {
    .table-responsive {
        border: none;
    }
    
    .overflow-hidden {
        overflow: visible !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .btn,
    .d-print-none {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    .text-primary {
        color: #000 !important;
    }
    
    .card {
        border: 2px solid #000;
    }
    
    footer {
        background-color: #000 !important;
        color: #fff !important;
    }
    
    footer a {
        color: #fff !important;
    }
    
    footer a:hover {
        color: #ffff00 !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */