/* ========== هیرو ========== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark) 0%, #0f0f1a 50%, var(--darker) 100%);
    padding: 2rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(253, 86, 49, 0.15), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(93, 60, 242, 0.15), transparent 50%);
    pointer-events: none;
}

.hero-bg-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(253, 86, 49, 0.3);
    border-radius: 50%;
    animation: particle-float 15s linear infinite;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#changing-text {
    display: inline-block;
    min-width: 150px;
    text-align: center;
    transition: opacity 0.3s ease;
}

/* ========== رنگ پلتفرم‌ها ========== */
.platform-telegram {
    color: #02d1ff;
}

.platform-bale {
    background: linear-gradient(-135deg, #4df1b6, #2d2b73);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.platform-eitaa {
    color: #ff6a00;
}

.platform-rubika {
    background: linear-gradient(135deg, #7a4587, #5bd5bd, #b8cd06, #f4a926, #e54d52);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.platform-instagram {
    background: radial-gradient(circle at 30% 110%, #ffdb7e, #f9ce34, #ee2a7b, #6228d7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.platform-soroush {
    background: linear-gradient(180deg, #3991ac, #155c72);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ========== کارت کمپین ========== */
.hero-campaign-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.hero-campaign-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold), var(--accent), var(--primary));
    animation: shine 3s linear infinite;
    background-size: 200% 100%;
}

.hero-campaign-card:hover {
    transform: translateY(-5px);
    border-color: rgba(253, 86, 49, 0.4);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.3);
}

.campaign-badge-hot {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

.campaign-stats {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.campaign-stat {
    text-align: center;
}

.campaign-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
}

.campaign-stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.influencer-stack {
    display: flex;
    align-items: center;
}

.influencer-stack-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-left: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.influencer-stack-avatar:last-child {
    margin-left: 0;
}

.influencer-stack-more {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-right: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

/* ========== CTA ========== */
.cta-section {
    background: linear-gradient(135deg, #1a1a2e, var(--darker));
    border-radius: 2rem;
    padding: 4rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(253, 86, 49, 0.3), transparent);
    border-radius: 50%;
    filter: blur(60px);
    animation: float 6s ease-in-out infinite;
}

.cta-glow:nth-child(1) {
    top: -100px;
    left: -100px;
}

.cta-glow:nth-child(2) {
    bottom: -100px;
    right: -100px;
    animation-delay: 2s;
    background: radial-gradient(circle, rgba(93, 60, 242, 0.3), transparent);
}

/* ========== تایپ‌نویسی پلتفرم‌ها با کرسر ========== */
#changing-text {
    display: inline-block;
    min-width: 130px;
    text-align: center;
    transition: none;
    font-weight: inherit;
    direction: ltr;
    position: relative;
}

/* برای پشتیبانی از RTL در متن فارسی */
#changing-text:not(:empty) {
    direction: rtl;
}

/* وقتی متن خالی‌ست، راست‌چین بمونه */
#changing-text:empty {
    direction: rtl;
}

/* ========== کرسر با رنگ گرادیان ========== */
#changing-text::after {
    content: '|';
    display: inline-block;
    animation: cursor-blink 0.8s step-end infinite;
    font-weight: 300;
    margin-right: 2px;
    /* رنگ رو از المان اصلی می‌گیره */
    color: inherit;
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;
    /* ولی یه سایه روشن برای دیده شدن */
    position: relative;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========== عکس پلتفرم - کشیده و پرکننده فضا ========== */
.platform-image-wrapper {
    width: 100%;
    max-width: 620px;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
}

