﻿/* =========================================
   Contact Us Page (تماس با ما)
   File: wwwroot/css/pages/contact-us.css
   ========================================= */

/* =========================
   Tokens
   ========================= */
:root {
    --ink: #0b1220;
    --glass: rgba(255,255,255,.68);
    --border: rgba(15,23,42,.10);
    --pill: 999px;
    --shadow-1: 0 10px 28px rgba(15,23,42,.08);
    --shadow-2: 0 22px 70px rgba(15,23,42,.12);
    /* Captcha tokens (merged) */
    --cap-bg: rgba(255,255,255,.78);
    --cap-border: rgba(160,123,255,.35);
    --cap-border-hover: rgba(160,123,255,.65);
    --cap-shadow: 0 10px 22px rgba(160,123,255,.16);
    --cap-shadow-focus: 0 14px 28px rgba(160,123,255,.22);
    --cap-radius: 14px;
    --cap-gap: 12px;
}

/* =========================
   Wrapper + Header
   ========================= */
.contact-wrap {
    padding: 18px 0 40px;
}

.contact-head {
    text-align: center;
    margin: 2px auto 18px;
}

.contact-title {
    text-align: center;
    font-size: 30px;
    font-weight: 900;
    margin: 6px 0 26px;
    color: rgba(11,18,32,.92);
    letter-spacing: -.2px;
    position: relative;
}

    .contact-title::after {
        content: "";
        display: block;
        width: 90px;
        height: 4px;
        border-radius: 999px;
        margin: 8px auto 0;
        background: #8d70d9;
    }

.contact-sub {
    margin: 10px auto 0;
    max-width: 820px;
    font-size: 16.5px;
    line-height: 2;
    color: rgba(11,18,32,.70);
}

/* =========================
   Base Card
   ========================= */
.cardx {
    overflow: hidden;
}

.section-head {
    text-align: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 6px;
    color: var(--ink);
}

.section-sub {
    margin: 0 auto;
    max-width: 820px;
    font-size: 15.8px;
    line-height: 2;
    color: rgba(11,18,32,.70);
}

/* =========================
   HQ
   ========================= */
.hq {
    padding: 22px;
}

.hq-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 18px;
    align-items: stretch;
}

.hq-info {
    border-radius: 26px;
    background: rgba(255,255,255,.65);
    border: 1px solid rgba(15,23,42,.10);
    box-shadow: var(--shadow-1);
    padding: 16px;
}

.hq-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(15,23,42,.06);
    margin-bottom: 10px;
}

    .hq-row:last-child {
        margin-bottom: 0;
    }

.hq-ico {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(14 9 28 / 10%);
    border: 1px solid rgba(124, 77, 255, .18);
    color: rgb(47 25 106 / 95%);
    font-size: 18px;
    flex: 0 0 auto;
}

.hq-text {
    line-height: 1.9;
    color: rgba(11,18,32,.78);
    font-weight: 800;
    font-size: 14.5px;
}

    .hq-text b {
        color: var(--ink);
        font-weight: 900;
    }

.hq-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* =========================
   Buttons
   ========================= */
.btnx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--pill);
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.72);
    box-shadow: var(--shadow-1);
    font-weight: 900;
    color: rgba(11,18,32,.88);
    text-decoration: none;
}

    .btnx:hover {
        transform: translateY(-1px);
        border-color: rgba(124,77,255,.22);
        box-shadow: 0 18px 45px rgba(124,77,255,.14);
        background: rgba(124,77,255,.10);
        color: var(--brand1)
    }

    .btnx.primary {
        color: #fff;
        border: 0;
        background: var(--brand1);
    }

        .btnx.primary:hover {
            filter: brightness(1.03);
            box-shadow: 0 30px 78px rgba(124,77,255,.32);
        }

/* =========================
   HQ Map
   ========================= */
.map-shell {
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,.10);
    box-shadow: var(--shadow-1);
    background: rgba(255,255,255,.62);
    min-height: 320px;
}

.map-iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
    display: block;
}

/* =========================
   Offices
   ========================= */
.offices {
    margin-top: 18px;
    padding: 22px;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.inputx,
.selectx {
    flex: 1 1 220px;
    border-radius: var(--pill);
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.75);
    box-shadow: var(--shadow-1);
    padding: 12px 14px;
    font-weight: 800;
    color: rgba(11,18,32,.82);
    outline: none;
}

    .inputx:focus,
    .selectx:focus {
        border-color: rgba(124,77,255,.32);
        box-shadow: 0 18px 40px rgba(124,77,255,.14);
    }

