/**
 * کامپوننت‌های قابل‌استفاده‌ی مجدد
 */

/* ═══════════ چشمک/برچسب بخش ═══════════ */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-3);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--gold-300);
    margin-bottom: var(--sp-5);
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold-500), transparent);
}

.eyebrow.centered {
    justify-content: center;
}

.eyebrow.centered::before {
    display: none;
}

.heading-xl {
    font-size: clamp(32px, 4.4vw, 56px);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.heading-lg {
    font-size: clamp(26px, 3.2vw, 40px);
    font-weight: 800;
}

.heading-md {
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 700;
}

.section-intro {
    max-width: 640px;
}

.section-intro.centered {
    margin-inline: auto;
    text-align: center;
}

.section-intro p {
    margin-top: var(--sp-4);
    font-size: 16.5px;
    line-height: 1.95;
}

/* ═══════════ دکمه‌ها ═══════════ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 15px 30px;
    border-radius: var(--r-pill);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.3s var(--ease-spring),
        box-shadow 0.35s var(--ease-out), background 0.35s, border-color 0.3s;
    isolation: isolate;
}

.btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.btn > span,
.btn {
    position: relative;
}

.btn-gold {
    background: linear-gradient(
        135deg,
        var(--gold-300),
        var(--gold-500) 55%,
        var(--gold-700)
    );
    color: var(--ink-on-gold);
    box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-gold::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;

    opacity: 0;

    background: linear-gradient(
        135deg,
        var(--gold-100),
        var(--gold-300) 55%,
        var(--gold-500)
    );

    transition: opacity 0.35s var(--ease-out);

    z-index: -1;
}

.btn-gold svg,
.btn-gold > span {
    position: relative;
    z-index: 1;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(200, 169, 81, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-gold:hover::after {
    opacity: 1;
}

.btn-gold:active {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(200, 169, 81, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink-100);
    border: 1px solid var(--line-2);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    background: rgba(233, 205, 130, 0.07);
    border-color: var(--gold-500);
    color: var(--gold-300);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.btn-ghost:active {
    transform: translateY(0);
}

.btn-lg {
    padding: 18px 38px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: 0.55;
    pointer-events: none;
}

/* دکمه‌ی شناور ثبت‌نام — به‌صورت پیش‌فرض یک دایره‌ی کوچک (کم‌تصرف)،
   با هاور/فوکوس باز می‌شود و متن را نشان می‌دهد. این‌طور هیچ‌وقت روی
   متنِ زیرش که در حال اسکرول است سوار نمی‌شود. */
/* ═══════════════════════════════════════
   FLOATING REGISTRATION CTA
   ═══════════════════════════════════════ */

.float-cta {
    position: fixed;
    bottom: var(--sp-6);
    inset-inline-start: var(--sp-6);
    z-index: var(--z-cta-float);
    animation: floatCtaIn 0.6s var(--ease-spring) both;
    animation-delay: 1.4s;
}

/* خود دکمه */
.float-cta .btn {
    box-sizing: border-box;

    width: 52px;
    height: 52px;

    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    overflow: hidden;
    white-space: nowrap;

    position: relative;
    isolation: isolate;

    transition:
        width 0.35s var(--ease-out),
        padding 0.35s var(--ease-out),
        box-shadow 0.3s var(--ease-out),
        background 0.3s var(--ease-out);
}

/* لایه‌ی طلایی */
.float-cta .btn-gold::after {
    z-index: -1;
}

/* آیکون */
.float-cta .btn svg {
    position: relative;
    z-index: 3;

    flex: 0 0 20px;

    width: 20px;
    height: 20px;
}

/* متن */
.float-cta .btn span {
    position: relative;
    z-index: 3;

    display: block;

    flex: 0 0 auto;

    width: auto;
    max-width: 0;

    overflow: hidden;
    opacity: 0;

    color: var(--ink-on-gold);

    white-space: nowrap;

    transition:
        max-width 0.35s var(--ease-out),
        opacity 0.2s ease;
}

/* هاور → باز شدن */
.float-cta .btn:hover,
.float-cta .btn:focus-visible {
    width: 210px;
    padding-inline-start: 16px;
    padding-inline-end: 22px;
}

/* نمایش متن */
.float-cta .btn:hover span,
.float-cta .btn:focus-visible span {
    max-width: 170px;
    opacity: 1;
}

/* رنگ متن در تمام حالت‌ها */
.float-cta .btn-gold,
.float-cta .btn-gold:hover,
.float-cta .btn-gold:focus,
.float-cta .btn-gold:focus-visible,
.float-cta .btn-gold:active {
    color: var(--ink-on-gold);
}

.float-cta .btn-gold span,
.float-cta .btn-gold:hover span,
.float-cta .btn-gold:focus-visible span {
    color: var(--ink-on-gold) !important;
}


/* موبایل */
@media (max-width: 640px) {
    .float-cta {
        bottom: var(--sp-4);
        inset-inline-start: var(--sp-4);
    }
}


/* ورود دکمه */
@keyframes floatCtaIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ═══════════ کارت‌ها ═══════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    transition: border-color var(--dur-base) var(--ease-out),
        background var(--dur-base), transform var(--dur-base) var(--ease-out);
}

