/* ─────────────────────────────────────────
   ZabanBom Contact Page — v3
   375px canvas · ResponsiveScaledBox · RTL
───────────────────────────────────────── */

body.page-contact-v2 {
    --ct-space-1: var(--space-1);
    --ct-space-2: var(--space-2);
    --ct-space-3: var(--space-3);
    --ct-space-4: var(--space-4);
    background: #faf4ec !important;
    color: #241712 !important;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden !important;
}

body.page-contact-v2 main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
}

body.page-contact-v2 #scroll-progress,
body.page-contact-v2 #custom-cursor {
    display: none !important;
}

/* ── Shell ── */
.zb-contact {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: 100%;
    background: #fff8f0;
    direction: rtl;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0 0 calc(var(--ct-space-2) + env(safe-area-inset-bottom, 0px));
}

.zb-contact__viewport {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    padding-top: calc(var(--nav-h, calc(6.5rem + env(safe-area-inset-top, 0px))) + 0.75rem);
}

body.page-contact-v2 .zb-contact__viewport:not([data-ready]) {
    visibility: hidden;
}

.zb-contact__viewport > .zb-scale__stage {
    flex-shrink: 0;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

.zb-contact__canvas {
    width: 375px;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 var(--canvas-padding-x);
    transform-origin: top center;
    will-change: transform;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ct-space-3);
    margin-top: 0;
    margin-bottom: auto;
}

/* ── Header ── */
.zb-contact__header {
    width: 100%;
    text-align: center;
    flex-shrink: 0;
}

.zb-contact__canvas--fill {
    box-sizing: border-box;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.zb-contact__title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.55;
    color: #241712;
    text-align: center;
    flex-shrink: 0;
    padding: 2px 0 4px;
    overflow: visible;
}

.zb-contact__subtitle {
    margin: var(--ct-space-1) 0 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #7a7268;
    display: block;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.zb-contact__divider {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 200px;
    margin: 0 auto;
    flex-shrink: 0;
}

.zb-contact__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c5ad82, transparent);
}

.zb-contact__diamond {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    background: #c9a96e;
    transform: rotate(45deg);
}

/* ── Body sections ── */
.zb-contact__body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ct-space-3);
    flex-shrink: 0;
}

.zb-contact__section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.zb-contact-box {
    width: 100%;
    border-radius: 24px;
    background: #fff8f0;
    border: 1px solid #e8d9c4;
    box-shadow: 0 6px 28px rgba(72, 45, 30, 0.08);
    padding: var(--ct-space-3) var(--ct-space-2);
    box-sizing: border-box;
}

.zb-contact-box--comm {
    display: flex;
    flex-direction: column;
    gap: var(--ct-space-2);
}

.zb-contact-box--address {
    display: flex;
    flex-direction: column;
    gap: var(--ct-space-2);
}

.zb-contact-box__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #c94a30;
    text-align: center;
    letter-spacing: 0.01em;
}

.zb-contact-box__divider {
    height: 1px;
    background: rgba(200, 175, 140, 0.28);
    margin: 4px 0;
}

/* ── Direct contact panel ── */
.zb-contact-panel {
    width: 100%;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(232, 217, 196, 0.65);
    overflow: hidden;
}

.zb-contact-panel__row {
    display: flex;
    direction: ltr;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: #241712;
    border-bottom: 1px solid rgba(200, 175, 140, 0.22);
    transition: background 0.2s ease;
    box-sizing: border-box;
}

.zb-contact-panel__row--last,
.zb-contact-panel__row:last-child {
    border-bottom: none;
}

.zb-contact-panel__row:hover {
    background: rgba(253, 238, 228, 0.55);
    color: #241712;
}

.zb-contact-panel__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fffaf6;
    color: #c94a30;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(39, 24, 16, 0.08);
}

.zb-contact-panel__content {
    flex: 1;
    min-width: 0;
    direction: rtl;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.zb-contact-panel__label {
    font-size: 12px;
    color: #7a7268;
    line-height: 1.3;
}

.zb-contact-panel__value {
    font-size: 15px;
    font-weight: 700;
    color: #241712;
    line-height: 1.35;
}

.zb-contact-panel__arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #d4bfa0;
    color: #8f816f;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.65);
}

/* ── Social grid ── */
.zb-contact-social-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ct-space-2);
    justify-items: center;
}

.zb-contact-social {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ct-space-1);
    padding: 14px 10px;
    border-radius: 18px;
    background: #fff8f0;
    border: 1px solid #e8d9c4;
    box-shadow: 0 4px 18px rgba(72, 45, 30, 0.06);
    text-decoration: none;
    color: #241712;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 88px;
    box-sizing: border-box;
}

.zb-contact-social:hover {
    color: #241712;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(72, 45, 30, 0.12);
}

.zb-contact-social--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: center;
    min-height: 56px;
    padding: 10px 16px;
    gap: var(--ct-space-2);
}

.zb-contact-social__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fdeee4;
    color: #c94a30;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.zb-contact-social__icon--brand {
    background: #fff;
}

.zb-contact-social__icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.zb-contact-social__name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

/* ── Address ── */
.zb-contact-address {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ct-space-2);
    padding: var(--ct-space-2) var(--ct-space-1);
    text-align: center;
}

.zb-contact-address__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fdeee4;
    color: #c94a30;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.zb-contact-address__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.85;
    color: #4a3428;
    max-width: 28ch;
    text-align: center;
}