/*.offices-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 16px;
    margin-top: 14px;
    align-items: start;
}

.office-list {
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.62);
    box-shadow: var(--shadow-1);
    padding: 12px;
    max-height: 800px;
    overflow: auto;
}

    .office-list::-webkit-scrollbar {
        width: 10px;
    }

    .office-list::-webkit-scrollbar-thumb {
        background: rgba(15,23,42,.12);
        border-radius: 999px;
    }

.office-card {
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.74);
    box-shadow: 0 12px 30px rgba(15,23,42,.06);
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .office-card:last-child {
        margin-bottom: 0;
    }

    .office-card:hover {
        transform: translateY(-1px);
        border-color: rgba(124,77,255,.22);
        box-shadow: 0 20px 60px rgba(124,77,255,.14);
    }

.office-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.office-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgb(14 9 28 / 10%);
    border: 1px solid rgba(124,77,255,.18);
    font-weight: 900;
    color: rgb(47 25 106 / 95%);
    font-size: 13px;
}

    .office-badge.mini {
        font-size: 12px;
        padding: 7px 9px;
    }

.office-line {
    font-size: 14.5px;
    line-height: 1.9;
    color: rgba(11,18,32,.72);
    font-weight: 800;
}

    .office-line b {
        color: var(--ink);
        font-weight: 900;
    }

.nav-mini {
    padding: 10px 12px;
    border-radius: var(--pill);
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.80);
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

    .nav-mini:hover {
        border-color: rgba(124,77,255,.22);
        background: rgba(124,77,255,.10);
    }*/

/* =========================
   Side Map
   ========================= */
.map-side {
    position: sticky;
    top: 110px;
}

.map-side-card {
    overflow: hidden;
}

.map-side-head {
    padding: 12px 14px;
    font-weight: 900;
    color: rgba(11,18,32,.84);
    border-bottom: 1px solid rgba(15,23,42,.10);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.map-mini {
    width: 100%;
    height: 360px;
    border: 0;
    display: block;
}

.map-note {
    padding: 10px 14px 14px;
    font-weight: 800;
    color: rgba(11,18,32,.68);
    line-height: 1.9;
    font-size: 14px;
}

/* =========================
   Form (base)
   ========================= */
.formx {
    margin-top: 18px;
    padding: 22px;
}

.form-head {
    text-align: center;
    margin-bottom: 12px;
}

.form-title {
    font-size: 26px;
    font-weight: 900;
    margin: 0 0 6px;
    color: var(--ink);
}

.form-sub {
    margin: 10px auto 0;
    max-width: 820px;
    font-size: 16.5px;
    line-height: 2;
    color: rgba(11, 18, 32, .70);
}

/* =========================
   Validation (Modern)
   ========================= */
.field-error {
    display: block;
    margin-top: 6px;
    font-size: 12.75px;
    font-weight: 900;
    color: rgba(220,38,38,.92);
    line-height: 1.6;
}

.val-summary {
    display: none;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(220,38,38,.18);
    background: rgba(220,38,38,.06);
    color: rgba(127,29,29,.95);
    font-weight: 900;
}

/* asp.net unobtrusive adds these classes */
.input-validation-error {
    border-color: rgba(220,38,38,.45) !important;
    box-shadow: 0 0 0 4px rgba(220,38,38,.12), 0 16px 38px rgba(220,38,38,.10) !important;
}

.field-validation-valid {
    display: none;
}

.field-validation-error {
    display: block;
}

.validation-summary-errors {
    display: block;
}

.validation-summary-valid {
    display: none;
}



.field-error,
.text-danger {
    color: #d32f2f !important;
    font-size: 13px;
    margin-top: 2px;
}

.captcha-container.is-error .captcha-image-box,
.captcha-container.is-error #captcha {
    border-color: rgba(211,47,47,.55);
}

.captcha-container.is-loading .captcha-image {
    filter: grayscale(.2) blur(.2px);
    opacity: .8;
}

.captcha-container.is-loading .captcha-refresh {
    pointer-events: none;
    opacity: .85;
}

@media (max-width: 800px) {
    .captcha-container {
        grid-template-columns: 1fr;
    }

    .captcha-image {
        width: 140px;
    }
}

/* =========================
   Services (Glass + Lilac)
   ========================= */
.contact-wrap .formx .services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* ✅ مثل billrate */
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.62);
}

