.ms-homepage-hero {
    position: relative;
    overflow: hidden;
    color: #172033;
    background: #f4f0e8;
}

.ms-visual-toolbar {
    position: absolute;
    z-index: 20;
    top: 10px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 28px);
    padding: 7px 9px;
    color: #172033;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(23, 32, 51, .18);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .16);
    font: 600 12px/1.2 system-ui, sans-serif;
    transform: translateX(-50%);
}

.ms-visual-toolbar button {
    min-height: 28px;
    padding: 0 8px;
    color: inherit;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
}

.ms-visual-toolbar button.button-primary {
    color: #fff;
    background: #2271b1;
    border-color: #2271b1;
}

.ms-visual-toolbar-state {
    margin-right: 5px;
    color: #50575e;
    font-weight: 400;
}

.ms-visual-toolbar-header {
    top: 8px;
}

.ms-visual-toolbar-hero {
    position: absolute;
}

/* Homepage sections own their width; normal Astra content remains untouched. */
.ms-homepage-section {
    width: 100%;
}

.ms-homepage-section__inner {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.ms-hero--contained > .ms-homepage-section__inner {
    width: min(100% - 3rem, 1440px);
}

.ms-hero--full > .ms-homepage-section__inner {
    width: 100%;
}

body.home .entry-header {
    display: none;
}

.ms-hero-slides,
.ms-hero-slide {
    position: relative;
    min-height: 560px;
}

.ms-hero-slide[hidden] {
    display: none;
}

.ms-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.ms-hero-eyebrow {
    margin: 0 0 1rem;
    color: #4d9826;
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.ms-hero-copy h1 {
    max-width: 11ch;
    margin: 0;
    font-size: clamp(2.6rem, 5vw, 5.7rem);
    line-height: .98;
    letter-spacing: -.045em;
}

.ms-hero-description {
    max-width: 48ch;
    margin: 1.35rem 0 0;
    font-size: 1.08rem;
    line-height: 1.65;
}

.ms-hero-cta {
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    margin-top: 1.8rem;
    padding: 0 1.5rem;
    color: #fff;
    background: #4d9826;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
}

.ms-hero-highlight {
    display: block;
    margin-top: 1rem;
    font-weight: 800;
}

.ms-hero-split-copy,
.ms-hero-split-visual {
    width: 50%;
}

.ms-hero-split-copy {
    display: flex;
    align-items: center;
    min-height: inherit;
    padding: clamp(3rem, 8vw, 7rem) 5vw;
}

.ms-hero-split-visual {
    position: absolute;
    inset: 0 0 0 50%;
    overflow: hidden;
}

.ms-hero-split-visual img,
.ms-hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ms-hero-visual-placeholder {
    width: 100%;
    height: 100%;
    min-height: inherit;
    background: linear-gradient(135deg, #c8d5c5, #edf0e8 48%, #b0c1b3);
}

.ms-hero-variant-light_split {
    color: #172033;
    background: #f6f0e6;
}

.ms-hero-variant-light_split .ms-hero-split-copy {
    width: 42%;
}

.ms-hero-variant-light_split .ms-hero-split-visual {
    left: 42%;
    width: 58%;
}

.ms-hero-variant-dark_split {
    color: #fff;
    background: #102318;
}

.ms-hero-variant-dark_split .ms-hero-split-copy {
    width: 42%;
}

.ms-hero-variant-dark_split .ms-hero-split-visual {
    left: 42%;
    width: 58%;
}

.ms-hero-variant-dark_split .ms-hero-eyebrow {
    color: #9bd85a;
}

.ms-hero-variant-dark_split .ms-hero-description {
    color: rgba(255, 255, 255, .78);
}

.ms-hero-variant-dark_split .ms-hero-split-visual::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #102318 0%, rgba(16, 35, 24, .2) 35%, transparent 75%);
    content: '';
}

.ms-hero-variant-dark_split .ms-hero-split-visual img {
    object-position: right center;
}

.ms-hero-full-image-visual {
    position: relative;
    min-height: inherit;
    overflow: hidden;
    background: #15261b;
}

.ms-hero-full-image-visual > .ms-hero-full-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--ms-hero-image-position, center);
}

.ms-hero-full-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 14, 8, .72), rgba(5, 14, 8, .22) 48%, rgba(5, 14, 8, .06));
}

.ms-hero-full-image-copy {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: inherit;
    width: min(45%, 620px);
    padding: clamp(3rem, 8vw, 7rem) 5vw;
    color: #fff;
}

