/* Responsive Adjustments */
@media (max-width: 991px) {
    :root {
        --header-height: 70px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    section {
        padding: 4rem 0 !important;
        display: block !important;
        clear: both;
    }

    /* Reset semantic header for sections */
    section header {
        display: block !important;
        height: auto !important;
        text-align: center !important;
        width: 100% !important;
    }

    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    h1,
    .display-3 {
        font-size: clamp(2rem, 9vw, 2.75rem) !important;
        text-align: center !important;
        line-height: 1.2 !important;
        margin-bottom: 1.5rem !important;
    }

    h2,
    .display-5 {
        font-size: clamp(1.75rem, 8vw, 2.15rem) !important;
        text-align: center !important;
        line-height: 1.3 !important;
        margin-bottom: 1.25rem !important;
    }

    p,
    .lead {
        text-align: center !important;
        font-size: 1.05rem !important;
    }

    .hero-content {
        text-align: center;
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    .badge {
        margin-left: auto;
        margin-right: auto;
        display: flex !important;
        width: fit-content;
    }

    .hero-content .d-flex.flex-wrap {
        justify-content: center;
        gap: 1rem !important;
    }

    .stat-value {
        font-size: 2.25rem;
    }

    /* Fix aspect ratios for mobile */
    .gallery-item {
        aspect-ratio: 4 / 3;
    }

    #hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + 3rem) !important;
        padding-bottom: 5rem !important;
    }

    .featured-banner-img {
        height: 350px !important;
    }

    .reveal-up {
        transform: translateY(20px);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: clamp(1.65rem, 8vw, 2rem) !important;
        letter-spacing: -0.02em;
    }

    .lead {
        font-size: 1rem !important;
    }

    .btn-secondary-custom,
    .btn-outline-light {
        width: 100%;
        padding: 0.85rem 1.5rem !important;
        font-size: 1rem !important;
        justify-content: center !important;
    }

    .hero-content .d-flex.flex-column.flex-sm-row {
        width: 100%;
    }

    header .btn-primary {
        display: none !important;
    }
}

/* Desktop Enhancements (min-width: 992px) */
@media (min-width: 992px) {
    :root {
        --header-height: 90px;
    }

    section {
        padding: 8rem 0 !important;
    }

    .container {
        max-width: 1200px;
    }

    /* Hero Desktop */
    #hero {
        min-height: 90vh;
        background-attachment: fixed;
    }

    .hero-content {
        max-width: 800px;
        padding-top: 2rem;
    }

    h1,
    .display-3 {
        font-size: 4.5rem !important;
        line-height: 1.1;
        margin-bottom: 2.5rem !important;
    }

    .hero-content .lead {
        font-size: 1.5rem !important;
        max-width: 700px;
        margin-bottom: 3.5rem !important;
    }

    /* Glassmorphism Header */
    header.fixed-top {
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.8) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    header.fixed-top.scrolled {
        background: rgba(41, 70, 116, 0.95) !important;
        padding: 0.5rem 0;
    }

    header.fixed-top.scrolled .nav-link {
        color: white !important;
    }

    header.fixed-top.scrolled .nav-link::after {
        background: white;
    }

    header.fixed-top.scrolled .navbar-brand img {
        filter: brightness(0) invert(1);
    }

    /* Cards Grid */
    .service-card {
        padding: 3rem;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .service-card:hover {
        transform: translateY(-15px) scale(1.02);
        box-shadow: 0 30px 60px rgba(41, 70, 116, 0.15);
    }

    /* About Section Desktop */
    .display-5 {
        font-size: 3.5rem !important;
    }

    /* Stats Animation Desktop */
    .stat-value {
        font-size: 4rem;
        font-weight: 800;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    /* Gallery Desktop */
    .gallery-item {
        height: 350px;
    }

    .gallery-item img {
        height: 100%;
        object-fit: cover;
    }

    /* FAQ Desktop */
    .accordion-button {
        padding: 1.5rem 2rem !important;
        font-size: 1.2rem;
    }

    /* Layout Spacing */
    .section-divider {
        margin: 0;
    }

    .hover-lift {
        transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }

    .hover-lift:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(41, 70, 116, 0.1);
        background-color: var(--primary) !important;
        color: white !important;
        border-color: var(--primary) !important;
    }
}


/* Ultra Wide Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    h1,
    .display-3 {
        font-size: 5rem !important;
    }
}