.contact-wrap .formx .checkx {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 18px;
    border: 1px solid rgba(15,23,42,.10);
    cursor: pointer;
    user-select: none;
    overflow: hidden;
}

    .contact-wrap .formx .checkx:hover {
        transform: translateY(-1px);
        border-color: rgba(124,77,255,.22);
        box-shadow: 0 18px 52px rgba(124,77,255,.14);
        background: radial-gradient(220px 90px at 20% 20%, rgba(124,77,255,.14), transparent 62%), radial-gradient(220px 90px at 85% 80%, rgba(109,59,242,.10), transparent 62%), rgba(255,255,255,.78);
    }

    /* hide native checkbox, keep accessible */
    .contact-wrap .formx .checkx > input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        inset: 0;
        cursor: pointer;
    }

/* custom checkbox UI */
.contact-wrap .formx .check-ui {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    flex: 0 0 22px;
    border: 1px solid rgba(124,77,255,.28);
    background: rgba(255,255,255,.86);
    box-shadow: 0 8px 18px rgba(124,77,255,.10);
    position: relative;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

    /* check mark */
    .contact-wrap .formx .check-ui::after {
        content: "";
        position: absolute;
        inset: 0;
        margin: auto;
        width: 10px;
        height: 6px;
        border-left: 3px solid transparent;
        border-bottom: 3px solid transparent;
        transform: rotate(-45deg) translateY(-1px);
        opacity: 0;
        transition: opacity .12s ease;
    }

/* label text */
.contact-wrap .formx .check-text {
    font-weight: 900;
    font-size: 13.25px;
    color: rgba(11,18,32,.82);
    line-height: 1.6;
}

/* checked state */
.contact-wrap .formx .checkx:has(input[type="checkbox"]:checked) {
    border-color: rgba(124,77,255,.32);
    box-shadow: 0 22px 64px rgba(124,77,255,.18);
}

    .contact-wrap .formx .checkx:has(input[type="checkbox"]:checked) .check-ui {
        background: linear-gradient(135deg, rgba(109,59,242,.95), rgba(124,77,255,.95));
        border-color: rgba(124,77,255,.42);
        box-shadow: 0 14px 32px rgba(124,77,255,.22);
        transform: scale(1.03);
    }

        .contact-wrap .formx .checkx:has(input[type="checkbox"]:checked) .check-ui::after {
            border-left-color: #fff;
            border-bottom-color: #fff;
            opacity: 1;
        }

    .contact-wrap .formx .checkx:has(input[type="checkbox"]:checked) .check-text {
        color: rgba(11,18,32,.92);
    }

/* keyboard focus */
.contact-wrap .formx .checkx:has(input[type="checkbox"]:focus-visible) {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(124,77,255,.18), 0 18px 52px rgba(124,77,255,.14);
    border-color: rgba(124,77,255,.35);
}

/* responsive */
@media (max-width: 520px) {
    .contact-wrap .formx .services-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   ContactUs Form -> BillRate Premium Look
   (final override, kept last for priority)
   ========================= */
.contact-wrap .formx .form-grid {
    border-radius: 28px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(15,23,42,.10);
    box-shadow: 0 22px 70px rgba(15,23,42,.08);
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
}

.contact-wrap .formx .field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .contact-wrap .formx .field.full {
        grid-column: 1 / -1;
    }

.contact-wrap .formx .label {
    font-size: 14px;
    font-weight: 900;
    color: rgba(11,18,32,.78);
}

.contact-wrap .formx .ctrl {
    width: 100%;
    border-radius: 18px;
    background: rgba(255,255,255,.80);
    border: 1px solid rgba(15,23,42,.12);
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
    padding: 12px 14px;
    outline: none;
    font-weight: 800;
    color: rgba(11,18,32,.82);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

    .contact-wrap .formx .ctrl:focus {
        border-color: rgba(124,77,255,.38);
        box-shadow: 0 18px 40px rgba(124,77,255,.14);
        transform: translateY(-1px);
    }

.contact-wrap .formx textarea.ctrl {
    min-height: 160px;
    resize: vertical;
}

.contact-wrap .formx .actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 4px;
}

    .contact-wrap .formx .actions .btnx {
        border-radius: 999px;
        padding: 12px 26px;
        font-weight: 900;
        border: 1px solid rgba(15,23,42,.10);
        background: #8d70d9;
        box-shadow: 0 12px 28px rgba(15,23,42,.06);
    }

        .contact-wrap .formx .actions .btnx:hover {
            transform: translateY(-1px);
            background: rgba(124,77,255,.08);
            box-shadow: 0 18px 40px rgba(124,77,255,.14);
        }

        .contact-wrap .formx .actions .btnx.primary {
            border: 0;
            color: #fff;
            background: var(--brand1);
            box-shadow: 0 22px 60px rgba(124,77,255,.26);
        }

            .contact-wrap .formx .actions .btnx.primary:hover {
                filter: brightness(1.03);
                box-shadow: 0 30px 78px rgba(124,77,255,.32);
            }

.contact-wrap .formx .val-summary {
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 992px) {
    .hq-grid {
        grid-template-columns: 1fr;
    }

    .offices-grid {
        grid-template-columns: 1fr;
    }

    .map-side {
        position: static;
    }

    .map-mini {
        height: 280px;
    }

    .contact-wrap .formx .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .contact-title {
        font-size: 32px;
    }
}
/* Labels: always right aligned (RTL) */
.contact-wrap .formx .label {
    text-align: right;
    align-self: flex-start; /* جلوی وسط‌افتادن توی flex رو می‌گیره */
    width: 100%;
}

.map-leaflet {
    height: 340px;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #f3f0e6;
}

/* =========================
   HQ GRID (PRO VERSION)
   ========================= */

.hq-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    align-items: stretch/* 🔥 مهم: جلوگیری از کش آمدن کل ردیف */
}

/* =========================
   INFO PANEL (LEFT)
   ========================= */

.hq-info {
    border-radius: 22px;
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 12px 35px rgba(15,23,42,.08);
    padding: 16px;
    backdrop-filter: blur(10px);
}

/* rows */
.hq-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,.6);
    border: 1px solid rgba(15,23,42,.06);
    margin-bottom: 10px;
    transition: all .2s ease;
}

    .hq-row:hover {
        transform: translateY(-1px);
        border-color: rgba(124,77,255,.25);
        box-shadow: 0 14px 35px rgba(124,77,255,.10);
    }