.ms-hero-full-image-copy .ms-hero-eyebrow { color: #b0e27a; }
.ms-hero-variant-full_image_showcase .ms-hero-full-image-copy h1 { color: #fff; }
.ms-hero-full-image-copy .ms-hero-description { color: rgba(255, 255, 255, .86); }
.ms-hero-variant-full_image_showcase .ms-hero-full-image-visual { --ms-hero-image-position: center; }
.ms-hero-variant-full_image_showcase .ms-hero-full-image-overlay { opacity: .78; }
.ms-hero-variant-full_image_showcase.ms-hero-image-fit-contain .ms-hero-full-image { object-fit: contain; background: #15261b; }
.ms-hero-variant-full_image_showcase.ms-hero-overlay-light .ms-hero-full-image-overlay { opacity: .64; }
.ms-hero-variant-full_image_showcase.ms-hero-overlay-strong .ms-hero-full-image-overlay { opacity: .92; }
.ms-hero-variant-full_image_showcase.ms-hero-image-position-left .ms-hero-full-image-visual { --ms-hero-image-position: left center; }
.ms-hero-variant-full_image_showcase.ms-hero-image-position-right .ms-hero-full-image-visual { --ms-hero-image-position: right center; }

.ms-hero-overlay-visual {
    display: grid;
    grid-template-columns: minmax(22%, 1fr) minmax(380px, 46%) minmax(22%, 1fr);
    align-items: stretch;
    min-height: inherit;
    background: #15261b;
}

.ms-hero-overlay-visual::after {
    position: absolute;
    inset: 0;
    background: rgba(5, 14, 8, .56);
    content: '';
}

.ms-hero-overlay-visual > img {
    opacity: .85;
}

.ms-hero-overlay-visual .ms-hero-image-left {
    object-position: left center;
}

.ms-hero-overlay-visual .ms-hero-image-right {
    object-position: right center;
}

.ms-hero-overlay-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 4rem 2rem;
    color: #fff;
    text-align: center;
}

.ms-hero-overlay-center .ms-hero-copy {
    max-width: 700px;
}

.ms-hero-overlay-center .ms-hero-eyebrow {
    color: #b0e27a;
}

.ms-hero-overlay-center .ms-hero-copy h1 {
    max-width: 12ch;
    margin-right: auto;
    margin-left: auto;
}

.ms-hero-overlay-center .ms-hero-description {
    margin-right: auto;
    margin-left: auto;
    color: rgba(255, 255, 255, .84);
}

.ms-hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: inline-grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .34);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    font-size: 1.25rem;
    transform: translateY(-50%);
    cursor: pointer;
}

.ms-hero-prev { left: 1.5rem; }
.ms-hero-next { right: 1.5rem; }

.ms-hero-dots {
    position: absolute;
    z-index: 4;
    bottom: 1.5rem;
    left: 50%;
    display: flex;
    gap: .5rem;
    transform: translateX(-50%);
}

.ms-hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    background: rgba(255, 255, 255, .48);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.ms-hero-dot.is-active {
    background: #fff;
    transform: scale(1.25);
}

.ms-hero-change-image {
    position: absolute;
    z-index: 5;
    right: 2rem;
    bottom: 2rem;
    padding: .7rem 1rem;
    color: #fff;
    background: rgba(0, 0, 0, .62);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 999px;
    cursor: pointer;
}

.ms-hero-image-actions {
    position: absolute;
    z-index: 5;
    right: 2rem;
    bottom: 2rem;
    display: flex;
    gap: .5rem;
}

.ms-hero-image-actions .ms-hero-change-image { position: static; }

.ms-hero-save-image {
    padding: .7rem 1rem;
    color: #fff;
    background: #4d9826;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    cursor: pointer;
}

.ms-hero-save-image:disabled { cursor: not-allowed; opacity: .48; }

[data-ms-hero-field] {
    transition: outline .15s ease, background-color .15s ease;
}

[data-ms-hero-field]:focus,
[data-ms-hero-field].is-editing {
    outline: 2px dashed #4d9826;
    outline-offset: 5px;
    background: rgba(255, 255, 255, .12);
}

@media (max-width: 760px) {
    .ms-visual-toolbar {
        right: 8px;
        left: 8px;
        max-width: none;
        justify-content: center;
        overflow-x: auto;
        transform: none;
    }

    .ms-visual-toolbar strong,
    .ms-visual-toolbar-state {
        display: none;
    }
    .ms-hero-slides,
    .ms-hero-slide {
        min-height: 620px;
    }

    .ms-hero-split-copy,
    .ms-hero-variant-light_split .ms-hero-split-copy,
    .ms-hero-variant-dark_split .ms-hero-split-copy {
        position: relative;
        z-index: 2;
        display: block;
        width: 100%;
        min-height: auto;
        padding: 3.5rem 1.5rem 2rem;
    }

    .ms-hero-split-visual,
    .ms-hero-variant-light_split .ms-hero-split-visual,
    .ms-hero-variant-dark_split .ms-hero-split-visual {
        position: absolute;
        inset: auto 0 0;
        width: 100%;
        height: 48%;
    }

    .ms-hero-full-image-copy {
        width: 100%;
        min-height: 58%;
        padding: 5rem 1.5rem 3rem;
        align-items: flex-start;
    }

    .ms-hero-full-image-overlay {
        background: linear-gradient(180deg, rgba(5, 14, 8, .76), rgba(5, 14, 8, .2) 72%, rgba(5, 14, 8, .12));
    }

    .ms-hero-variant-light_split .ms-hero-split-copy {
        background: #f6f0e6;
    }

    .ms-hero-variant-dark_split .ms-hero-split-copy {
        background: #102318;
    }

    .ms-hero-copy h1 {
        font-size: clamp(2.3rem, 11vw, 3.5rem);
    }

    .ms-hero-overlay-visual {
        display: block;
        padding-top: 1px;
    }

    .ms-hero-overlay-visual > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .ms-hero-overlay-center {
        position: relative;
        z-index: 2;
        min-height: inherit;
        padding: 4rem 1.5rem;
    }

    .ms-hero-arrow {
        width: 42px;
        height: 42px;
    }

    .ms-hero-prev { left: .75rem; }
    .ms-hero-next { right: .75rem; }

    .ms-hero-image-actions {
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-ms-hero-field],
    .ms-hero-dot {
        transition: none;
    }
}
