/* ============================================================
   HERO FIX - light split layout for ALL slides
   Load AFTER san-luis.css, home-extra.css and nav-fix.css
   ============================================================ */

.hero-carousel {
    background: #f4f8f2;
    min-height: 100vh;
    height: auto;
}

.hero-slides {
    height: auto;
    min-height: 100vh;
}

/* Slick wraps slides: let it control visibility, neutralise old rules */
.hero-slides .slick-list,
.hero-slides .slick-track {
    height: 100%;
    min-height: 100vh;
}

.hero-slide {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    height: auto;
    min-height: 100vh;
    display: flex !important;
    align-items: center;
}

/* before slick initialises (or fallback carousel): stack, show only .active */
.hero-slides:not(.slick-initialized) .hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hero-slides:not(.slick-initialized) .hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.hero-slides:not(.slick-initialized) {
    min-height: 100vh;
}

/* Soft blueprint backdrop + right-hand tint like the reference */
.hero-slide {
    background:
        linear-gradient(90deg, #ffffff 0%, #ffffff 48%, #eef4ec 48%, #e4efe0 100%);
}

.hero-slide-bg,
.hero-slide-overlay {
    display: none !important;
}

/* Content: real flow, no clipping, room for header + controls */
.hero-slide-content.hero-split {
    display: grid !important;
    flex-direction: unset;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 56px;
    align-items: center;
    min-height: 0;
    width: 100%;
    padding: 130px 24px 120px !important;
}

.hero-copy {
    min-width: 0;
}

.hero-slide-content.hero-split h1 {
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
    line-height: 1.06;
    max-width: 640px;
    margin-bottom: 14px;
    color: #231F20;
}

.hero-slide-content.hero-split h1 span {
    color: #3E9B3C;
}

.hero-slide-content.hero-split .hero-sub {
    color: #3E9B3C;
    font-size: 1.35rem;
    font-weight: 600;
    max-width: 100%;
    margin-bottom: 14px;
}

.hero-slide-content.hero-split p {
    color: #3a3f3b;
    max-width: 540px;
    margin-bottom: 26px;
    font-size: 1rem;
    line-height: 1.7;
}

.hero-badge {
    background: rgba(62, 155, 60, .12);
    border-color: rgba(62, 155, 60, .3);
    color: #004D2C;
}

.hero-badge i {
    color: #3E9B3C;
    margin-right: 6px;
}

/* Buttons readable on light bg */
.hero-slide .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 26px;
}

.hero-slide .hero-actions .btn-primary {
    background: var(--brand-green);
    box-shadow: 0 6px 20px rgba(62, 155, 60, .3);
}

.hero-slide .hero-actions .btn-secondary {
    color: #3E9B3C;
    border: 1.5px solid #3E9B3C;
    background: #fff;
}

.hero-slide .hero-actions .btn-secondary:hover {
    background: #3E9B3C;
    color: #fff;
}

/* === THE MISSING DATA: chips + certified-by (was white-on-white) === */
.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 22px;
}

.hero-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid #dde8d9;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(35, 31, 32, .08);
    color: #231F20;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
}

.hero-chip i {
    color: #3E9B3C;
    font-size: 1.35rem;
}

.hero-chip span {
    color: #231F20;
}

.hero-certified {
    display: block;
    margin-top: 4px;
    color: #231F20;
}

.hero-certified-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    font-size: .85rem;
    color: #5b655d;
}

.hero-certified-title::before,
.hero-certified-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d3dfce;
}

.hero-cert-row {
    display: grid;
    grid-template-columns: repeat(var(--cert-count, 2), minmax(0, 1fr));
    background: #fff;
    border: 1px solid #dde8d9;
    border-radius: 10px;
    max-width: 540px;
}

.hero-cert {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    text-align: center;
}

.hero-cert+.hero-cert {
    border-left: 1px solid #dde8d9;
}

.hero-cert svg {
    width: 64px;
    height: 44px;
}

.hero-cert small {
    font-size: .68rem;
    font-weight: 600;
    color: #3a3f3b;
    line-height: 1.3;
}

/* Right visual */
.hero-visual {
    display: block;
    max-width: none;
    position: relative;
}

.hero-visual-frame {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(35, 31, 32, .25);
    background: #fff;
}

.hero-visual-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-tag {
    background: #3E9B3C;
}

/* Footer strip inside slide */
.hero-strip {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 20px 40px 20px 48px;
    background: var(--brand-green);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 22px 0 0 0;
    clip-path: none;
}

/* Controls above everything, under the strip */
.hero-controls,
.hero-slides .custom-dots {
    z-index: 10;
}

.hero-controls {
    bottom: 24px;
    /* left: 24px; */
    transform: none;
}

