/* ============================================================
   ESSENTIAL SERVICES — Corporate-Futurism / Ultra-Minimalist
   Uses root CSS variables from header.css
   ============================================================ */

/* ── Section Shell ── */
.essential-services {
    position: relative;
    background: var(--black);
    padding: 110px 0 110px;
    overflow: hidden;
    font-family: var(--font-main);
}

/* Subtle grid-dot background texture */
.essential-services::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Soft top-edge glow line */
.essential-services::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    z-index: 1;
}


/* ── Carousel Container — full viewport width ── */
.carousel-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ── Owl Stage — single-row constraint ── */
.carousel-container.owl-carousel .owl-stage-outer {
    overflow: hidden;
}

.carousel-container.owl-carousel .owl-stage {
    display: flex !important;
    align-items: stretch;
}

.carousel-container.owl-carousel .owl-item {
    display: flex;
    flex-shrink: 0;
    float: none !important;
}

/* ── Service Card ── */
.carousel-container .card {
    position: relative;
    width: 100%;
    height: 520px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.5s ease;
}

.carousel-container .card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-6px);
}

/* Background Image Layer */
.carousel-container .card .card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.8s ease;
    filter: brightness(0.85) saturate(0.9);
    z-index: 0;
}

.carousel-container .card:hover .card-bg {
    transform: scale(1.05);
    filter: brightness(0.95) saturate(1);
}

/* Overlay Gradient — subtle bottom fade only */
.carousel-container .card .card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 22px;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 40%,
            rgba(0, 0, 0, 0.35) 70%,
            rgba(0, 0, 0, 0.75) 100%);
    transition: var(--transition-normal);
}

.carousel-container .card:hover .card-overlay {
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 35%,
            rgba(0, 0, 0, 0.4) 65%,
            rgba(0, 0, 0, 0.8) 100%);
}

/* Icon — no background box, just the icon */
.carousel-container .card .card-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    display: none;
}


.carousel-container .card .card-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--white);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Card Title */
.carousel-container .card .card-title {
    font-family: var(--font-main);
    font-size: 25px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 8px;
    line-height: 1.3;
    transition: transform 0.4s ease;
}

.carousel-container .card:hover .card-title {
    transform: translateY(-2px);
}

/* Card Description — always visible */
.carousel-container .card .card-desc {
    font-family: var(--font-main);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.55;
    margin: 0;
    font-weight: 400;
}

/* ── Owl Carousel Nav Arrows ── */
.carousel-container .owl-nav {
    position: absolute;
    top: -80px;
    right: 0;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.carousel-container .owl-nav button.owl-prev,
.carousel-container .owl-nav button.owl-next {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--white) !important;
    font-size: 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    outline: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.carousel-container .owl-nav button.owl-prev:hover,
.carousel-container .owl-nav button.owl-next:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.06);
}

.carousel-container .owl-nav button.owl-prev span,
.carousel-container .owl-nav button.owl-next span {
    line-height: 1;
    margin-top: -2px;
}

/* ── Dots / Pagination ── */
.carousel-container .owl-dots {
    display: none;
}

.carousel-container .owl-dots .owl-dot {
    outline: none;
    border: none;
    background: transparent;
    padding: 4px;
    cursor: pointer;
}

.carousel-container .owl-dots .owl-dot span {
    display: block;
    width: 32px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-container .owl-dots .owl-dot.active span,
.carousel-container .owl-dots .owl-dot:hover span {
    background: var(--white);
    width: 48px;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .carousel-container .card {
        height: 380px;
    }
}

@media (max-width: 991px) {
    .essential-services {
        padding: 80px 0 80px;
    }

    .essential-services-title {
        margin-bottom: 60px;
    }

    .carousel-container .card {
        height: 360px;
    }

    .carousel-container .owl-nav {
        top: -65px;
    }
}

@media (max-width: 768px) {
    .essential-services {
        padding: 60px 0 80px;
    }

    .essential-services-title {
        margin-bottom: 45px;
    }

    .essential-services-title h2 {
        font-size: 1.8rem;
    }

    .carousel-container {
        padding: 0;
    }

    .carousel-container .card {
        height: 350px;
    }

    .carousel-container .card .card-overlay {
        padding: 24px 20px;
    }

    .carousel-container .owl-nav {
        position: static;
        justify-content: center;
        margin-top: 30px;
    }

    .carousel-container .owl-dots {
        margin-top: 24px;
    }

    /* Always show description on touch */
    .carousel-container .card .card-desc {
        max-height: 100px;
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .essential-services {
        padding: 48px 0 64px;
    }

    .carousel-container {
        padding: 0 20px;
    }

    .carousel-container .card {
        height: 320px;
    }

    .carousel-container .card .card-title {
        font-size: 0.95rem;
    }

    .carousel-container .card .card-desc {
        font-size: 0.78rem;
    }

    .carousel-container .owl-nav button.owl-prev,
    .carousel-container .owl-nav button.owl-next {
        width: 40px;
        height: 40px;
        font-size: 15px !important;
    }
}