
.offices {
    --o-r: 8px;
    --o-card: #0c0c0e;
    --o-map: #101013;
    --o-road: rgba(255, 255, 255, .085);
    --o-street: rgba(255, 255, 255, .04);
    --o-line: rgba(255, 255, 255, .1);
    --o-text: #f5f5f7;
    --o-text-2: #a1a1a6;
    --o-pin: #f5f5f7;
    --o-btn: #f5f5f7;
    --o-btn-text: #0a0a0b;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    text-align: start;
}

.o-ai .offices {
    --o-r: 4px;
}

html[data-theme="light"] .offices {
    --o-card: #ffffff;
    --o-map: #f2f2f5;
    --o-road: rgba(0, 0, 0, .09);
    --o-street: rgba(0, 0, 0, .045);
    --o-line: rgba(0, 0, 0, .1);
    --o-text: #1d1d1f;
    --o-text-2: #5e5e62;
    --o-pin: #1d1d1f;
    --o-btn: #1d1d1f;
    --o-btn-text: #ffffff;
}

@media (min-width: 860px) {
    .offices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

.offices .office {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--o-line);
    border-radius: var(--o-r);
    background: var(--o-card);
    color: var(--o-text);
}

.offices .office-map {
    position: relative;
    aspect-ratio: 16 / 10;
    border-bottom: 1px solid var(--o-line);
    background: var(--o-map);
}

.offices .office-map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.offices .office-map-ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    text-align: center;
    background:
        linear-gradient(118deg, transparent 0 41%, var(--o-road) 41% calc(41% + 7px), transparent 0),
        linear-gradient(28deg, transparent 0 63%, var(--o-road) 63% calc(63% + 5px), transparent 0),
        linear-gradient(172deg, transparent 0 22%, var(--o-road) 22% calc(22% + 4px), transparent 0),
        repeating-linear-gradient(90deg, var(--o-street) 0 1px, transparent 1px 46px),
        repeating-linear-gradient(0deg, var(--o-street) 0 1px, transparent 1px 46px),
        radial-gradient(60% 70% at 50% 45%, transparent 40%, var(--o-map) 100%),
        var(--o-map);
}

.offices .office-map-ph[hidden] {
    display: none;
}

.offices .office-pin {
    width: 30px;
    height: 30px;
    color: var(--o-pin);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35));
}

.offices .office-map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: min(var(--o-r), 6px);
    background: var(--o-btn);
    color: var(--o-btn-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}

.offices .office-map-btn:hover {
    opacity: .9;
}

.offices .office-map-btn:active {
    transform: scale(.98);
}

.offices .office-map-btn:focus-visible {
    outline: 2px solid var(--o-pin);
    outline-offset: 3px;
}

.offices .office-map-note {
    max-width: 34ch;
    margin: 0;
    color: var(--o-text-2);
    font-size: 12.5px;
    line-height: 1.5;
}

.offices .office-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 22px 24px 24px;
}

.offices .office-city {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin: 0;
    color: var(--o-text);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.offices .office-city span {
    color: var(--o-text-2);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
}

.offices .office-name {
    margin: 4px 0 0;
    color: var(--o-text);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.5;
}

.offices .office-addr {
    margin: 0;
    color: var(--o-text-2);
    font-size: 14.5px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.offices .office-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 12px;
    color: var(--o-text);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
}

.offices .office-link svg {
    flex: none;
    width: 16px;
    height: 16px;
    transition: transform .2s ease;
}

.offices .office-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.offices .office-link:hover svg {
    transform: translate(2px, -2px);
}

html[dir="rtl"] .offices .office-link svg {
    transform: scaleX(-1);
}

html[dir="rtl"] .offices .office-link:hover svg {
    transform: scaleX(-1) translate(2px, -2px);
}

.office-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 520px) {
    .offices .office-body {
        padding: 18px 18px 20px;
    }

    .offices .office-map {
        aspect-ratio: 4 / 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .offices .office-map-btn,
    .offices .office-link svg {
        transition: none;
    }
}
