/* =====================================================================
   صفحه «تماس با ما» — معماری امیر
   فقط روی page-contact.php لود می‌شود (بعد از app.css)
   همه‌ی کلاس‌ها با پیشوند cf- شروع می‌شوند تا با بقیه‌ی قالب تداخل نکنند.
   پالت: دقیقاً همان پالت صفحه اصلی / درباره‌ما (شرابی / طلایی / کاغذی)
   ===================================================================== */

.cf-page {
    --cf-wine: #260508;
    --cf-wine-2: #0f0307;
    --cf-wine-3: #741b1b;
    --cf-red: #a81c22;
    --cf-gold: #c69a46;
    --cf-gold-2: #e2c08d;
    --cf-gold-3: #f3d7a8;
    --cf-gold-4: #b88e4c;
    --cf-gold-grad: linear-gradient(135deg, #f3d7a8 0%, #b88e4c 100%);
    --cf-cream: #f2e6d1;
    --cf-ink: #1f140e;
    --cf-danger: #ef6a5f;
    --cf-success: #7fcf9c;
    --cf-ease: cubic-bezier(.16, 1, .3, 1);

    font-family: Vazirmatn, sans-serif;
    direction: rtl;
    position: relative;
}

.cf-page *,
.cf-page *::before,
.cf-page *::after { box-sizing: border-box; }
.cf-page :where(input, select, textarea, button) { font-family: inherit; }

html.cf-js body,
body:has(.cf-page) { margin: 0; }

.cf-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* ---------- هیرو / پس‌زمینه ---------- */
.cf-hero {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    padding: 170px 0 100px;
    background:
        radial-gradient(1100px 620px at 85% -10%, rgba(198, 154, 70, .16), transparent 60%),
        radial-gradient(900px 560px at 8% 110%, rgba(168, 28, 34, .18), transparent 55%),
        var(--cf-wine-2);
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.cf-hero-shade {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, var(--cf-wine) 0%, var(--cf-wine-2) 55%, #08040a 100%);
    opacity: .9;
}

.cf-hero-star {
    position: absolute;
    top: 50%;
    left: -14%;
    width: 640px;
    height: 640px;
    transform: translateY(-50%);
    color: var(--cf-gold);
    opacity: .1;
    z-index: 0;
    pointer-events: none;
}
.cf-spin { animation: cfSpin 170s linear infinite; }
.cf-js .cf-spin { animation-play-state: running; }
@keyframes cfSpin { to { transform: translateY(-50%) rotate(360deg); } }

/* ---------- سربرگ ---------- */
.cf-head { position: relative; z-index: 2; text-align: center; margin-bottom: 46px; }

.cf-eyebrow {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--cf-gold);
    margin-bottom: 16px;
}

.cf-head h1 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: -.3px;
}
.cf-t-cream { color: var(--cf-cream); }
.cf-t-gold {
    display: block;
    background: var(--cf-gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cf-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 230px;
    margin: 22px auto 22px;
}
.cf-divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--cf-gold)); }
.cf-divider span:last-child { background: linear-gradient(90deg, var(--cf-gold), transparent); }
.cf-divider i { font-style: normal; font-size: 11px; color: var(--cf-gold); line-height: 1; }

.cf-lead {
    color: #d8c9b8;
    font-size: 1.02rem;
    line-height: 1.9;
    max-width: 480px;
    margin-inline: auto;
}

/* ---------- قاب فرم ---------- */
.cf-form-frame {
    position: relative;
    z-index: 2;
    background: linear-gradient(165deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .015) 100%);
    border: 1px solid rgba(226, 192, 141, .28);
    border-radius: 22px;
    padding: 40px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}

@media (max-width: 640px) {
    .cf-form-frame { padding: 26px 18px; border-radius: 18px; }
}

.cf-form { display: flex; flex-direction: column; gap: 20px; }

.cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 640px) {
    .cf-row { grid-template-columns: 1fr; }
}

.cf-field { display: flex; flex-direction: column; gap: 8px; }

.cf-field label {
    font-size: .88rem;
    font-weight: 600;
    color: var(--cf-gold-3);
}
.cf-field label i { color: var(--cf-red); font-style: normal; margin-inline-start: 2px; }
.cf-optional { font-weight: 400; color: #9b8b7a; font-size: .8rem; }

.cf-field input,
.cf-field select,
.cf-field textarea {
    width: 100%;
    background: rgba(15, 3, 7, .55);
    border: 1px solid rgba(226, 192, 141, .22);
    border-radius: 12px;
    padding: 13px 16px;
    font-size: .95rem;
    color: var(--cf-cream);
    outline: none;
    transition: border-color .3s var(--cf-ease), box-shadow .3s var(--cf-ease), background .3s var(--cf-ease);
}
.cf-field textarea { resize: vertical; min-height: 120px; line-height: 1.8; }

.cf-field input::placeholder,
.cf-field textarea::placeholder { color: #8a7a6b; }

.cf-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23c69a46' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-inline-start: 38px;
}
.cf-field select option { background: var(--cf-wine-2); color: var(--cf-cream); }

.cf-field input:focus,
.cf-field select:focus,
.cf-field textarea:focus {
    border-color: var(--cf-gold);
    background: rgba(15, 3, 7, .75);
    box-shadow: 0 0 0 4px rgba(198, 154, 70, .16);
}

.cf-field.cf-invalid input,
.cf-field.cf-invalid select,
.cf-field.cf-invalid textarea {
    border-color: var(--cf-danger);
    box-shadow: 0 0 0 4px rgba(239, 106, 95, .14);
}

.cf-err {
    display: none;
    font-size: .78rem;
    color: var(--cf-danger);
}
.cf-field.cf-invalid .cf-err { display: block; }

/* تله ضد اسپم — کاملاً از دید کاربر واقعی و صفحه‌خوان مخفی است */
.cf-hp {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    left: -9999px;
}

/* ---------- دکمه ارسال ---------- */
.cf-submit {
    justify-content: center;
    margin-top: 6px;
    padding: 15px 28px;
    font-size: 1rem;
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid var(--cf-gold);
}

.cf-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid rgba(15, 3, 7, .35);
    border-top-color: #0f0307;
    animation: cfRotate .7s linear infinite;
}
@keyframes cfRotate { to { transform: rotate(360deg); } }

.cf-submit.is-loading { pointer-events: none; opacity: .85; }
.cf-submit.is-loading .cf-spinner { display: inline-block; }
.cf-submit.is-loading .cf-submit-text { opacity: .75; }

.cf-submit:disabled { cursor: not-allowed; }

/* ---------- پیام وضعیت ---------- */
.cf-status {
    margin: 0;
    min-height: 0;
    font-size: .9rem;
    font-weight: 600;
    text-align: center;
    padding: 0;
    border-radius: 12px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .35s var(--cf-ease), transform .35s var(--cf-ease), padding .35s var(--cf-ease);
    overflow: hidden;
}
.cf-status.is-visible { opacity: 1; transform: none; padding: 13px 16px; }
.cf-status.is-success { background: rgba(127, 207, 156, .12); color: var(--cf-success); border: 1px solid rgba(127, 207, 156, .3); }
.cf-status.is-error { background: rgba(239, 106, 95, .12); color: var(--cf-danger); border: 1px solid rgba(239, 106, 95, .3); }
