/* ==========================================================================
   Contact / Location pages (loads on /contact-us/ and every office child)
   The shared svc- hero / split / card patterns live in main.css; this file
   holds the office-specific blocks: contact details, map, doctors, gallery.
   ========================================================================== */

/* ---- Contact details + map ---------------------------------------------- */
.office-info__inner {
    gap: 30px clamp(32px, 5vw, 56px);
    align-items: stretch;
}

.office-info__panel {
    padding: clamp(28px, 4vw, 44px);
    background-color: var(--color-white);
    border-top: 4px solid var(--color-gold);
    box-shadow: var(--shadow-card);
}

.office-info__panel h2 {
    margin: 0 0 0.8em;
    color: var(--color-navy);
}

.office-details {
    display: grid;
    gap: 1.1em;
    padding: 0;
    margin: 0 0 1.8em;
    list-style: none;
}

.office-detail {
    display: flex;
    gap: 0.9em;
    align-items: flex-start;
}

.office-detail__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    color: var(--color-gold-dark);
}

.office-detail__label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-navy);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.office-detail__value {
    display: block;
    margin-top: 0.15em;
    color: var(--color-text);
}

.office-detail__value a {
    color: var(--color-gold-dark);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-base) ease;
}

.office-detail__value a:hover,
.office-detail__value a:focus-visible {
    border-bottom-color: var(--color-gold-dark);
}

.office-info__map {
    min-height: 340px;
}

.office-info__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 340px;
    border: 0;
}

/* ---- Doctors at this office --------------------------------------------- */
/* Single narrow column, centred — one card per row. */
.office-doctors__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(20px, 3vw, 32px);
    max-width: 850px;
    padding: 0;
    margin-inline: auto;
    list-style: none;
}

.office-doctor {
    display: grid;
    grid-template-columns: minmax(0, 300px) 1fr;
    align-items: center;
    background-color: var(--color-white);
    border-top: 4px solid var(--color-gold);
    box-shadow: var(--shadow-card);
}

.office-doctor__media {
    height: 100%;
}

/* Square photo, capped at 300px wide. */
.office-doctor__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.office-doctor__body {
    align-self: center;
    padding: clamp(24px, 3vw, 36px);
}

.office-doctor__name {
    margin: 0 0 0.2em;
    color: var(--color-navy);
}

.office-doctor__role {
    margin: 0 0 1em;
    font-weight: 700;
    color: var(--color-gold-dark);
}

.office-doctor__text {
    margin: 0 0 1.4em;
    color: var(--color-text);
}

@media (max-width: 520px) {
    .office-doctor {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    /* Stays square, capped at 300px and centred when the card stacks. */
    .office-doctor__media {
        width: 100%;
        max-width: 300px;
    }
}

/* ---- Office gallery slider ---------------------------------------------- */
.gallery-slider {
    position: relative;
}

/* The track: a horizontal scroll-snap strip. Works on its own (touch/trackpad);
   the arrows and dots are progressive enhancement added by main.js. */
.office-gallery {
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}

.office-gallery::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Three across on desktop (two 16px gaps), two on tablet, one-with-peek on phone. */
.office-gallery > li {
    flex: 0 0 calc((100% - 32px) / 3);
    scroll-snap-align: start;
}

.office-gallery__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
    .office-gallery {
        scroll-behavior: auto;
    }
}

@media (max-width: 900px) {
    .office-gallery > li {
        flex-basis: calc((100% - 16px) / 2);
    }
}

@media (max-width: 560px) {
    .office-gallery > li {
        flex-basis: 85%;
    }
}

/* Arrows */
.gallery-slider__arrow {
    position: absolute;
    top: calc(50% - 30px); /* centre on the images, above the dots row */
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--color-white);
    cursor: pointer;
    background-color: var(--color-navy);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgb(var(--shadow-rgb) / 0.25);
    transform: translateY(-50%);
    transition:
        background-color var(--transition-base) ease,
        opacity var(--transition-base) ease;
}

.gallery-slider__arrow:hover:not(:disabled),
.gallery-slider__arrow:focus-visible:not(:disabled) {
    background-color: var(--color-gold-dark);
}

.gallery-slider__arrow:disabled {
    pointer-events: none;
    opacity: 0;
}

.gallery-slider__arrow svg {
    width: 22px;
    height: 22px;
}

.gallery-slider__arrow--prev {
    left: -12px;
}

.gallery-slider__arrow--next {
    right: -12px;
}

/* Dots */
.gallery-slider__dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.gallery-slider__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    cursor: pointer;
    background-color: rgb(var(--shadow-rgb) / 0.2);
    border: 0;
    border-radius: 50%;
    transition:
        background-color var(--transition-base) ease,
        transform var(--transition-base) ease;
}

.gallery-slider__dot[aria-current="true"] {
    background-color: var(--color-gold);
    transform: scale(1.3);
}
