/* ======================================
   CONTACT PAGE - Operational Centers (tabs, search, location cards)
   used by contact.html - every rule is scoped under .moc
====================================== */

/* the section that holds the enquiry form and the centers (the theme gives every <section> 110px of padding) */
.moc-wrap {
    padding: clamp(28px, 4.5vh, 56px) 0 clamp(40px, 6vh, 72px);
}

/* the enquiry form sits under the centers, centered, at a comfortable reading width */
.moc-form {
    max-width: 820px;
    margin: clamp(40px, 5vw, 72px) auto 0;
    padding-top: clamp(32px, 4vw, 56px);
    border-top: 1px solid #e8e8e8;
}

.moc {
    --moc-red: #f12d36;
    --moc-black: #171717;
    --moc-muted: #6b6b6b;
    --moc-line: #e8e8e8;
    --moc-soft: #f7f7f7;
    --moc-pink: #fdecee;
    color: var(--moc-black);
    font-family: "DM Sans", sans-serif;
}

.moc *,
.moc *::before,
.moc *::after {
    box-sizing: border-box;
    font-style: normal;
}

.moc-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.moc-ico {
    display: block;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.moc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- header ---- */
.moc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.moc-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--moc-red);
}

.moc-pill {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--moc-pink);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--moc-red);
}

.moc-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(26px, min(2.6vw, 4.6vh), 36px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--moc-black);
}

.moc .moc-title-ico {
    width: 0.8em;
    height: 0.8em;
    color: var(--moc-red);
    stroke-width: 2.2;
}

.moc-sub {
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--moc-muted);
}

/* ---- tabs + search ---- */
.moc-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: clamp(12px, 2vh, 18px) 0 clamp(10px, 1.8vh, 14px);
    padding-top: clamp(12px, 2vh, 16px);
    border-top: 1px solid var(--moc-line);
}

.moc-bar[hidden],
.moc-card[hidden],
.moc-empty[hidden],
.moc-btn[hidden],
.moc-search-clear[hidden] {
    display: none;
}

.moc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.moc-tab {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: #f1f1f1;
    color: var(--moc-black);
    font: 600 14px/1 "DM Sans", sans-serif;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.moc-tab:hover {
    background: #e6e6e6;
}

.moc-tab:active {
    transform: scale(0.97);
}

.moc-tab[aria-selected="true"] {
    background: var(--moc-red);
    color: #ffffff;
}

.moc-tab:focus-visible,
.moc-btn:focus-visible,
.moc-search-clear:focus-visible,
.moc-lines a:focus-visible,
.moc-go:focus-visible {
    outline: 2px solid var(--moc-black);
    outline-offset: 2px;
}

.moc-count {
    min-width: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--moc-black);
    transition: background-color 0.25s ease, color 0.25s ease;
}

.moc-tab[aria-selected="true"] .moc-count {
    background: var(--moc-black);
    color: #ffffff;
}

.moc-search {
    position: relative;
    flex: 0 1 250px;
    min-width: 190px;
}

.moc .moc-search-ico {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 16px;
    height: 16px;
    color: var(--moc-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.moc-search-input {
    display: block;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 38px 0 38px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    background: #ffffff;
    font: 400 14px/1 "DM Sans", sans-serif;
    color: var(--moc-black);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
}

.moc-search-input::-webkit-search-cancel-button {
    display: none;
}

.moc-search-input::placeholder {
    color: #8a8a8a;
}

.moc-search-input:focus {
    outline: none;
    border-color: var(--moc-red);
    box-shadow: 0 0 0 3px rgba(241, 45, 54, 0.16);
}

.moc-search-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--moc-muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.moc-search-clear:hover {
    background: var(--moc-pink);
    color: var(--moc-red);
}

.moc-search-clear .moc-ico {
    width: 14px;
    height: 14px;
}

/* ---- location cards ---- */
.moc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.moc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 12px 14px 10px;
    border: 1px solid var(--moc-line);
    border-radius: 12px;
    background: #ffffff;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

/* thin red accent on the left edge, drawn in on hover / keyboard focus */
.moc-card::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: -1px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--moc-red);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.moc-card:hover,
.moc-card:focus-within {
    border-color: #d6d6d6;
    box-shadow: 0 12px 26px -16px rgba(23, 23, 23, 0.3);
    transform: translateY(-2px);
}

.moc-card:hover::before,
.moc-card:focus-within::before {
    transform: scaleY(1);
}

.moc-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.moc-pin {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--moc-pink);
    color: var(--moc-red);
    transition: background-color 0.25s ease, color 0.25s ease;
}

