/**
 * In Action Section Block Styles
 *
 * Full-width white background section with a centred title + underline accent,
 * a responsive video embed container, and a play-button overlay.
 *
 * @package ACF Child Theme
 */

:root {
    --color-yellow: #e3cd51;
    --color-light: #e7e9ed;
    --color-text: #595959;
    --color-teal: #375663;
    --color-white: #ffffff;
    --font-primary: 'Aptos', sans-serif;
}

/* ── Section Wrapper — full-width white background ───────────────────────── */
.ias-section {
    width: 100%;
    background-color: var(--color-white, #ffffff);
    padding: 70px 0;
    margin-bottom: 0 !important;
}

/* ── Content Container — WordPress layout width ──────────────────────────── */
.ias-section__container {
    max-width: var(--theme-normal-container-max-width, 1290px);
    width: var(--theme-container-width, 100%);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Header: title + underline ───────────────────────────────────────────── */
.ias-section__header {
    text-align: center;
    margin-bottom: 48px;
    display: none;
}

.ias-section__title {
    font-family: var(--font-primary, 'Aptos', sans-serif);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text, #595959);
    line-height: 1.25;
    letter-spacing: 0.3px;
    margin: 0 0 14px 0;
}

/* Coloured underline accent — colour driven by inline style from ACF colour picker */
.ias-section__underline {
    width: 60px;
    height: 4px;
    background-color: #54b141; /* overridden by inline style */
    margin: 0 auto;
}

/* ── Video Container ─────────────────────────────────────────────────────── */
.ias-section__video-wrap {
    width: 100%;
    max-width: 860px;
    border: 1px solid #d8dce3;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--color-white, #ffffff);
}

/* Inner wrapper creates the 16:9 aspect ratio for iFrame / oEmbed */
.ias-section__video-inner {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
}

.ias-section__video-inner iframe,
.ias-section__video-inner embed,
.ias-section__video-inner object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* WordPress oEmbed wraps the iframe in a .wp-block-embed__wrapper div */
.ias-section__video-inner .wp-block-embed__wrapper,
.ias-section__video-inner .wp-video,
.ias-section__video-inner .mejs-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Native <video> element — fills the aspect-ratio box */
.ias-section__video-native {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    display: block;
}

/* ── Play Overlay ─────────────────────────────────────────────────────────── */
.ias-section__play-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white, #ffffff);
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.ias-section__play-overlay:focus-visible {
    outline: 3px solid #54b141;
    outline-offset: -3px;
}

.ias-section__play-icon {
    width: 300px;
    height: 300px;
    display: block;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.ias-section__play-overlay:hover .ias-section__play-icon {
    transform: scale(1.08);
}

/* Dismissed state — fade out then remove from interaction */
.ias-section__play-overlay--hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── Tablet ───────────────────────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1023px) {
    .ias-section {
        padding: 56px 0;
    }

    .ias-section__title {
        font-size: 1.875rem;
    }

    .ias-section__header {
        margin-bottom: 40px;
    }

    .ias-section__video-wrap {
        max-width: 100%;
    }

    .ias-section__play-icon {
        width: 200px;
        height: 200px;
    }
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ias-section {
        padding: 40px 0;
    }

    .ias-section__title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .ias-section__header {
        margin-bottom: 32px;
    }

    .ias-section__underline {
        width: 48px;
        height: 3px;
    }

    .ias-section__video-wrap {
        max-width: 100%;
        border-radius: 6px;
    }

    .ias-section__play-icon {
        width: 160px;
        height: 160px;
    }
}
