/* dmhouse-lead-form.css — بخش‌های مشترک لندینگ‌های خدمات (inc/landing-parts.php):
   فرم پایانی (.dmlf)، و چند قاعدهٔ چیدمان برای پرسش‌ها، جعبهٔ متن سئویی و دیدگاه‌ها که خودشان طرح
   dmhouse-service.css را دارند. هر قالب فقط رنگ تأکید (dmlp-hl) و سکشن‌های اختصاصی خودش را دارد. */

/* ══════════ پرسش‌ها / متن سئویی / دیدگاه‌ها ══════════ */
.dmlp-faq,
.dmlp-long,
.dmlp-comments {
    position: relative;
    padding-block: 100px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

.dmlp-long {
    padding-block-start: 20px;
}

.dmlp-faq .dmlp-faq__body--solo {
    grid-template-columns: minmax(0, 1fr);
    max-width: 900px;
    margin-inline: auto;
}

.dmlp-long__title,
.dmlp-comments__title {
    margin: 0 0 18px;
    color: var(--text-primary);
    font-size: clamp(22px, 2.6vw, 32px);
    font-weight: 900;
    line-height: 1.6;
    text-align: start;
}

/* ══════════ فرم پایانی ══════════ */
.dmlf {
    position: relative;
    padding-block: clamp(110px, 12vw, 170px);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    direction: rtl;
}

.dmlf *,
.dmlf *::before,
.dmlf *::after {
    box-sizing: border-box;
}

/* آخرین سکشن است و زیرش فوتر سرمه‌ای می‌آید؛ موج پایین خاموش. */
.dmlf.section-meld::after {
    display: none;
}

.dmlf > .page-container {
    position: relative;
    z-index: 2;
}

.dmlf__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.dmlf__orb--a {
    inset-block-start: 10%;
    inset-inline-start: -10%;
    width: 50vw;
    height: 50vw;
    background-image: radial-gradient(closest-side, rgba(245, 214, 143, .16), transparent);
}

.dmlf__orb--b {
    inset-block-end: -20%;
    inset-inline-end: -10%;
    width: 40vw;
    height: 40vw;
    background-image: radial-gradient(closest-side, rgba(184, 115, 51, .22), transparent);
}

.dmlf__inner {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(24px, 5vw, 80px);
}

.dmlf__rocket {
    display: block;
    width: clamp(80px, 9vw, 130px);
    margin-block-end: 16px;
    animation: dmlfFloat 5s ease-in-out infinite;
}

.dmlf__rocket svg {
    display: block;
    width: 100%;
    fill: none;
    stroke: var(--color-gold);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dmlf__flame {
    fill: var(--color-copper);
    stroke: none;
    transform-box: fill-box;
    transform-origin: top;
    animation: dmlfFlame .35s ease-in-out infinite alternate;
}

/* ⚠ base.css تیترها را وسط‌چین می‌کند؛ عنوان فرم صریحاً start. */
.dmlf__title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(32px, 5vw, 68px);
    font-weight: 900;
    line-height: 1.4;
    text-align: start;
}

.dmlf__title .dmlp-hl,
.dmlf__title [class$="-hl"] {
    color: var(--color-gold);
}

.dmlf__desc {
    margin-block-start: 18px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 2.2;
}

.dmlf__wrap {
    min-width: 0;
    padding: clamp(22px, 3vw, 44px);
    border: 1px solid rgba(245, 214, 143, .22);
    border-radius: 30px;
    background-color: rgba(255, 255, 255, .03);
}

.dmlf__wrap--tel {
    display: flex;
    justify-content: center;
}

/* پوستهٔ خروجی افزونهٔ فرم‌ساز — ⚠ important: شیوه‌نامهٔ خود افزونه هم‌وزن است.
   چیدمان را خود فرم‌ساز تعیین می‌کند (dmf-col-100 تمام‌عرض، dmf-col-50 نیم‌عرض). */
.dmlf__wrap .dmf-form {
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
}

.dmlf__wrap .dmf-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px 22px !important;
}

.dmlf__wrap .dmf-field-wrap {
    display: flex !important;
    flex-direction: column !important;
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
}

