/* ============================================
   SECTION: Center — Our Network
   Header + full-width map card + scrollable row of location cards.
   ============================================ */

.center-network {
    position: relative;
    padding: 72px var(--section-side-padding) 100px;
    background: var(--color-accent-yellow-bg-soft, #fdf8ec)
        url("../../../images/decorative/gold-swirl-6-2.2f8c97dd6c24.svg") no-repeat top right;
    overflow: hidden;
}

.center-network__inner {
    position: relative;
    z-index: 1;
    max-width: var(--container-max);
    margin-inline: auto;
}

/* ----- Header ----- */
.center-network__head {
    max-width: 484px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.center-network__head .eyebrow {
    margin: 0;
}
.center-network__title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: var(--font-weight-normal);
    line-height: 50px;
    letter-spacing: -1px;
    color: var(--color-text-heading);
    margin: 0;
}
.center-network__title .accent-script {
    letter-spacing: -0.03em;
    color: var(--color-primary);
}

/* ----- Map ----- */
.center-network__map {
    position: relative;
    height: 536px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--color-surface-line-soft);   /* #f6f6f6 */
    background: var(--color-white);
}
.center-network__map-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    transition: opacity var(--transition-fast);
}
/* Brief dip while the embed reloads onto the newly active location */
.center-network__map.is-loading .center-network__map-frame {
    opacity: 0.55;
}

/* ----- Pin card: the active location's photo, over the map ----- */
.center-network__pin {
    position: absolute;
    z-index: 2;
    left: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--color-white);
    border: 2px solid var(--color-primary-light);   /* #ffebf0 */
    border-radius: 12px;
    box-shadow: 0 11px 14px rgba(234, 98, 126, 0.12);
    pointer-events: none;   /* never blocks panning the map */
}
.center-network__pin[hidden] {
    display: none;
}

.center-network__pin-photo {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-primary-light);
    display: block;
}
.center-network__pin-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.center-network__pin-photo img[hidden] {
    display: none;
}

.center-network__pin-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.center-network__pin-name {
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    line-height: 24px;
    color: var(--color-text-heading);
}
.center-network__pin-addr {
    font-size: 14px;
    line-height: 20px;
    color: #3e2e2d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ----- Carousel ----- */
.center-network__carousel {
    position: relative;
    margin-top: 20px;
}
.center-network__row {
    list-style: none;
    margin: 0;
    padding: 8px 4px;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.center-network__row::-webkit-scrollbar {
    display: none;
}
.center-network__arrow {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-white);
    border: 2px solid var(--color-primary-light);
    box-shadow: var(--shadow-card);
    color: var(--color-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast), opacity var(--transition-fast);
}
.center-network__arrow:hover {
    background: var(--color-primary-light);
}
.center-network__arrow--prev {
    left: 0;
}
.center-network__arrow--next {
    left: auto;
    right: 0;
    transform: translate(50%, -50%);
}
.center-network__arrow[hidden] {
    display: none;
}
.center-network__arrow:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}

/* ----- Location card ----- */
.center-network__item {
    flex: 0 0 400px;
    max-width: 88vw;
    scroll-snap-align: start;
}
.loc-card {
    display: flex;
    width: 100%;
    height: 154px;
    background: var(--color-white);
    border: 2px solid var(--color-surface-line-soft);   /* #f6f6f6 */
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow var(--transition-fast);
}
.loc-card:hover {
    box-shadow: var(--shadow-card);
}

/* The card the map is currently showing */
.center-network__item.is-active .loc-card {
    border-color: var(--color-primary);
    box-shadow: 0 11px 14px rgba(234, 98, 126, 0.12);
}

/* Scroll-position bars — phones only (arrows take over above) */
.center-network__bars {
    display: none;
    gap: 7px;
    margin-top: 24px;
}
.center-network__bar {
    flex: 1 1 0;
    height: 4px;
    border-radius: 100px;
    background: var(--color-primary-light);
    transition: background-color var(--transition-fast);
}
.center-network__bar.is-active {
    background: var(--color-primary);
}
.loc-card__photo {
    width: 170px;
    height: 100%;
    flex-shrink: 0;
    background: var(--color-primary-light);
}
.loc-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.loc-card__info {
    flex: 1;
    min-width: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}
.loc-card__name {
    font-size: 20px;
    font-weight: var(--font-weight-medium);
    line-height: 32px;
    color: var(--color-text-heading);
}
.loc-card__addr {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}
.loc-card__addr img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.loc-card__addr-text {
    min-width: 0;
    flex: 1;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    line-height: 20px;
    color: #3e2e2d;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Center page only: drop the shared CTA's side padding so it aligns with the
   other center sections. Desktop only — this selector is more specific than
   the shared CTA's own responsive rules, so left unscoped it also wipes the
   side gutter and the padding-bottom that reserves room for the photo once
   the CTA stacks, dropping the copy on top of the image. */
@media (min-width: 901px) {
    .page-center .approach-cta {
        padding: 0;
    }
}

/* Center page only: the location team section sits flush under the Info
   section (no extra top padding). */
.page-center .meet-team {
    padding-top: 0;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .center-network {
        padding: 56px var(--section-side-padding) 64px;
    }
    .center-network__title {
        font-size: 32px;
        line-height: 40px;
    }
    .center-network__map {
        height: 360px;
    }
    .center-network__arrow {
        display: none;
    }
}

/* ----- Phones: position bars stand in for the arrows ----- */
@media (max-width: 600px) {
    .center-network__bars {
        display: flex;
    }
    .center-network__pin {
        left: 12px;
        bottom: 12px;
        max-width: calc(100% - 24px);
        padding: 8px;
        gap: 10px;
    }
    .center-network__pin-photo {
        width: 52px;
        height: 52px;
    }
    .center-network__item {
        flex-basis: min(400px, calc(100vw - 2 * var(--section-side-padding)));
        max-width: calc(100vw - 2 * var(--section-side-padding));
    }
    .loc-card__photo {
        width: 120px;
    }
    .loc-card__info {
        padding: 16px;
    }
    .loc-card__name {
        font-size: 18px;
        line-height: 26px;
    }
    .loc-card__addr-text {
        font-size: 13px;
        line-height: 18px;
    }
}
