/**
 * Home hero v2 — critical FOUC only (ตัวแปร responsive อยู่ใน style.css)
 */
#rs-slider.home-hero-v2:not(.is-ready) .bend {
    opacity: 0;
    visibility: hidden;
}
#rs-slider.home-hero-v2:not(.is-ready) {
    background-color: #eef4fa;
}
@media only screen and (max-width: 1199px) {
    #rs-slider.home-hero-v2:not(.is-ready) {
        min-height: min(400px, 88svh);
    }
}
@media only screen and (min-width: 1200px) {
    #rs-slider.home-hero-v2:not(.is-ready) {
        aspect-ratio: 12 / 5;
        min-height: 0;
        max-height: min(78vh, 720px);
        width: 100%;
    }
}
#rs-slider.home-hero-v2.is-ready .bend {
    opacity: 1;
    visibility: visible;
}

/* Reference composition: compact split hero, clear CTA pair, benefits below. */
@media (min-width: 992px) {
    #rs-slider.home-hero-v2 {
        --hero-v2-content-max: min(620px, 45vw);
        --hero-v2-title-fs: clamp(32px, 2.6vw, 46px);
        --hero-v2-subtitle-fs: clamp(16px, 1.25vw, 20px);
        --hero-v2-desc-fs: clamp(15px, 1vw, 17px);
        --hero-v2-feature-icon: 52px;
        min-height: 370px;
        max-height: 540px;
        aspect-ratio: 16 / 5.55;
        background: #edf7f6;
    }

    #rs-slider.home-hero-v2 .content-part .container {
        max-width: 1320px;
        padding-left: 36px;
        padding-right: 36px;
    }

    #rs-slider.home-hero-v2 .content-part,
    #rs-slider.home-hero-v2 .nivo-caption .content-part {
        position: absolute !important;
        top: 54% !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }

    #rs-slider.home-hero-v2 .bend,
    #rs-slider.home-hero-v2 #nivoSlider.nivoSlider,
    #rs-slider.home-hero-v2 .nivoSlider {
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    #rs-slider.home-hero-v2 .nivo-caption,
    #rs-slider.home-hero-v2.home-hero-v2--desktop .nivo-caption {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        background: transparent !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__badge {
        margin-bottom: 12px;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__badge-label {
        padding: 0;
        background: transparent;
        transform: none;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__badge-text {
        transform: none;
        color: var(--sanitech-primary, #007a70);
        font-size: 15px;
        letter-spacing: .16em;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__badge-accents {
        align-items: center;
        margin-left: 12px;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__badge-accents span {
        display: none;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__badge-accents span:first-child {
        display: block;
        width: 48px;
        min-height: 1px;
        height: 1px;
        transform: none;
        background: var(--sanitech-primary, #007a70);
    }

    #rs-slider.home-hero-v2 .home-hero-v2__title {
        max-width: 610px;
        margin-bottom: 8px;
        color: #063f3c;
        line-height: 1.04;
        text-transform: none;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__subtitle {
        margin-bottom: 5px;
        color: #071b4a;
        font-weight: 700;
        text-transform: none;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__desc {
        max-width: 510px;
        margin: 0 0 17px;
        color: #263b4f;
        line-height: 1.55;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__actions,
    #rs-slider.home-hero-v2 .content-part .home-hero-v2__actions {
        display: flex !important;
        align-items: center;
        gap: 13px;
        margin-top: 14px;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__cta {
        min-height: 46px;
        padding: 10px 22px;
        border: 1px solid var(--sanitech-primary, #007a70);
        border-radius: 7px;
        background: var(--sanitech-primary, #007a70);
        color: #fff;
        font-size: 14px;
        letter-spacing: 0;
        text-transform: none;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__cta--secondary {
        background: rgba(255,255,255,.72);
        color: var(--sanitech-primary-dark, #005b59);
        box-shadow: none;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__features-row {
        margin-top: -6px;
        margin-bottom: 0;
        padding: 0;
        width: 100%;
        max-width: min(36rem, 48vw);
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__features-track {
        overflow: visible;
        width: 100%;
        max-width: none;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__features {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: space-between;
        gap: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature {
        display: inline-flex;
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0.22rem;
        width: auto;
        min-width: 0;
        max-width: none;
        margin: 0;
        padding: 0.15rem 0.85rem;
        text-align: center;
        white-space: normal;
        background: transparent;
        border: 0;
        border-right: 1px solid rgba(0, 122, 112, 0.22);
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature:first-child {
        padding-left: 0;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature:last-child {
        padding-right: 0;
        border-right: 0;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: var(--hero-v2-feature-icon, 52px);
        height: var(--hero-v2-feature-icon, 52px);
        margin: 0 0 0.15rem;
        flex-shrink: 0;
        border-radius: 0;
        background: transparent;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature-icon i {
        width: auto;
        height: auto;
        line-height: 1;
        font-size: 2.15rem;
        color: #14a896;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature-icon img {
        width: 2.15rem;
        height: 2.15rem;
        object-fit: contain;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.08rem;
        width: auto;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature-en {
        display: block;
        color: #0a3d5c;
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.04em;
        line-height: 1.2;
        text-align: center;
        text-transform: uppercase;
        white-space: nowrap;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature-th {
        color: #3d5366;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.25;
        text-align: center;
        text-transform: none;
        white-space: nowrap;
    }

    #rs-slider.home-hero-v2 .nivo-controlNav {
        right: 32px !important;
        left: auto !important;
        width: auto !important;
        bottom: 18px !important;
    }

    #rs-slider.home-hero-v2 .nivo-controlNav .nivo-control {
        border-color: rgba(0,122,112,.55);
        background: rgba(255,255,255,.72);
    }

    #rs-slider.home-hero-v2 .nivo-controlNav .nivo-control.active {
        background: var(--sanitech-primary, #007a70);
        border-color: var(--sanitech-primary, #007a70);
    }

    #rs-slider.home-hero-v2 .nivo-directionNav > a,
    #rs-slider.home-hero-v2:hover .nivo-directionNav > a {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: rgba(0,122,112,.62);
        color: #fff;
        line-height: 38px;
    }
}

@media (max-width: 1199.98px) {
    #rs-slider.home-hero-v2 .home-hero-v2__actions,
    #rs-slider.home-hero-v2 .content-part .home-hero-v2__actions {
        display: flex !important;
        flex-wrap: wrap;
        gap: 10px;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__cta--secondary {
        border: 1px solid var(--sanitech-primary, #007a70);
        background: #fff;
        color: var(--sanitech-primary-dark, #005b59);
    }
}

@media (max-width: 767.98px) {
    #rs-slider.home-hero-v2 .content-part .container,
    #rs-slider.home-hero-v2 .nivo-caption .content-part .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__inner,
    #rs-slider.home-hero-v2 .home-hero-v2__copy,
    #rs-slider.home-hero-v2 .home-hero-v2__head {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__title {
        width: calc(100vw - 40px) !important;
        max-width: calc(100vw - 40px) !important;
        font-size: clamp(22px, 6.5vw, 27px);
        line-height: 1.12;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__subtitle,
    #rs-slider.home-hero-v2 .home-hero-v2__desc {
        width: calc(100vw - 40px) !important;
        max-width: calc(100vw - 40px) !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__badge-text {
        font-size: 13px;
        white-space: normal;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__features-row,
    #rs-slider.home-hero-v2 .home-hero-v2__features-track {
        width: calc(100vw - 40px) !important;
        max-width: calc(100vw - 40px) !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__features {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #rs-slider.home-hero-v2 .home-hero-v2__feature {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}