/* icon */
.hq-ico {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124,77,255,.10);
    border: 1px solid rgba(124,77,255,.18);
    color: #5b3fd9;
    font-size: 18px;
    flex: 0 0 auto;
}

/* text */
.hq-text {
    font-size: 14.5px;
    line-height: 1.9;
    color: rgba(11,18,32,.75);
    font-weight: 700;
}

    .hq-text b {
        color: #0b1220;
        font-weight: 900;
    }

/* actions */
.hq-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* =========================
   MAP PANEL (RIGHT) FIXED HEIGHT
   ========================= */

.map-shell {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 14px 40px rgba(15,23,42,.10);
    background: rgba(255,255,255,.6);
    /* 🔥 مهم: جلوگیری از grow شدن Grid */
    height: 360px;
    position: relative;
}

.map-container {
    width: 100%;
    height: 500px; /* ارتفاع مناسب برای دفتر مرکزی */
    position: relative;
}

#map2 {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* fade overlay (optional nice UI) */
.map-fade {
    position: absolute;
    inset: auto 0 0 0;
    height: 60px;
    background: linear-gradient(to top, rgba(255,255,255,.9), transparent);
    pointer-events: none;
}

/* =========================
   BUTTONS (POLISHED)
   ========================= */

.btnx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.75);
    font-weight: 900;
    color: rgba(11,18,32,.85);
    transition: all .2s ease;
    text-decoration: none;
}

    .btnx:hover {
        transform: translateY(-2px);
        border-color: rgba(124,77,255,.25);
        box-shadow: 0 18px 50px rgba(124,77,255,.15);
        background: rgba(124,77,255,.08);
    }

    /* primary */
    .btnx.primary {
        background: linear-gradient(135deg, #6d3bf2, #8d70d9);
        color: #fff;
        border: 0;
    }

        .btnx.primary:hover {
            filter: brightness(1.05);
            box-shadow: 0 22px 60px rgba(109,59,242,.30);
        }

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 992px) {
    .hq-grid {
        grid-template-columns: 1fr;
    }

    .map-shell {
        height: 300px;
    }
}

.offices-grid {
    width: 100%;
    margin-top: 18px;
}

.office-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

.office-card {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    padding: 18px 20px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .office-card:hover {
        transform: translateY(-2px);
        border-color: rgba(124, 77, 255, .22);
        box-shadow: 0 20px 60px rgba(124, 77, 255, .12);
    }

.office-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.office-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(124, 77, 255, .10);
    border: 1px solid rgba(124, 77, 255, .18);
    color: rgba(47, 25, 106, .95);
    font-weight: 900;
    font-size: 13px;
}

.office-title {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--ink, #0f172a);
}

.office-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.office-line {
    font-size: 14px;
    font-weight: 700;
    color: rgba(11, 18, 32, .72);
}

    .office-line b {
        color: var(--ink, #0f172a);
        font-weight: 900;
    }

.office-empty {
    border-radius: 12px;
    border: 1px dashed rgba(15, 23, 42, .18);
    background: rgba(255, 255, 255, .72);
    padding: 26px;
    text-align: center;
    color: rgba(15, 23, 42, .62);
    font-weight: 900;
}