.hero-nav-btn {
    background: #fff;
    color: #231F20;
    border-color: #d3dfce;
}

.hero-scroll-hint {
    display: none;
}

/* Slick arrows/dots: keep inside hero, dark-on-light */
.hero-slides .slick-prev,
.hero-slides .slick-next {
    position: absolute;
    bottom: 24px;
    z-index: 10;
}

.hero-slides .slick-prev {
    left: 24px;
}

.hero-slides .slick-next {
    left: 76px;
}

.hero-slides .custom-dots {
    left: 148px !important;
    transform: none !important;
    bottom: 34px !important;
    background: rgba(35, 31, 32, .1) !important;
}

.hero-slides .custom-dots button {
    background: rgba(35, 31, 32, .3) !important;
}

.hero-slides .custom-dots .slick-active button {
    background: #3E9B3C !important;
}

/* ---------- Tablet / mobile ---------- */
@media (max-width: 900px) {
    .hero-slide {
        background: #fff;
    }

    .hero-slide-content.hero-split {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 110px 20px 110px !important;
    }

    .hero-visual {
        max-width: 520px;
    }

    .hero-strip {
        position: static;
        border-radius: 0;
        padding: 12px 20px;
        font-size: .75rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-slide-content.hero-split h1 {
        font-size: 2rem !important;
    }

    .hero-slide-content.hero-split p {
        font-size: .92rem !important;
        padding-right: 0;
    }

    .hero-slide .hero-actions {
        flex-direction: row;
        max-width: none;
    }

    .hero-slide .hero-actions .btn-primary,
    .hero-slide .hero-actions .btn-secondary {
        width: auto;
        flex: 1 1 200px;
    }

    .hero-controls {
        background: none;
        padding: 0;
        backdrop-filter: none;
    }

    .hero-slides .custom-dots {
        left: 128px !important;
    }
}

@media (max-width: 560px) {
    .hero-chip {
        width: 100%;
    }

    .hero-cert-row {
        grid-template-columns: 1fr;
    }

    .hero-cert+.hero-cert {
        border-left: 0;
        border-top: 1px solid #dde8d9;
    }

    .hero-cert {
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 14px;
    }
}

/* Static fallback controls are redundant once Slick adds its own */
.hero-slides.slick-initialized~.hero-controls {
    display: none;
}

/* polish */
.hero-certified {
    max-width: 540px;
}

.hero-slide {
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 54%, #eef4ec 54%, #e4efe0 100%);
}

@media (max-width: 900px) {
    .hero-slide {
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }

    .hero-slide-content.hero-split {
        padding-bottom: 60px !important;
    }

    .hero-controls {
        position: static;
        transform: none;
        padding: 16px 20px 20px;
        justify-content: center;
        background: #fff;
    }

    .hero-carousel {
        min-height: 0;
    }
}

/* Height follows the tallest slide (no clipping); slides overlap in one grid cell */
.hero-carousel {
    height: auto !important;
    min-height: 100vh;
}

.hero-slides:not(.slick-initialized) {
    display: grid;
    height: auto !important;
    min-height: 100vh;
}

.hero-slides:not(.slick-initialized) .hero-slide {
    grid-area: 1 / 1;
    position: relative;
    inset: auto;
    height: auto !important;
    min-height: 100vh;
    transition: opacity .8s ease, visibility .8s ease;
}

@media (max-width: 900px) {
    .hero-carousel {
        min-height: 0;
    }

    .hero-slides:not(.slick-initialized),
    .hero-slides:not(.slick-initialized) .hero-slide {
        min-height: 0;
    }

    .hero-slide-content.hero-split {
        min-height: 0 !important;
    }
}

/* ============================================================
   FINAL OVERRIDES: brand-green palette + full-bleed right image
   ============================================================ */
.hero-slide .hero-actions .btn-primary {
    background: var(--secondary);
}

.hero-slide .hero-actions .btn-primary:hover {
    background: var(--brand-green);
}

.hero-slide .hero-actions .btn-secondary:hover {
    color: #fff;
    background: var(--secondary);
}

.hero-slide-content.hero-split h1 span {
    color: var(--secondary);
}

.hero-slide-content.hero-split .hero-sub {
    color: var(--brand-green);
}

.hero-strip {
    background: var(--brand-green);
}

.hero-slide {
    background: linear-gradient(90deg, #ffffff 0%, #f4f8f2 100%);
}

/* Desktop: image fills the entire right side, edge to edge, top to bottom */
@media (min-width: 901px) {
    .hero-slide-content.hero-split {
        position: static !important;
        display: block !important;
        padding: 130px 40px 120px !important;
    }

    .hero-copy {
        /* stay left of the image (image starts at 54% of the screen) */
        max-width: calc(54vw - max(0px, (100vw - 1280px) / 2) - 40px - 48px);
    }

    .hero-visual {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 46%;
        max-width: none;
        z-index: 1;
    }

    .hero-visual-frame {
        position: absolute;
        inset: 0;
        border-radius: 0;
        box-shadow: none;
        background: #dfe6e2;
    }

    .hero-visual-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .hero-slide .hero-actions,
    .hero-chips {
        max-width: 100%;
    }
}

/* Tablet / mobile: image goes below the copy, full width edge to edge */
@media (max-width: 900px) {
    .hero-slide-content.hero-split {
        position: relative !important;
    }

    .hero-visual {
        max-width: none;
        width: calc(100% + 40px);
        margin: 0 -20px;
    }

    .hero-visual-frame {
        border-radius: 0;
        box-shadow: none;
    }

    .hero-visual-frame img {
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
}

/* ============================================================
   ROUND 3: show full image, tags top-right, centered controls
   ============================================================ */

/* Tags: both sit top-right, stacked, clear of the fixed header */
.hero-tag.t1,
.hero-tag.t2 {
    left: auto;
    bottom: auto;
    right: 20px;
    z-index: 2;
}

.hero-tag.t1 {
    top: calc(var(--header-h, 88px) + 16px);
}

.hero-tag.t2 {
    top: calc(var(--header-h, 88px) + 16px);
}

/* Slider arrows + dots: one centered row just below the left column */
.hero-slides .slick-prev,
.hero-slides .slick-next {
    bottom: 28px;
    top: auto;
    transform: none;
}

.hero-slides .slick-prev {
    left: calc(27vw - 100px);
}

.hero-slides .slick-next {
    left: calc(27vw + 56px);
}

.hero-slides .custom-dots {
    left: 27vw !important;
    bottom: 38px !important;
    transform: translateX(-50%) !important;
}

/* Desktop: whole image visible (no cropping), blended into the panel */
@media (min-width: 901px) {
    .hero-visual-frame {
        background: linear-gradient(180deg, #dfe0e5 50%, #8f98a7 50%);
    }

    .hero-visual-frame img {
        object-fit: contain;
        object-position: center;
    }
}

/* Tablet / mobile: natural image height, controls centered on the screen */
@media (max-width: 900px) {
    .hero-visual-frame img {
        aspect-ratio: auto;
        height: auto;
        object-fit: contain;
    }

    .hero-tag.t1 {
        top: 16px;
    }

    .hero-tag.t2 {
        top: 16px;
    }

    .hero-slides .slick-prev {
        left: calc(50vw - 100px);
    }

    .hero-slides .slick-next {
        left: calc(50vw + 56px);
    }

    .hero-slides .custom-dots {
        left: 50vw !important;
    }
}

/* ============================================================
   ROUND 4: seamless right panel + controls under the copy column
   ============================================================ */

/* Where the left text column sits (used to center the controls under it) */
.hero-carousel {
    --copy-left: calc(max(0px, (100vw - 1280px) / 2) + 40px);
    --copy-w: min(540px, calc(54vw - var(--copy-left) - 48px));
}

@media (min-width: 901px) {

    /* Full image stays visible; a blurred copy of it fills any leftover space */
    .hero-visual-frame {
        background: #aeb6c0;
        overflow: hidden;
    }

    .hero-visual-frame::before {
        content: "";
        position: absolute;
        inset: -40px;
        background: url("Images/hero-top.jpg") center / cover no-repeat;
        filter: blur(26px) saturate(1.05);
        transform: scale(1.08);
    }

    .hero-visual-frame::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(35, 31, 32, .12);
    }

    .hero-visual-frame img {
        position: relative;
        z-index: 1;
        object-fit: contain;
    }

    .hero-tag {
        z-index: 3;
    }

    /* Slider arrows + dots: centered under the left text column */
    .hero-controls {
        left: calc(var(--copy-left) + var(--copy-w) / 2);
        transform: translateX(-50%);
        bottom: 5px;
    }
}

/* ============================================================
   ROUND 5: clean right panel (no blur) - image shown whole,
   its top/bottom edges fade into a matching flat background
   ============================================================ */
@media (min-width: 901px) {
    .hero-visual {
        align-self: stretch;
        display: flex;
    }

    .hero-visual-frame {
        display: flex;
        align-items: stretch;
        width: 100%;
        background: #e7e8ec;
    }

    .hero-visual-frame::before,
    .hero-visual-frame::after {
        content: none;
    }

    .hero-visual-frame img {
        width: 100%;
        height: 100%;
        flex: none;
        object-fit: contain;
        object-position: center;
        -webkit-mask-image: none;
        mask-image: none;
    }
}