.card-hover:hover {
    border-color: var(--line-3);
    background: var(--bg-card-hover);
    transform: translateY(-6px);
}

.card-pad {
    padding: var(--sp-8);
}

.icon-tile {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        rgba(200, 169, 81, 0.16),
        rgba(200, 169, 81, 0.04)
    );
    border: 1px solid var(--line-2);
    color: var(--gold-300);
    margin-bottom: var(--sp-5);
    flex-shrink: 0;
}

.icon-tile svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.6;
}

.card-title {
    font-size: 17.5px;
    font-weight: 700;
    color: var(--ink-100);
    margin-bottom: var(--sp-2);
    line-height: 1.7;
}

.card-text {
    font-size: 14.5px;
    color: var(--ink-500);
    line-height: 1.95;
}

.info-card-list .footer-contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    gap: 10px;
    margin: 0;
    padding: 0;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--ink-400);
    text-decoration: none;
}

.footer-contact-item svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex: 0 0 20px;
    stroke: var(--gold-300);
    fill: none;
}

/* ═══════════ نشان‌ها/چیپ‌ها ═══════════ */
.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 9px 18px;
    border-radius: var(--r-pill);
    font-size: 13.5px;
    border: 1px solid var(--line-2);
    color: var(--ink-500);
    transition: all var(--dur-fast) var(--ease-out);
}

.chip:hover {
    border-color: var(--gold-500);
    color: var(--gold-300);
    background: var(--gold-glow);
}

.chip-gold {
    border-color: var(--line-3);
    color: var(--gold-300);
    background: var(--gold-glow);
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ═══════════ کارت آمار ═══════════ */
.stat-box {
    text-align: center;
    padding: var(--sp-6) var(--sp-4);
    border: 1px solid var(--line-1);
    border-radius: var(--r-lg);
    background: var(--bg-card);
}

.stat-box .num {
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 800;
    color: var(--gold-300);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat-box .lbl {
    margin-top: var(--sp-2);
    font-size: 13px;
    color: var(--ink-500);
}

/* ═══════════ فرم‌ها ═══════════ */
.field {
    margin-bottom: var(--sp-5);
    position: relative;
}

.field label {
    display: block;
    font-size: 13.5px;
    color: var(--ink-500);
    margin-bottom: var(--sp-2);
    font-weight: 600;
}

.field .req {
    color: var(--accent-ruby);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-2);
    border-radius: var(--r-md);
    padding: 14px 16px;
    font-size: 14.5px;
    color: var(--ink-100);
    transition: border-color var(--dur-fast), background var(--dur-fast),
        box-shadow var(--dur-fast);
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--ink-900);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold-500);
    background: rgba(200, 169, 81, 0.05);
    box-shadow: 0 0 0 4px var(--gold-glow);
}

.field textarea {
    resize: vertical;
    min-height: 110px;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: var(--state-error);
}

.field-error {
    display: none;
    color: var(--state-error);
    font-size: 12.5px;
    margin-top: 6px;
}

.field.has-error .field-error {
    display: block;
}

.field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8a951' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 16px;
    padding-left: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
}
@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-note {
    font-size: 12.5px;
    color: var(--ink-700);
    margin-top: var(--sp-4);
    text-align: center;
}

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: 16px 18px;
    border-radius: var(--r-md);
    font-size: 14px;
    margin-bottom: var(--sp-5);
}

.form-alert.error {
    background: var(--state-error-soft);
    border: 1px solid rgba(224, 98, 90, 0.3);
    color: #ffb3ad;
}

