/* ============================================================
   Areas Served — "Diagonal Dark Band" (Option C)
   Ported from the design-system prototype onto theme tokens:
   --secondary = red, --tertiary = yellow, --primary = ink.
   ============================================================ */

.areas-served {
    background: var(--secondary);
    position: relative;
    overflow: hidden;
    /* thin horizontal padding = the red sliver that shows at the far left/right;
       the dark panel fills everything inside it */
    padding: 0 clamp(14px, 1.4vw, 26px);
}

.areas-served__panel {
    /* stretch the dark band nearly edge-to-edge so red only peeks at the sides */
    width: 100%;
    background: linear-gradient(90deg, var(--black) 0%, var(--primary) 100%);
    /* parallel diagonals: cut the bottom-left and top-right corners so both
       edges lean the same way (parallelogram), red slivers slanting in parallel */
    clip-path: polygon(0 0, 97% 0, 100% 100%, 3% 100%);
    padding: clamp(56px, 7vw, 86px) 0 clamp(40px, 5.5vw, 62px);
}

.areas-served__wrap {
    /* The theme's .section-wrap is a wrapping flexbox; force block flow so the
       head, columns and CTA stack vertically (otherwise the CTA wraps up beside
       the columns instead of sitting at the bottom). */
    display: block;
    padding-left: clamp(44px, 6%, 96px);
}

/* ---------- head ---------- */
.areas-served__disc {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--secondary);
    border: 5px solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 22px 0 #00000070;
    /* positive bottom margin so the eyebrow clears the disc (was -10px, which
       pulled the eyebrow up into the circle) */
    margin: 0 auto 14px;
}

.areas-served__disc .icon {
    width: 40px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.areas-served__disc .icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.areas-served__disc .icon svg *,
.areas-served__disc .icon svg path {
    fill: var(--white);
}

.areas-served__head {
    text-align: center;
    margin-bottom: clamp(26px, 3.6vw, 40px);
}

.areas-served__eyebrow {
    color: var(--tertiary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 13px;
    margin: 0;
}

.areas-served__title {
    margin: 10px 0 0;
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 700;
    color: var(--white);
}

/* ---------- region columns ---------- */
.areas-served__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px 44px;
}

/* Left pin-gutter: indent the whole column by the gutter so the region name
   and every city share one text edge, and the pin hangs back into the gutter.
   Result: linked (pinned) and unlinked cities line up (e.g. Sun Lakes / Tempe). */
.areas-served__region {
    padding-left: 22px;
}

.areas-served__region-name {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tertiary);
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

/* ---------- cities ---------- */
/* All city text is white. Linked cities get a yellow pin; unlinked
   cities are plain white text with no icon. */
.areas-served__city {
    display: flex;
    align-items: center;
    padding: 5px 0;
    font-size: 14.5px;
    line-height: 1.25;
    font-weight: 500;
    color: var(--white);
}

.areas-served__city--linked {
    text-decoration: none;
    transition: color 0.2s ease;
}

.areas-served__city--linked:hover {
    color: var(--tertiary);
}

.areas-served__pin {
    width: 14px;
    height: 17px;
    /* hang the pin back into the column's left gutter (22px = pin 14 + gap 8)
       so the city text starts at the same edge whether or not there's a pin */
    margin-left: -22px;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.areas-served__pin .icon {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.areas-served__pin .icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.areas-served__pin .icon svg *,
.areas-served__pin .icon svg path {
    fill: var(--tertiary);
}

/* ---------- cta ---------- */
/* Buttons render via generate_button_row() using the theme's .btn styles
   (.btn--white matches the mockup's white pill that inverts on hover).
   .button-row already centers itself, so this only needs the top margin. */
.areas-served__cta {
    margin-top: clamp(26px, 3.4vw, 38px);
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
    .areas-served__cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .areas-served__cols {
        grid-template-columns: 1fr;
    }

    .areas-served__panel {
        clip-path: none;
    }

    .areas-served__wrap {
        padding-left: 16px;
    }
}