.platform-hero-image {
    width: 100%;
    height: 420px; /* ارتفاع ثابت برای بزرگتر شدن */
    object-fit: cover; /* عکس رو برش میده تا فضا رو پر کنه */
    display: block;
    border-radius: 28px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* اگه نمیخوای برش بخوره و کل عکس رو ببینی، از object-fit: contain استفاده کن */
.platform-hero-image {
    width: 100%;
    height: 420px;
    object-fit: contain; /* کل عکس رو نشون میده */
}

/* ========== ریسپانسیو ========== */
@media (max-width: 992px) {
    .platform-hero-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .platform-hero-image {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .platform-hero-image {
        height: 250px;
    }
}
/* ========== عکس پلتفرم - کشیده و پرکننده فضا ========== */
.platform-image-wrapper {
    width: 100%;
    max-width: 620px;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* لایه glow رنگی هنگام تغییر عکس */
.platform-image-wrapper::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    background: radial-gradient(circle at center, var(--hero-glow-color, rgba(253, 86, 49, 0.45)), transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.45s ease;
    filter: blur(18px);
}

.platform-image-wrapper.is-changing::after {
    opacity: 1;
}

.platform-hero-image {
    width: 100%;
    height: 420px;
    object-fit: contain;
    display: block;
    border-radius: 28px;
    will-change: transform, opacity, filter;
    backface-visibility: hidden;
    transform-origin: center center;
    transition: none;
}

/* ========== انیمیشن خفن تغییر عکس ========== */

/* حالت خروج (عکس فعلی) */
.platform-hero-image.hero-exit {
    animation: heroImageExit 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes heroImageExit {
    0% {
        opacity: 1;
        transform: scale(1) rotateY(0deg) translateZ(0);
        filter: blur(0) brightness(1);
    }
    40% {
        opacity: 0.7;
        filter: blur(4px) brightness(1.15);
    }
    100% {
        opacity: 0;
        transform: scale(1.12) rotateY(-12deg) translateZ(-40px);
        filter: blur(12px) brightness(1.3);
    }
}

/* حالت ورود (عکس جدید) */
.platform-hero-image.hero-enter {
    animation: heroImageEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heroImageEnter {
    0% {
        opacity: 0;
        transform: scale(0.88) rotateY(14deg) translateZ(-60px);
        filter: blur(14px) brightness(0.85);
    }
    50% {
        opacity: 0.85;
        filter: blur(4px) brightness(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg) translateZ(0);
        filter: blur(0) brightness(1);
    }
}

/* حالت آماده برای ورود (قبل از شروع انیمیشن) */
.platform-hero-image.hero-enter-ready {
    opacity: 0;
    transform: scale(0.88) rotateY(14deg) translateZ(-60px);
    filter: blur(14px);
}

/* ========== ریسپانسیو ========== */
@media (max-width: 992px) {
    .platform-hero-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .platform-hero-image {
        height: 300px;
    }

    .platform-hero-image.hero-exit {
        animation-duration: 0.4s;
    }
    .platform-hero-image.hero-enter {
        animation-duration: 0.55s;
    }
}

@media (max-width: 576px) {
    .platform-hero-image {
        height: 250px;
    }
}

/* ========== ریسپانسیو هیرو برای موبایل ========== */
@media (max-width: 992px) {
    /* تبدیل چیدمان افقی به عمودی */
    .hero-section .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2.5rem;
    }

    /* متن وسط‌چین */
    .hero-section .d-flex.justify-content-between > div:first-child {
        text-align: center !important;
        width: 100%;
    }

    /* دکمه‌ها وسط‌چین */
    .hero-section .d-flex.gap-3 {
        justify-content: center !important;
    }

    /* wrapper عکس وسط‌چین */
    .hero-section .d-flex.justify-content-between > div:last-child {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .platform-image-wrapper {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-section .d-flex.justify-content-between {
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .platform-image-wrapper {
        max-width: 100%;
    }
}

/* ========== رفع فاصله بین "در" و نام پلتفرم در موبایل ========== */
@media (max-width: 768px) {
    /* حذف min-width که باعث ایجاد فاصله می‌شه */
    #changing-text {
        min-width: 0 !important;
        text-align: right !important;
        margin-right: 0 !important;
        padding-right: 0 !important;
    }

    /* خود quote-wrapper هم تراز کن */
    .quote-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        flex-wrap: nowrap;
    }
}