.form-alert.success {
    background: var(--state-success-soft);
    border: 1px solid rgba(79, 174, 126, 0.3);
    color: #9fe0bf;
}

/* honeypot — از دید انسان مخفی، از دید ربات‌ها قابل‌مشاهده
   نکته: به‌جای انتقال به مختصات دور (left:-9999px) که باعث overflow
   افقی کل صفحه می‌شود، از تکنیک امن clip/1px استفاده شده است. */
.hp-field {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══════════ عناصر شناور تزئینی (پس‌زمینه) ═══════════ */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: var(--z-bg-deco);
    opacity: 0.55;
}

.blob-gold {
    background: radial-gradient(circle, var(--gold-500), transparent 70%);
}

.blob-emerald {
    background: radial-gradient(circle, var(--accent-emerald), transparent 70%);
}

.blob-ruby {
    background: radial-gradient(circle, var(--accent-ruby), transparent 70%);
}

.float-slow {
    animation: floatY 9s ease-in-out infinite;
}

.float-slower {
    animation: floatY 13s ease-in-out infinite;
}

.float-reverse {
    animation: floatY 11s ease-in-out infinite reverse;
}
@keyframes floatY {
    0%,
    100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-15px) translateX(6px);
    }
}

/* کارت شناور کوچک با آیکون (روی هیرو/گالری) — دارای سایه واقعی برای عمق */
.float-card {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    background: rgba(20, 20, 25, 0.75);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line-2);
    border-radius: var(--r-lg);
    padding: 14px 18px;
    box-shadow: var(--shadow-md);
    animation: floatY 8s ease-in-out infinite;
}

.float-card .icon-tile {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
}

.float-card .icon-tile svg {
    width: 20px;
    height: 20px;
}

.float-card strong {
    display: block;
    font-size: 18px;
    color: var(--gold-300);
    white-space: nowrap;
}

.float-card span {
    font-size: 11.5px;
    color: var(--ink-500);
    white-space: nowrap;
}

/* ═══════════ media placeholder — جای تصویر/ویدیو با fallback زیبا ═══════════ */
.media-frame {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--line-2);
    isolation: isolate;
    background: linear-gradient(150deg, #1b1710, #0c0c0e 60%);
}

.media-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.5;
    background: radial-gradient(
            circle at 25% 20%,
            rgba(200, 169, 81, 0.14),
            transparent 55%
        ),
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.02) 0 2px,
            transparent 2px 8px
        );
}

.media-frame img,
.media-frame video {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
}

.media-frame img.is-loaded,
.media-frame video.is-loaded {
    opacity: 1;
}

.media-frame .media-fallback-label {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 20px;
    color: var(--ink-700);
    font-size: 12.5px;
}

.media-frame .media-fallback-label svg {
    width: 34px;
    height: 34px;
    stroke: var(--gold-900);
}

/* ═══════════ لایت‌باکس (نمایش بزرگ‌شده‌ی تصویر/ویدیو) ═══════════ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-toast, 980);
    background: rgba(5, 5, 6, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-out), visibility 0s 0.3s;
}

.lightbox-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s var(--ease-out), visibility 0s;
}

.lightbox-stage {
    max-width: min(92vw, 1100px);
    max-height: 88vh;
}

.lightbox-stage img,
.lightbox-stage video {
    max-width: 100%;
    max-height: 88vh;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    display: block;
    transform: scale(0.94);
    transition: transform 0.35s var(--ease-spring);
}

.lightbox-overlay.is-open .lightbox-stage img,
.lightbox-overlay.is-open .lightbox-stage video {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line-2);
    color: var(--ink-100);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover {
    background: rgba(233, 205, 130, 0.14);
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 20px;
    height: 20px;
}

/* ═══════════ دکمه‌ی بازگشت به بالا ═══════════ */
.back-to-top {
    position: fixed;
    bottom: var(--sp-6);
    inset-inline-end: var(--sp-6);
    z-index: var(--z-cta-float);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(20, 20, 25, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line-2);
    color: var(--gold-300);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out),
        visibility 0s 0.35s, background 0.25s, border-color 0.25s;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out),
        visibility 0s, background 0.25s, border-color 0.25s;
}

.back-to-top:hover {
    background: rgba(233, 205, 130, 0.12);
    border-color: var(--gold-500);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}
@media (max-width: 640px) {
    .back-to-top {
        bottom: var(--sp-4);
        inset-inline-end: var(--sp-4);
        width: 44px;
        height: 44px;
    }
}