.moc-card:hover .moc-pin,
.moc-card:focus-within .moc-pin {
    background: var(--moc-red);
    color: #ffffff;
}

.moc-pin .moc-ico {
    width: 18px;
    height: 18px;
}

.moc-card-title {
    min-width: 0;
}

.moc .moc-name {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--moc-black);
    overflow-wrap: anywhere;
}

.moc-area {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--moc-muted);
    overflow-wrap: anywhere;
}

.moc-lines {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 8px 0 0;
    border-top: 1px solid var(--moc-line);
    list-style: none;
}

.moc-lines li {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.4;
}

.moc-lines .moc-ico {
    width: 14px;
    height: 14px;
    color: var(--moc-red);
}

.moc-lines a {
    min-width: 0;
    color: #3a3a3a;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

.moc-lines a:hover {
    color: var(--moc-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.moc-go {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-end;
    margin-top: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--moc-red);
}

.moc-go .moc-ico {
    width: 12px;
    height: 12px;
    stroke-width: 2.4;
    transition: transform 0.25s ease;
}

.moc-go:hover {
    color: #c81f28;
}

.moc-go:hover .moc-ico {
    transform: translate(2px, -2px);
}

/* ---- result line + empty state ---- */
.moc-status {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--moc-muted);
}

.moc-status:empty {
    display: none;
}

.moc-empty {
    padding: 34px 20px;
    border: 1px dashed #d4d4d4;
    border-radius: 12px;
    background: var(--moc-soft);
    text-align: center;
    animation: moc-fade 0.3s ease both;
}

.moc-empty-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--moc-black);
}

.moc-empty-text {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--moc-muted);
}

.moc-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.moc-btn {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    padding: 10px 16px;
    border: 1.5px solid var(--moc-red);
    border-radius: 999px;
    background: var(--moc-red);
    color: #ffffff;
    font: 600 13.5px/1 "DM Sans", sans-serif;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.moc-btn:hover {
    background: #c81f28;
    border-color: #c81f28;
}

.moc-btn-line {
    background: transparent;
    color: var(--moc-red);
}

.moc-btn-line:hover {
    background: var(--moc-pink);
    border-color: var(--moc-red);
}

@keyframes moc-fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---- responsive ---- */
@media (max-width: 575px) {
    .moc-top {
        flex-wrap: wrap;
    }

    .moc-tabs {
        flex: 1 1 100%;
    }

    .moc-tab {
        flex: 1 1 0;
        justify-content: center;
        padding: 11px 10px;
    }

    .moc-search {
        flex: 1 1 100%;
    }

}

/* tablets and phones: the cards scroll sideways in two rows, so the list stays about one screen tall */
@media (max-width: 1199px) {
    .moc-grid {
        grid-template-columns: none;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        grid-auto-columns: min(300px, 46%);
        margin: 0 -27px;
        padding: 2px 27px 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 27px;
        scrollbar-width: thin;
        scrollbar-color: var(--moc-red) transparent;
    }

    .moc-card {
        scroll-snap-align: start;
    }

    .moc-card:hover,
    .moc-card:focus-within {
        transform: none;
    }
}

@media (max-width: 575px) {
    .moc-grid {
        grid-auto-columns: 84%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .moc-card,
    .moc-card::before,
    .moc-tab,
    .moc-pin,
    .moc-go .moc-ico {
        transition: none;
    }

    .moc-card:hover,
    .moc-card:focus-within {
        transform: none;
    }

    .moc-empty {
        animation: none;
    }
}
