/* ===========================
   Custom Home Slider CSS
   - Left panel uses an <img class="chs-left-img"> for better control & accessibility
   - Images keep original width, scaled by height (no forced stretch/crop)
   =========================== */

/* Reset body margin to remove gaps around the full-width slider */
body {
    margin: 0;
}

/* Slider root */
.chs-slider-container {
    position: relative;
    width: 100%;
    font-family: 'Manrope', sans-serif;
    overflow: hidden;

    /* Aspect-driven height: 56.25vw = 16:9 */
    height: 56.25vw;
    min-height: 500px;
    max-height: 95vh;
}

/* Slide stacking & transitions */
.chs-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
    will-change: opacity;
}
.chs-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.chs-slide-content {
    position: relative;
    width: 100%;
    height: 100%;
}

/* -------------------------
   LEFT PANEL (image element)
   ------------------------- */
.chs-slide-left {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(50% - 4px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: none !important; /* remove any leftover background color/gradient */
}

/* Left image element - keep original width */
.chs-left-img {
    width: auto;              /* use natural width */
    height: 100%;             /* scale to container height */
    max-width: 100%;          /* don’t overflow horizontally */
    object-fit: contain;      /* preserve aspect ratio */
    object-position: center;
    display: block;
    margin: auto;
}

/* Overlay (keeps text readable) */
.chs-left-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    /* You can change this gradient to match your design */
}

/* -------------------------
   RIGHT PANEL
   ------------------------- */
.chs-slide-right {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(50% - 4px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Right image - keep original width */
.chs-slide-right img {
    width: auto;              /* use natural width */
    height: 100%;             /* scale to container height */
    max-width: 100%;          /* don’t overflow horizontally */
    object-fit: contain;
    object-position: center;
    display: block;
    margin: auto;
}

/* -------------------------
   Content container (aligns with theme container)
   ------------------------- */
.chs-slide-content > .container {
    max-width: 1176px;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
}

/* LEFT inner content */
.chs-left-inner {
    position: relative;
    z-index: 30; /* above overlay */
    max-width: 50%;
    padding-right: 24px;
    box-sizing: border-box;
    color: #fff;
}

/* Logo wrapper */
.chs-logo {
    width: 200px;
    height: 100px;
    display: flex;
    background: transparent;
    margin-bottom: 22px;
    box-sizing: border-box;
    overflow: hidden;
}
.chs-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Headline */
.chs-headline {
    font-size: 46px;
    line-height: 1.02;
    margin-right: 50px;
    margin-bottom: 20px;
    color: #fff;
    min-height: 120px;
}

/* Stats */
.chs-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
    margin-right: 70px;
    min-height: 66px;
}
.chs-stat-value {
    font-size: 35px;
    font-weight: 700;
}
.chs-stat-label {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 6px;
}

.small-text {
    font-size: 25px !important;
}

/* CTA */
.chs-cta .chs-button {
    display: inline-block;
    background: #fff;
    color: #111;
    padding: 12px 26px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.chs-cta .chs-button:hover { transform: translateY(-3px); }

/* -------------------------
   Entrance/exit transforms
   ------------------------- */
.chs-slide-left { transform: translateY(-110%); transition: transform 0.85s cubic-bezier(.25,.46,.45,.94); will-change: transform; }
.chs-slide-right { transform: translateY(110%); transition: transform 0.85s cubic-bezier(.25,.46,.45,.94); will-change: transform; }

.chs-slide.active .chs-slide-left { transform: translateY(0%); }
.chs-slide.active .chs-slide-right { transform: translateY(0%); }

.chs-slide.exiting .chs-slide-left { transform: translateY(110%); }
.chs-slide.exiting .chs-slide-right { transform: translateY(-110%); }

/* -------------------------
   Center arrow & dots
   ------------------------- */
.chs-slider-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 40;
    background: rgba(0,0,0,0.2);
}
.chs-slider-nav {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 45;
}
.chs-nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
}
.chs-nav-dot.active { background: #fff; transform: scale(1.2); }

/* -------------------------
   Responsive: stack panels on mobile
   ------------------------- */
@media (max-width: 900px) {
    .chs-slider-container {
        height: 85vh;
        min-height: 0;
    }

    .chs-slide-content > .container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        align-items: flex-start;
    }

    .chs-left-inner {
        max-width: 100%;
        padding-top: 6vh;
        padding-right: 0;
    }

    .chs-logo {
        width: 140px;
        height: 64px;
        padding: 6px 0;
    }

    .chs-headline { font-size: 28px; min-height: 80px; }
    .chs-stat-value { font-size: 20px; }
    .chs-stats { gap: 12px; min-height: 0; }

    /* stacked layout: panels become full width halves */
    .chs-slide-left,
    .chs-slide-right {
        width: 100%;
        height: 50%;
        left: 0;
        right: 0;
    }

    .chs-slide-right { top: 50%; }

    /* overlay covers left half for readability */
    .chs-left-overlay { }

    .chs-slider-arrow { width: 48px; height: 48px; }
}

/* Very small screens */
@media (max-width: 480px) {
    .chs-headline { font-size: 22px; min-height: 60px; }
    .chs-logo img { width: 110px; margin-bottom: 16px; }
    .chs-stats { gap: 12px; }
}