.dmlf__wrap .dmf-field-wrap.dmf-col-50,
.dmlf__wrap .dmf-field-wrap.dmf-col-33,
.dmlf__wrap .dmf-field-wrap.dmf-col-25 {
    grid-column: auto !important;
}

.dmlf__wrap .dmf-field-wrap label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.dmlf__wrap .dmf-field-wrap input:not([type="radio"]):not([type="checkbox"]),
.dmlf__wrap .dmf-field-wrap select,
.dmlf__wrap .dmf-field-wrap textarea {
    width: 100% !important;
    background: rgba(255, 255, 255, .04) !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .3s ease, background-color .3s ease !important;
}

.dmlf__wrap .dmf-field-wrap textarea {
    resize: vertical !important;
    min-height: 110px !important;
}

.dmlf__wrap .dmf-field-wrap select option {
    background: var(--color-navy) !important;
    color: #ffffff !important;
}

.dmlf__wrap .dmf-field-wrap input::placeholder,
.dmlf__wrap .dmf-field-wrap textarea::placeholder {
    color: rgba(255, 255, 255, .45) !important;
}

.dmlf__wrap .dmf-field-wrap input:focus,
.dmlf__wrap .dmf-field-wrap select:focus,
.dmlf__wrap .dmf-field-wrap textarea:focus {
    border-color: var(--color-gold) !important;
    background: rgba(245, 214, 143, .06) !important;
}

.dmlf__wrap .dmf-choices {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    gap: 10px !important;
}

.dmlf__wrap .dmf-choice {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, .85) !important;
    cursor: pointer !important;
}

.dmlf__wrap .dmf-choice input {
    accent-color: var(--color-gold) !important;
}

.dmlf__wrap .dmf-req {
    color: var(--color-gold) !important;
}

.dmlf__wrap .dmf-form-msg {
    border-radius: 12px !important;
    padding: 12px 16px !important;
    margin-bottom: 0 !important;
    font-size: 14px !important;
}

.dmlf__wrap .dmf-form-msg.dmf-ok {
    background: rgba(255, 255, 255, .08) !important;
    border: 1px solid var(--color-gold) !important;
    color: #ffffff !important;
}

.dmlf__wrap .dmf-form-msg.dmf-err {
    background: rgba(255, 255, 255, .05) !important;
    border: 1px solid #ff6b6b !important;
    color: #ff6b6b !important;
}

.dmlf__wrap .dmf-actions {
    display: flex !important;
    margin-top: 4px !important;
}

.dmlf__wrap .dmf-submit {
    width: auto !important;
    padding: 16px 38px !important;
    border: 0 !important;
    border-radius: 50px !important;
    background: linear-gradient(135deg, #fbe3a6, #e0a96a 55%, #b87333) !important;
    color: var(--color-navy) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    box-shadow: 0 16px 30px -14px rgba(245, 214, 143, .6) !important;
    transition: box-shadow .3s ease, filter .3s ease !important;
}

.dmlf__wrap .dmf-submit:hover:not(:disabled) {
    box-shadow: 0 22px 40px -14px rgba(245, 214, 143, .85) !important;
}

/* ══════════ موج پایین هیرو (dmlp-hero-wave) ══════════
   هیروی سرمه‌ای که سکشن روشن بعدش می‌آید: فقط موج پایین (همان ماسک و انیمیشن section-meld در base.css).
   section-meld کامل اینجا مناسب نیست چون موج بالایش زیر هدر می‌افتد. رنگ موج = --prev-bg تم تیره (سفید). */
section.theme-dark.dmlp-hero-wave::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: clamp(50px, 8vw, 120px);
    background-color: var(--prev-bg);
    pointer-events: none;
    z-index: 1;
    -webkit-mask-image:
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0v99.7C62 69 122.4 48.7 205 66c83.8 17.6 160.5 20.4 240-12 54-22 110-26 173-10a392.2 392.2 0 0 0 222-5c55-17 110.3-36.9 160-27.2V0H0Z' opacity='.5'/%3E%3C/svg%3E"),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0v74.7C62 44 122.4 28.7 205 46c83.8 17.6 160.5 25.4 240-7 54-22 110-21 173-5 76.5 19.4 146.5 23.3 222 0 55-17 110.3-31.9 160-22.2V0H0Z'/%3E%3C/svg%3E");
    mask-image:
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0v99.7C62 69 122.4 48.7 205 66c83.8 17.6 160.5 20.4 240-12 54-22 110-26 173-10a392.2 392.2 0 0 0 222-5c55-17 110.3-36.9 160-27.2V0H0Z' opacity='.5'/%3E%3C/svg%3E"),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0v74.7C62 44 122.4 28.7 205 46c83.8 17.6 160.5 25.4 240-7 54-22 110-21 173-5 76.5 19.4 146.5 23.3 222 0 55-17 110.3-31.9 160-22.2V0H0Z'/%3E%3C/svg%3E");
    -webkit-mask-size: 250% 100%, 200% 100%;
    mask-size: 250% 100%, 200% 100%;
    -webkit-mask-repeat: no-repeat, no-repeat;
    mask-repeat: no-repeat, no-repeat;
    transform: rotate(180deg);
    animation: sloshingWaves 14s ease-in-out infinite alternate-reverse;
}

