/* Flexible-content sections (hero slider, pillars, featured story, rich text).
   Loaded only on pages that have at least one section. */

body.home #main { background: var(--grey); display: flow-root; }

/* ── Hero slider ── */
.hero-slider {
    position: relative;
    --hero-h: clamp(440px, 46vw, 660px);
    background: var(--navy);
}
.hero-slider .splide__track { overflow: hidden; }
.hero-slide {
    position: relative;
    min-height: var(--hero-h);
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}
.hero-slide__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: var(--hero-h);
    padding-top: 48px;
    padding-bottom: 96px;
}
.hero-slide__text { max-width: 560px; }
@keyframes ff-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
html.js .hero-slider .hero-slide__text > * { opacity: 0; }
html.js .hero-slider .is-active .hero-slide__text > * { animation: ff-rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
html.js .hero-slider .is-active .hero-slide__text > :nth-child(2) { animation-delay: 0.12s; }
html.js .hero-slider .is-active .hero-slide__text > :nth-child(3) { animation-delay: 0.24s; }
html.js .hero-slider .is-active .hero-slide__media { animation: ff-rise 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@media (prefers-reduced-motion: reduce) {
    html.js .hero-slider .hero-slide__text > * { opacity: 1; animation: none; }
    html.js .hero-slider .is-active .hero-slide__media { animation: none; }
}
.hero-slide__title {
    color: #fff;
    font-size: clamp(2rem, 3.6vw, 3.25rem);
    line-height: 1.12;
    margin-bottom: 22px;
}
.hero-slide__text p {
    font-size: 1.0625rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Overlay layout: full-bleed photo, text on the left */
.hero-slide--overlay .hero-slide__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-slide--overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 45%, rgba(0,0,0,0.05) 100%);
}
.hero-slide--overlay .hero-slide__text {
    text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}

/* Split layout: image left, text right on a blue sweep */
.hero-slide--split {
    background: linear-gradient(100deg, var(--sky) 0%, #4e8fc2 45%, var(--navy) 100%);
}
.hero-slide--split .hero-slide__inner {
    gap: 56px;
    justify-content: space-between;
}
.hero-slide--split .hero-slide__media {
    flex: 0 0 42%;
    display: flex;
    justify-content: center;
    align-self: stretch;
    align-items: flex-end;
}
.hero-slide--split .hero-slide__media img {
    max-height: calc(var(--hero-h) - 40px);
    width: auto;
    filter: drop-shadow(0 24px 40px rgba(0,0,0,0.4));
}
.hero-slide--split .hero-slide__text { flex: 1 1 auto; max-width: 520px; }

/* Arrows: thin chevrons at the viewport edges */
.hero-slider .splide__arrow {
    width: 56px;
    height: 120px;
    background: none;
    border: 0;
    opacity: 0.85;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    transition: opacity 0.2s;
}
.hero-slider .splide__arrow:hover { opacity: 1; }
.hero-slider .splide__arrow svg { width: 28px; height: 80px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.hero-slider .splide__arrow--prev { left: 12px; }
.hero-slider .splide__arrow--next { right: 12px; }
.hero-slider .splide__arrow:disabled { opacity: 0.25; }

/* Dots: mobile only (arrows overlap the text there) */
.hero-slider .splide__pagination {
    display: none;
    bottom: 60px;
    padding: 0;
    gap: 4px;
}
.hero-slider .splide__pagination__page {
    width: 10px;
    height: 10px;
    margin: 0 4px;
    background: rgba(255,255,255,0.45);
    opacity: 1;
    border: 0;
    border-radius: 50%;
    transform: none;
    transition: background 0.2s;
}
.hero-slider .splide__pagination__page.is-active {
    background: #fff;
    transform: none;
}

/* ── Pillars (callout cards) ── */
.pillars {
    position: relative;
    z-index: 3;
    padding-bottom: 56px;
}
.pillars__card {
    margin-top: -64px;
    padding: 44px 48px 48px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(20,55,84,0.08);
}
.pillars__card > h2 { margin-bottom: 36px; }
.pillars__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.pillar {
    display: flex;
    flex-direction: column;
    color: var(--blue);
}
.pillar__icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 22px;
}
.pillar h3 { margin-bottom: 14px; }
.pillar p { line-height: 1.6; margin-bottom: 18px; }
.pillar .lpf-more { margin-bottom: 32px; }
.pillar__image {
    margin-top: auto;
    display: block;
    border-radius: 4px;
    overflow: hidden;
}
.pillar__image img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.pillar__image:hover img { transform: scale(1.03); }

/* ── Featured story ── */
.featured {
    background: var(--sky);
    color: #fff;
    padding: 56px 0 72px;
    margin-bottom: 56px;
}
.featured__heading {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #fff;
    margin-bottom: 40px;
}
.featured__heading img { width: 52px; height: 52px; object-fit: contain; }
.featured__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}
.featured__image {
    display: block;
    border-radius: 6px;
    overflow: hidden;
}
.featured__image img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}
.featured__text { padding-top: 8px; }
.featured__text h3 {
    color: #fff;
    font-size: 1.625rem;
    margin-bottom: 18px;
}
.featured__text h3 a { text-decoration: none; }
.featured__text h3 a:hover { text-decoration: underline; }
.featured__text p { margin-bottom: 18px; }