/* ── Mobile / Android — spaced single-screen fit ── */
@media (max-width: 899.98px) {
    body.page-contact-v2 {
        --ct-space-1: 0.5rem;
        --ct-space-2: 0.875rem;
        --ct-space-3: 1.125rem;
        --ct-space-4: 1.5rem;
    }

    .zb-contact {
        padding-bottom: 0;
    }

    .zb-contact__viewport {
        padding-bottom: calc(var(--ct-space-3) + env(safe-area-inset-bottom, 0px));
    }

    .zb-contact__canvas {
        gap: var(--ct-space-3);
    }

    .zb-contact__title {
        font-size: 24px;
        line-height: 1.4;
        padding: var(--ct-space-1) 0;
    }

    .zb-contact__divider {
        max-width: 180px;
        gap: 10px;
        margin-top: var(--ct-space-1);
    }

    .zb-contact__body {
        gap: var(--ct-space-3);
    }

    .zb-contact-box {
        padding: var(--ct-space-3) var(--ct-space-2);
        border-radius: 20px;
        box-shadow: 0 4px 18px rgba(72, 45, 30, 0.07);
    }

    .zb-contact-box--comm,
    .zb-contact-box--address {
        gap: var(--ct-space-2);
    }

    .zb-contact-box__title {
        font-size: 14px;
        margin-bottom: var(--ct-space-1);
    }

    .zb-contact-box__divider {
        margin: var(--ct-space-1) 0;
    }

    .zb-contact-panel {
        border-radius: 16px;
    }

    .zb-contact-panel__row {
        padding: 10px 12px;
        gap: 10px;
    }

    .zb-contact-panel__icon {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .zb-contact-panel__arrow {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    .zb-contact-panel__label {
        font-size: 11px;
    }

    .zb-contact-panel__value {
        font-size: 14px;
    }

    .zb-contact-social-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--ct-space-2);
    }

    .zb-contact-social {
        min-height: auto;
        padding: var(--ct-space-2) var(--ct-space-1);
        gap: var(--ct-space-1);
        border-radius: 14px;
    }

    .zb-contact-social--wide {
        grid-column: auto;
        flex-direction: column;
        min-height: auto;
        padding: var(--ct-space-2) var(--ct-space-1);
    }

    .zb-contact-social__icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .zb-contact-social__icon img {
        width: 20px;
        height: 20px;
    }

    .zb-contact-social__name {
        font-size: 10px;
        font-weight: 600;
        line-height: 1.25;
    }

    .zb-contact-address {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--ct-space-2);
        padding: var(--ct-space-2) 0 0;
    }

    .zb-contact-address__icon {
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
    }

    .zb-contact-address__text {
        font-size: 13px;
        line-height: 1.7;
        text-align: right;
        max-width: none;
        flex: 1;
    }
}

/* ── Desktop / Windows ── */
@media (min-width: 900px) {
    .zb-contact__viewport {
        padding-bottom: clamp(1.5rem, 4vh, 3rem);
    }

    .zb-contact__canvas {
        width: min(960px, 96vw) !important;
        max-width: 960px;
        padding: 0 var(--ct-space-3);
        gap: var(--ct-space-4);
    }

    .zb-contact__canvas--fill {
        height: 100% !important;
        min-height: 100% !important;
        max-height: 100%;
        justify-content: space-between;
        padding-top: clamp(var(--ct-space-2), 2vh, var(--ct-space-3));
        padding-bottom: clamp(1.75rem, 5vh, 3.5rem);
        box-sizing: border-box;
    }

    .zb-contact__title {
        font-size: clamp(1.5rem, 2.5vh, 2rem);
    }

    .zb-contact__subtitle {
        font-size: 1rem;
        margin-top: 10px;
    }

    .zb-contact__divider {
        max-width: 280px;
    }

    .zb-contact__body {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        gap: var(--ct-space-4);
        width: 100%;
        align-items: stretch;
    }

    .zb-contact__section {
        min-height: 0;
    }

    .zb-contact-box--comm,
    .zb-contact-box--address {
        height: 100%;
        padding: var(--ct-space-3);
        box-sizing: border-box;
    }

    .zb-contact-box__title {
        font-size: 15px;
    }

    .zb-contact-panel__row {
        padding: 13px 16px;
        transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    }

    .zb-contact-panel__row:hover {
        transform: translateX(-4px);
        background: #fff;
        box-shadow: 0 6px 20px rgba(72, 45, 30, 0.08);
        border-color: rgba(201, 74, 48, 0.15);
    }

    .zb-contact-panel__value {
        font-size: 16px;
    }

    .zb-contact-social-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
    }

    .zb-contact-social {
        min-height: auto;
        padding: 10px 6px;
        border-radius: 16px;
    }

    .zb-contact-social:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 28px rgba(72, 45, 30, 0.12);
        background: #fff;
    }

    .zb-contact-social--wide {
        grid-column: auto;
        flex-direction: column;
        min-height: auto;
        padding: 10px 6px;
    }

    .zb-contact-social__name {
        font-size: 11px;
    }

    .zb-contact-address {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: var(--ct-space-3);
        padding: var(--ct-space-2) var(--ct-space-3);
        text-align: center;
    }

    .zb-contact-address__text {
        font-size: 0.95rem;
        max-width: none;
        text-align: center;
        flex: 0 1 auto;
    }
}
