/* Global module - Programme Shapes ("Pick the shape that fits your team") */

/* Section background (ACF: Section Background) */
.el-shapes.is-bg-grey {
    background: #e6eaee;
}

.el-shapes.is-bg-white {
    background: var(--el-color-white);
}

.el-shapes.is-bg-navy {
    background: var(--el-color-blue-dark);
}

.el-shapes-title {
    margin: 0;
    text-align: center;
    color: var(--el-color-heading);
}

/* Rows. A row with its own background (ACF: Row Background) becomes a rounded box
   that runs past the content width, like the navy row in the design. */
.el-shapes-row {
    padding-block: clamp(40px, 4.4vw, 85px);
}

.el-shapes-row.is-bg-none:last-child {
    padding-bottom: 0;
}

.el-shapes-row.is-bg-navy,
.el-shapes-row.is-bg-white {
    margin-inline: clamp(0px, 1.6vw, 30px);
    padding-block: clamp(56px, 7vw, 135px);
    border-radius: clamp(28px, 3vw, 60px);
}

.el-shapes-row.is-bg-navy {
    background: var(--el-color-blue-dark);
}

.el-shapes-row.is-bg-white {
    background: var(--el-color-white);
}

.el-shapes-row:last-child.is-bg-navy,
.el-shapes-row:last-child.is-bg-white {
    margin-bottom: 0;
}

.el-shapes-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(40px, 12vw, 230px);
}

.el-shapes-row.is-media-left .el-shapes-media {
    order: -1;
}

/* Number + label pill */
.el-shapes-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(28px, 2.6vw, 48px);
}

.el-shapes-num {
    /* Playfair old-style "01" has no tall strokes, so its ink sits ~0.175em below centre.
       Extra bottom padding (2 x 0.175em) lifts it to the visual centre. */
    padding: 0 18px 0.35em;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-family: var(--el-font-heading);
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 36px;
    opacity: 0.85;
}

.el-shapes-pill {
    display: inline-flex;
    align-items: center;
    gap: clamp(20px, 1.8vw, 34px);
    padding: 8px 8px 8px clamp(24px, 2.1vw, 40px);
    border-radius: 999px;
    background: var(--el-color-white);
    font-family: var(--el-font-heading);
    font-size: clamp(24px, 1.8vw, 34px);
    line-height: 1.2;
    color: var(--el-color-navy);
}

.el-shapes-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: clamp(56px, 4vw, 78px);
    height: clamp(56px, 4vw, 78px);
    border-radius: 50%;
    background: #0d2236;
    color: var(--el-color-white);
}

.el-shapes-icon img {
    width: 50%;
    height: 50%;
    object-fit: contain;
}

/* Text */
.el-shapes-content {
    color: var(--el-color-navy);
}

.el-shapes-item-title {
    max-width: 590px;
    margin: 0 0 20px;
}

.el-shapes-text {
    max-width: 618px;
    margin: 0;
    font-size: clamp(17px, 1.1vw, 21px);
    line-height: 1.5;
    color: var(--el-color-muted);
}

.el-shapes-list {
    display: grid;
    gap: clamp(12px, 0.95vw, 18px);
    margin: clamp(24px, 2vw, 36px) 0 0;
    padding: 0;
    list-style: none;
    font-size: clamp(17px, 1.1vw, 21px);
    color: var(--el-color-muted);
}

.el-shapes-list li {
    display: flex;
    gap: 12px;
}

.el-shapes-list li::before {
    content: "\2014";
    flex-shrink: 0;
    color: var(--el-color-orange);
}

.el-shapes-content .el-link-arrow {
    margin-top: clamp(24px, 2.2vw, 40px);
    color: var(--el-color-heading); /* orange text is 4.28:1 on the grey section, so navy text + orange arrow */
}

.el-shapes-content .el-link-arrow::after {
    background: var(--el-color-orange-text); /* an icon needs 3:1: 4.28:1 on grey */
}

/* Navy rows (or plain rows in a navy section): white text (11.6:1), bright orange arrow (3.59:1). */
.el-shapes-row.is-bg-navy .el-shapes-content .el-link-arrow,
.el-shapes.is-bg-navy .el-shapes-row.is-bg-none .el-shapes-content .el-link-arrow {
    color: var(--el-color-white);
}

.el-shapes-row.is-bg-navy .el-shapes-content .el-link-arrow::after,
.el-shapes.is-bg-navy .el-shapes-row.is-bg-none .el-shapes-content .el-link-arrow::after {
    background: var(--el-color-orange);
}

/* Media: one photo, or a panel of 2-3 photos side by side */
.el-shapes-photo {
    overflow: hidden;
    border-radius: clamp(24px, 2.1vw, 40px);
    background: #cfd8e0;
}

.el-shapes-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.el-shapes-media:not(.is-gallery) .el-shapes-photo {
    aspect-ratio: 628 / 404;
}

.el-shapes-media.is-gallery {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 4px;
    padding: clamp(20px, 3vw, 58px) clamp(12px, 1.4vw, 26px);
    border-radius: clamp(24px, 2.1vw, 40px);
    background: rgba(27, 58, 95, 0.08);
}

.el-shapes-media.is-gallery .el-shapes-photo {
    aspect-ratio: 187 / 295;
    border-radius: clamp(16px, 1.3vw, 24px);
}

/* Light text on navy (navy row, or a navy section with rows left as "None") */
.el-shapes-row.is-bg-navy .el-shapes-content,
.el-shapes.is-bg-navy .el-shapes-row.is-bg-none .el-shapes-content,
.el-shapes.is-bg-navy .el-shapes-title {
    color: var(--el-color-white);
}

.el-shapes-row.is-bg-navy .el-shapes-text,
.el-shapes-row.is-bg-navy .el-shapes-list,
.el-shapes.is-bg-navy .el-shapes-row.is-bg-none .el-shapes-text,
.el-shapes.is-bg-navy .el-shapes-row.is-bg-none .el-shapes-list {
    color: rgba(255, 255, 255, 0.88);
}

.el-shapes-row.is-bg-navy .el-shapes-media.is-gallery,
.el-shapes.is-bg-navy .el-shapes-row.is-bg-none .el-shapes-media.is-gallery {
    background: rgba(255, 255, 255, 0.1);
}

.el-shapes-row.is-bg-navy .el-shapes-photo,
.el-shapes.is-bg-navy .el-shapes-row.is-bg-none .el-shapes-photo {
    background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 991px) {
    .el-shapes-grid {
        grid-template-columns: 1fr;
    }

    /* Text first, then the photos, on every row. */
    .el-shapes-row.is-media-left .el-shapes-media {
        order: 0;
    }
}

/* Phones: number and pill stay on one line; a long label wraps inside the pill. */
@media (max-width: 575px) {
    .el-shapes-badge {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .el-shapes-num {
        flex-shrink: 0;
        min-width: 54px;
        height: 30px;
        padding: 0 12px 0.35em;
        font-size: 20px;
    }

    .el-shapes-pill {
        min-width: 0;
        gap: 14px;
        padding: 6px 6px 6px 18px;
        font-size: 20px;
    }

    .el-shapes-icon {
        width: 44px;
        height: 44px;
    }
}

/* Icon drawn at ~58% of its circle, as in the design. */
.el-shapes-icon svg {
    width: 58%;
    height: 58%;
}

/* The navy row's text block is narrower in the design. */
.el-shapes-row.is-bg-navy .el-shapes-text {
    max-width: 590px;
}