/* ── Rich text section ── */
.rich-text { padding: 64px 0; }
.rich-text--grey { background: var(--grey); }
.rich-text .entry-content { padding: 0; }
.rich-text--wide .entry-content { max-width: none; }

/* ── Image + text (quarter / three-quarter split) ── */
.image-text { padding: 64px 0; }
.image-text--grey { background: var(--grey); }
.image-text__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 48px;
    align-items: start;
}
.image-text--right .image-text__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.image-text--right .image-text__media { order: 2; }
.image-text__media { max-width: min(100%, var(--img-w, 100%)); }
.image-text__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}
.image-text__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding: 15px 20px;
    background: var(--blue);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 2px 0 rgba(20, 55, 84, 0.25);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.image-text__btn svg { width: 26px; height: 12px; flex: none; transition: transform 0.2s; }
.image-text__btn:hover,
.image-text__btn:focus-visible {
    background: var(--navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(20, 55, 84, 0.25);
}
.image-text__btn:hover svg { transform: translateX(4px); }
.image-text__media img + .image-text__btn { margin-top: 16px; }
.image-text__body { padding: 0; max-width: none; }
.image-text__body > :first-child { margin-top: 0; }

/* ── Responsive ── */
@media (max-width: 1200px) {
    .pillars__card { padding: 36px 36px 40px; }
    .pillars__grid { gap: 28px; }
}

@media (max-width: 768px) {
    .hero-slider { --hero-h: 520px; }
    .hero-slide__inner { padding-top: 40px; padding-bottom: 88px; }
    .hero-slide--overlay::after {
        background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.6) 60%);
    }
    .hero-slide--overlay .hero-slide__inner { align-items: flex-end; }
    .hero-slide--split .hero-slide__inner { flex-direction: column; justify-content: center; gap: 24px; }
    .hero-slide--split .hero-slide__media { flex: none; align-items: center; }
    .hero-slide--split .hero-slide__media img { max-height: 240px; }
    .hero-slider .splide__arrow { display: none; }
    .hero-slider .splide__pagination { display: flex; }
    .pillars__card { margin-top: -48px; padding: 32px 24px 36px; }
    .pillars__grid { grid-template-columns: 1fr; gap: 40px; }
    .pillar .lpf-more { margin-bottom: 22px; }
    .featured { padding: 44px 0 56px; margin-bottom: 40px; }
    .featured__grid { grid-template-columns: 1fr; gap: 28px; }
    .rich-text { padding: 44px 0; }
    .image-text { padding: 44px 0; }
    .image-text__grid, .image-text--right .image-text__grid { grid-template-columns: 1fr; gap: 28px; }
    .image-text--right .image-text__media { order: 0; }
    .image-text__media { max-width: min(320px, var(--img-w, 320px)); }
}

@media (max-width: 480px) {
    .hero-slider { --hero-h: 480px; }
    .hero-slide__title { margin-bottom: 14px; }
    .hero-slide__text p { font-size: 1rem; }
    .featured__heading img { width: 40px; height: 40px; }
}