/* جای موج زیر محتوای هیرو (به‌ویژه موبایل که فاصله‌ها کم شده). ویژگی 0-2-1 بر قاعدهٔ هیروی هر قالب (0-2-0) غلبه می‌کند. */
section.theme-dark.dmlp-hero-wave {
    padding-block-end: clamp(80px, 10vw, 150px);
}

/* ══════════ نقشهٔ راه مشترک (dmhouse_lp_render_road) ══════════
   رنگ تأکید از --dmlp-accent روی ریشهٔ هر قالب می‌آید. جاده از راست به چپ؛ ایستگاه‌ها یکی در میان بالا/پایین. */
.dmlp-road {
    --dmlp-accent: var(--accent-primary);
    position: relative;
    margin-block-start: 30px;
    padding-block: 10px;
}

.dmlp-road__svg {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 50%;
    width: 100%;
    height: 240px;
    transform: translateY(-50%);
}

.dmlp-road__asphalt {
    stroke: rgba(10, 25, 47, .1);
    stroke-width: 46;
    stroke-linecap: round;
}

.theme-dark .dmlp-road__asphalt {
    stroke: rgba(255, 255, 255, .08);
}

.dmlp-road__dash {
    stroke: #fff;
    stroke-width: 3;
    stroke-dasharray: 18 16;
    animation: dmlpDash 1.6s linear infinite;
}

.theme-dark .dmlp-road__dash {
    stroke: rgba(255, 255, 255, .35);
}

/* ماشینی که روی جاده از راست به چپ می‌رود (حلقهٔ ۱۰ ثانیه‌ای). جایش را dmhouse-landing.js از روی خود مسیر SVG
   حساب می‌کند (transform از گوشهٔ بالا-چپ جعبه، پس left/top فیزیکی عمدی است). بدون اسکریپت یا با حرکت کم پنهان است. */
.dmlp-road__car {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 4px solid #fff;
    border-radius: 50%;
    background-color: var(--dmlp-accent);
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--dmlp-accent) 25%, transparent);
    z-index: 1;
    will-change: transform;
}

.dmlp-road.is-driving .dmlp-road__car {
    display: block;
}

.dmlp-road__list {
    position: relative;
    z-index: 2;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dmlp-road__stop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

/* یکی در میان کارت بالای جاده یا پایین آن */
.dmlp-road__stop:nth-child(odd) {
    flex-direction: column-reverse;
    padding-block-end: 150px;
}

.dmlp-road__stop:nth-child(even) {
    padding-block-start: 150px;
}

.dmlp-road__pin {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 3px solid #fff;
    border-radius: 50%;
    background-color: var(--dmlp-accent);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .45);
}

.dmlp-road__card {
    display: block;
    width: 100%;
    max-width: 210px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-block-start: 4px solid var(--dmlp-accent);
    border-radius: 16px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.8;
    box-shadow: var(--card-shadow);
}

[data-lp].is-js .dmlp-road .dmlp-road__stop {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease, transform .5s ease;
}

[data-lp].is-js .dmlp-road.is-in .dmlp-road__stop {
    opacity: 1;
    transform: none;
}

