/* =========================================
   صفحه ارتباط با ما — والپیپر و پنل فرم
   هم‌راستا با زبان بصری معرفی نماد / خدمات
   ========================================= */

body.contact-body {
    background: #e4eefc;
}

.contact-shell {
    --contact-navy: #0b1c44;
    --contact-navy-deep: #091634;
    --contact-blue: #1e4fa3;
    --contact-blue-soft: #2f6ec4;
    --contact-gold: #c4a35a;
    --contact-gold-bright: #f2b31e;
    --contact-muted: #4e6284;
    --contact-line: rgba(18, 50, 92, 0.12);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 0;
    background: var(--page-bg,
        radial-gradient(820px 420px at 8% 0%, rgba(255, 255, 255, .72), transparent 62%),
        radial-gradient(680px 380px at 96% 12%, rgba(255, 255, 255, .55), transparent 58%),
        radial-gradient(540px 280px at 70% 42%, rgba(255, 255, 255, .35), transparent 60%),
        linear-gradient(180deg, #e7f4ff 0%, #e4eefc 42%, #e7f1ff 72%, #d7e7fb 100%));
}

.contact-page-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.contact-waves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.contact-corner {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(320px, 30vw);
    height: 86px;
    display: block;
}

.contact-shell > .cooperation-section,
.contact-shell > .ertebat-form-panel {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* مسیر صفحه روی والپیپر روشن */
.contact-shell .breadcrumb {
    color: rgba(11, 28, 68, 0.45);
}

.contact-shell .breadcrumb a {
    color: rgba(11, 28, 68, 0.5);
}

.contact-shell .breadcrumb a:hover {
    color: var(--contact-blue);
}

.contact-shell .breadcrumb i {
    color: rgba(11, 28, 68, 0.28);
}

.contact-shell .breadcrumb span {
    color: var(--contact-navy);
    font-weight: 700;
}

/* معرفی همکاری روی تم روشن */
.contact-shell .coop-text {
    max-width: 820px;
    background: var(--page-card-bg, #fff);
    border: 1px solid rgba(36, 84, 168, 0.08);
    border-radius: 24px;
    padding: 40px;
    box-shadow:
        0 16px 36px rgba(24, 64, 140, 0.1),
        0 2px 8px rgba(24, 64, 140, 0.04);
}

.contact-shell .coop-eyebrow {
    color: var(--contact-blue);
}

.contact-shell .coop-text h1 {
    color: var(--page-text, var(--contact-navy));
}

.contact-shell .coop-text p {
    color: var(--page-text, var(--contact-muted));
}

.contact-shell .coop-stat {
    background: rgba(30, 79, 163, 0.06);
    border: 1px solid rgba(30, 79, 163, 0.12);
    color: var(--page-text, var(--contact-navy));
}

.contact-shell .coop-stat i {
    color: var(--contact-blue);
}

.contact-shell .job-title-box h2 {
    color: var(--page-text, var(--contact-navy));
}

.contact-shell .job-title-box p {
    color: var(--page-text, var(--contact-muted));
}

.contact-shell .job-card {
    background: var(--page-card-bg, #fff);
    border: 1px solid rgba(36, 84, 168, 0.1);
    box-shadow: 0 10px 24px rgba(24, 64, 140, 0.06);
}

.contact-shell .job-card:hover {
    border-color: rgba(30, 79, 163, 0.28);
    box-shadow: 0 16px 32px rgba(24, 64, 140, 0.12);
}

.contact-shell .job-icon {
    background: rgba(30, 79, 163, 0.1);
    color: var(--contact-blue);
}

.contact-shell .job-info h4 {
    color: var(--page-text, var(--contact-navy));
}

.contact-shell .job-meta,
.contact-shell .job-info p {
    color: var(--page-text, var(--contact-muted));
}

.contact-shell .job-meta i {
    color: var(--contact-blue);
}

.contact-shell .btn-resume {
    background: linear-gradient(135deg, var(--contact-blue-soft) 0%, var(--contact-navy) 100%);
    box-shadow: 0 10px 22px rgba(11, 28, 68, 0.22);
}

/* قبل از hydrate: سکشن‌های اختیاری مخفی تا چشمک نزنند */
.contact-shell.cms-pending [data-cms-section="main"],
.contact-shell.cms-pending [data-cms-section="jobs"] {
    display: none !important;
}
.contact-shell.cms-pending .cooperation-section {
    display: none !important;
}

/* وقتی معرفی و شغل‌ها خاموش‌اند، کل سکشن همکاری جمع می‌شود */
.contact-shell.is-form-lead .cooperation-section {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}
.contact-shell.is-form-lead .ertebat-form-panel {
    padding-top: 28px;
}
.contact-shell.is-form-lead .ertebat-form-panel .breadcrumb {
    margin-bottom: 18px;
}

/* ---------- پنل فرم تماس (سفید، ارتقایافته) ---------- */
.ertebat-form-panel {
    padding: 12px 0 72px;
    background: transparent;
}

.ertebat-form-panel .container {
    position: relative;
    z-index: 1;
}

.contact-form-section {
    position: relative;
    overflow: hidden;
    max-width: 780px;
    margin: 0 auto;
    padding: 44px 48px 42px;
    border-radius: 28px;
    color: var(--contact-navy);
    background:
        radial-gradient(520px 220px at 100% 0%, rgba(242, 179, 30, 0.08), transparent 55%),
        radial-gradient(480px 240px at 0% 100%, rgba(30, 79, 163, 0.07), transparent 58%),
        var(--page-card-bg, #fff);
    border: 1px solid rgba(36, 84, 168, 0.12);
    box-shadow:
        0 28px 56px rgba(24, 64, 140, 0.12),
        0 6px 16px rgba(24, 64, 140, 0.05);
}

.contact-form-section::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--contact-navy) 0%, var(--contact-blue) 48%, var(--contact-gold-bright) 100%);
}

.contact-form-section::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -70px;
    bottom: -80px;
    border-radius: 50%;
    border: 1px solid rgba(30, 79, 163, 0.08);
    pointer-events: none;
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header .form-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--contact-blue);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.form-header h2 {
    margin: 0;
    color: var(--page-text, var(--contact-navy));
    font-size: clamp(1.55rem, 2.6vw, 2.05rem);
    font-weight: 800;
    line-height: 1.3;
}

.form-header .form-title-rule {
    display: block;
    width: 72px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--contact-gold-bright), #f6c445);
}

.form-header p {
    margin: 14px auto 0;
    max-width: 34rem;
    color: var(--page-text, var(--contact-muted));
    font-size: 0.96rem;
    line-height: 1.85;
}

.contact-form {
    max-width: 660px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-form .form-row {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.contact-form .form-row--2 {
    grid-template-columns: 1fr 1fr;
}

.contact-form .form-group {
    margin-bottom: 14px;
}

.contact-form .form-row .form-group {
    margin-bottom: 0;
}

.contact-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--contact-navy);
    font-size: 0.88rem;
    font-weight: 700;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(36, 84, 168, 0.12);
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--contact-navy);
    background: rgba(247, 250, 255, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-form .form-group input::placeholder,
.contact-form .form-group textarea::placeholder {
    color: rgba(78, 98, 132, 0.62);
}

.contact-form .form-group input:hover,
.contact-form .form-group textarea:hover {
    border-color: rgba(30, 79, 163, 0.28);
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    border-color: rgba(30, 79, 163, 0.5);
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(30, 79, 163, 0.1),
        0 8px 18px rgba(24, 64, 140, 0.06);
}

.contact-form .form-group textarea {
    resize: vertical;
    min-height: 136px;
    line-height: 1.75;
}

.contact-form .captcha-group {
    margin-top: 4px;
}

.contact-form .captcha-box {
    padding: 12px;
    border-radius: 16px;
    border: 1px dashed rgba(30, 79, 163, 0.22);
    background: rgba(232, 241, 252, 0.55);
}

.contact-form .captcha-group .captcha-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: nowrap;
}

.contact-form .captcha-canvas {
    display: block;
    flex: 0 0 auto;
    width: 150px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(36, 84, 168, 0.12);
    background: #fff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(24, 64, 140, 0.06);
}

.contact-form .captcha-refresh {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(36, 84, 168, 0.12);
    border-radius: 12px;
    background: #fff;
    color: var(--contact-navy);
    cursor: pointer;
    font-size: 1.05rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.contact-form .captcha-refresh:hover {
    background: rgba(30, 79, 163, 0.08);
    border-color: rgba(30, 79, 163, 0.28);
    transform: rotate(-20deg);
}

.contact-form .captcha-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
    height: 48px;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(36, 84, 168, 0.12);
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 2;
}

.contact-form .captcha-input:focus {
    border-color: rgba(30, 79, 163, 0.5);
    box-shadow: 0 0 0 4px rgba(30, 79, 163, 0.1);
}

.contact-form .captcha-canvas,
.contact-form .captcha-refresh {
    position: relative;
    z-index: 2;
}

.contact-form .btn-submit {
    width: 100%;
    margin-top: 10px;
    padding: 15px 20px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-family: inherit;
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--contact-blue-soft) 0%, var(--contact-navy) 100%);
    box-shadow: 0 14px 28px rgba(11, 28, 68, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, gap 0.2s ease;
}

