/**
 * First Section Block
 *
 * Full-width white section: a split row (plain left + pale right card), a row of
 * two image cards, and a wide pale card with text and an image.
 * Matches child-theme-sections-screenshots/first-section.png
 */

:root {
    --color-navy: #385d8c;
    --color-pale: #eef3f8;
    --color-teal: #93cddc;
    --color-sky:  #d2eaf0;
    --color-text: #787878;
    --color-white: #ffffff;
}

.first-section {
    background-color: var(--color-white);
    font-family: 'Roboto', sans-serif;
    padding: 70px 0;
}

.first-section__container {
    max-width: var(--theme-normal-container-max-width, 1290px);
    width: var(--theme-container-width, 100%);
    margin: 0 auto;
    padding: 0 20px;
}

.first-section__row {
    margin-bottom: 60px;
}

.first-section__row:last-child {
    margin-bottom: 0;
}

/* Shared type */
.fs-title {
    color: var(--color-navy);
    font-weight: 700;
    font-size: 26px;
    line-height: 1.3;
    margin: 0 0 18px;
}

.fs-title--card {
    font-size: 22px;
}

.fs-text {
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.fs-text p {
    color: inherit;
    margin: 0 0 1em;
}

.fs-text p:last-child {
    margin-bottom: 0;
}

/* ---- Buttons (navy primary / teal secondary, per style guide) ---- */
.first-section .btn {
    display: inline-block;
    padding: 14px 34px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.first-section .btn-primary {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.first-section .btn-primary:hover,
.first-section .btn-primary:focus {
    background-color: var(--color-teal);
    color: var(--color-navy);
}

.first-section .btn-secondary {
    background-color: var(--color-teal);
    color: var(--color-navy);
}

.first-section .btn-secondary:hover,
.first-section .btn-secondary:focus {
    background-color: var(--color-navy);
    color: var(--color-white);
}

/* ---- Row 1: split ---- */
.first-section__row--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.fs-col--plain {
    padding: 20px 10px;
}

.fs-card {
    background-color: var(--color-pale);
    border-radius: 14px;
}

.fs-card--pale {
    padding: 45px 50px;
}

/* ---- Row 2: image cards ---- */
.first-section__row--cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.fs-imgcard {
    background-color: var(--color-white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.fs-imgcard__image img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.fs-imgcard__body {
    padding: 30px 35px 40px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Keep the button anchored to the bottom so equal-height cards align */
.fs-imgcard__body .first-section__button {
    margin-top: auto;
    align-self: flex-start;
}

/* ---- Row 3: wide card ---- */
.fs-card--wide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 50px 55px;
}

.fs-card--wide__image {
    overflow: hidden;
}

.fs-card--wide__image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 260px;
    object-fit: cover;
}

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

    .fs-title {
        font-size: 23px;
    }

    .fs-card--pale,
    .fs-card--wide {
        padding: 36px 38px;
    }
}

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

    .first-section__row {
        margin-bottom: 40px;
    }

    .first-section__row--split,
    .first-section__row--cards,
    .fs-card--wide {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .fs-col--plain {
        padding: 0;
    }

    .fs-card--pale {
        padding: 32px 28px;
    }

    .fs-card--wide {
        padding: 30px 26px;
    }

    /* Image sits above the text on the wide card for mobile */
    .fs-card--wide__image {
        order: -1;
    }

    .fs-title {
        font-size: 22px;
    }

    .fs-imgcard__body {
        padding: 26px 26px 32px;
    }
}