.dmlp-road.is-in .dmlp-road__stop:nth-child(2) { transition-delay: .15s; }
.dmlp-road.is-in .dmlp-road__stop:nth-child(3) { transition-delay: .3s; }
.dmlp-road.is-in .dmlp-road__stop:nth-child(4) { transition-delay: .45s; }
.dmlp-road.is-in .dmlp-road__stop:nth-child(5) { transition-delay: .6s; }
.dmlp-road.is-in .dmlp-road__stop:nth-child(6) { transition-delay: .75s; }

@keyframes dmlpDash {
    to { stroke-dashoffset: -34; }
}

@media (max-width: 860px) {
    .dmlp-road__svg {
        display: none;
    }

    /* موبایل: جادهٔ آسفالتی عمودی سمت راست با لبه‌ها و خط وسط متحرک؛ ایستگاه‌ها روی جاده، کارت‌ها کنارش،
       ماشین از بالا به پایین روی خط وسط می‌رود (مسیر صاف، پس کلیدفریم CSS دقیق است). */
    .dmlp-road {
        --dmlp-lane: 24px;
        padding-block: 26px;
    }

    .dmlp-road::before {
        content: "";
        position: absolute;
        inset-block: 0;
        inset-inline-start: calc(var(--dmlp-lane) - 20px);
        width: 40px;
        border-inline: 3px solid color-mix(in srgb, var(--dmlp-accent) 55%, transparent);
        border-radius: 20px;
        background-color: rgba(10, 25, 47, .1);
    }

    .theme-dark .dmlp-road::before {
        background-color: rgba(255, 255, 255, .08);
    }

    .dmlp-road::after {
        content: "";
        position: absolute;
        inset-block: 14px;
        inset-inline-start: calc(var(--dmlp-lane) - 1.5px);
        width: 3px;
        background-image: repeating-linear-gradient(to bottom, #fff 0 14px, transparent 14px 26px);
        animation: dmlpLane 1.2s linear infinite;
    }

    @keyframes dmlpLane {
        to { background-position: 0 26px; }
    }

    .dmlp-road__car,
    .dmlp-road.is-driving .dmlp-road__car {
        display: block;
        inset-inline-start: calc(var(--dmlp-lane) - 9px);
        left: auto;
        width: 18px;
        height: 18px;
        margin: 0;
        border-width: 3px;
        transform: none;
        translate: none;
        animation: dmlpCarDown 9s linear infinite;
        z-index: 3;
    }

    @keyframes dmlpCarDown {
        from { top: 0; }
        to { top: calc(100% - 18px); }
    }

    .dmlp-road__list {
        grid-auto-flow: row;
        gap: 22px;
    }

    .dmlp-road__stop,
    .dmlp-road__stop:nth-child(odd),
    .dmlp-road__stop:nth-child(even) {
        flex-direction: row;
        align-items: center;
        padding: 0;
        text-align: start;
        translate: none;
    }

    .dmlp-road__card {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dmlp-road__dash,
    .dmlp-road__car {
        animation: none !important;
    }
}

/* ══════════ گالری مشترک (تب + نمایش بزرگ) ══════════ */
.dmlp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99995;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: rgba(6, 12, 24, .92);
}

.dmlp-lightbox[hidden] {
    display: none !important;
}

.dmlp-lightbox img {
    max-width: min(1100px, 100%);
    max-height: 86vh;
    border-radius: 18px;
    object-fit: contain;
}

.dmlp-lightbox__btn {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.dmlp-lightbox__btn:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.dmlp-lightbox__close { inset-block-start: 20px; inset-inline-end: 20px; }
/* RTL: «بعدی» سمت چپ، «قبلی» سمت راست */
.dmlp-lightbox__prev { inset-inline-start: 20px; }
.dmlp-lightbox__next { inset-inline-end: 20px; }

@keyframes dmlfFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes dmlfFlame {
    from { transform: scaleY(.7); }
    to { transform: scaleY(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    .dmlf__rocket,
    .dmlf__flame {
        animation: none !important;
    }
}

@media (max-width: 992px) {
    .dmlp-faq,
    .dmlp-comments {
        padding-block: 70px;
    }

    .dmlf__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .dmlf__wrap .dmf-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .dmlf__wrap {
        padding: 22px 16px;
    }
}