.contact-form .btn-submit i {
    font-size: 0.92rem;
    transition: transform 0.2s ease;
}

.contact-form .btn-submit:hover {
    filter: brightness(1.04);
    transform: translateY(-2px);
    gap: 14px;
    box-shadow: 0 18px 34px rgba(11, 28, 68, 0.28);
}

.contact-form .btn-submit:hover i {
    transform: translateX(-3px);
}

.contact-form .btn-submit:active {
    transform: translateY(0);
}

#hc-feedback {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.92rem;
    line-height: 1.7;
}

/* واکنش‌گرا */
@media (max-width: 768px) {
    .contact-shell .coop-text {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .ertebat-form-panel {
        padding: 8px 0 48px;
    }

    .contact-form-section {
        padding: 28px 16px 26px;
        border-radius: 22px;
    }

    .contact-form .form-row--2 {
        grid-template-columns: 1fr;
    }

    .form-header h2 {
        font-size: 1.35rem;
    }

    .contact-form .captcha-group .captcha-row {
        flex-wrap: wrap;
    }

    .contact-form .captcha-input {
        flex: 1 1 100%;
    }

    .contact-corner {
        width: min(220px, 46vw);
        height: 64px;
    }
}

/* LTR */
body.lang-en .contact-shell .coop-text,
body.lang-en .contact-form-section,
body.lang-en .contact-form .form-group label {
    text-align: left;
}

body.lang-en .form-header {
    text-align: center;
}

body.lang-en .contact-corner {
    right: auto;
    left: 0;
    transform: scaleX(-1);
}

body.lang-en .contact-form .captcha-input {
    letter-spacing: 0.12em;
}
