/* ==========================================================================
   Offices page (page-offices.php)
   ========================================================================== */

.offices__container {
    max-width: var(--page-max, 1440px);
    margin: 0 auto;
    padding: 4rem var(--page-gutter, 4rem) 6rem;
    box-sizing: border-box;
}

.offices__intro {
    max-width: 50rem;
    margin-bottom: 3rem;
    color: #001E5A;
}

.offices__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1.5rem;
}

.office-card {
    display: flex;
    flex-direction: column;
    background: #EEF0F3;
    border-radius: 0.5rem;
    overflow: hidden;
    /* Footer links jump here - keep the title clear of the sticky header. */
    scroll-margin-top: calc(var(--header-height, 7.6875rem) + 1.5rem);
    transition: box-shadow 0.3s ease;
}

/* Highlight the office the visitor jumped to from the footer. */
.office-card:target {
    box-shadow: inset 0 0 0 2px #FF7D00;
}

.office-card__image img {
    display: block;
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.office-card__body {
    padding: 1.75rem;
    color: #001E5A;
    font-family: Swiza, sans-serif;
}

.office-card__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.office-card__arrow {
    width: 0.75rem;
    height: 0.9rem;
    flex: 0 0 auto;
    background: url('../images/orange-arrow.svg') center / contain no-repeat;
}

.office-card__country {
    margin: 0.25rem 0 1.25rem;
    color: #5270A3;
    font-size: 1rem;
}

.office-card__text {
    margin: 0 0 1rem;
    line-height: 1.5rem;
}

.office-card__address {
    font-style: normal;
    line-height: 1.5rem;
    margin-bottom: 1rem;
}

.office-card__contact {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    line-height: 1.75rem;
}

.office-card__contact a,
.office-card__map {
    color: #001E5A;
    text-decoration: none;
}

.office-card__contact a:hover,
.office-card__map:hover {
    color: #FF7D00;
}

.office-card__map {
    display: inline-block;
    font-weight: 600;
    border-bottom: 2px solid #FF7D00;
}

@media (max-width: 768px) {
    .offices__container {
        padding: 2.5rem 1.25rem 4rem;
    }

    .office-card {
        scroll-margin-top: calc(var(--mobile-header-height, 3.875rem) + 1rem);
    }
}

/* Footer office links (desktop + mobile) */
.footer-offices a,
.footer-mobile-offices a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-offices a:hover,
.footer-mobile-offices a:hover {
    color: #FF7D00;
}

/* Support page (page-support.php) - reuses the office cards */
.support-card .office-card__body {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.support-card .office-card__title {
    margin-bottom: 1rem;
}

.support-card__link {
    align-self: flex-start;
    margin-top: auto;
}

@media (min-width: 1024px) {
    .support__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
