﻿/* ==========================================================================
   ۱. لود کردن فونت‌های سفارشی از مسیر محلی آپلودها
   ========================================================================== */
@font-face {
    font-family: 'YekanBakh-Black';
    src: url('../../uploads/fonts/YekanBakh-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh-Bold';
    src: url('../../uploads/fonts/YekanBakh-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   ۲. استایل‌های ساختاری کامپوننت هیرو
   ========================================================================== */

.main-content {
    padding-top: 170px;
}

.hero-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 40px 0 40px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 1.8fr 0.7fr;
    grid-template-areas: "text visual stats";
    align-items: center;
    gap: 24px 16px;
}

/* --- ستون سمت راست: متن‌ها --- */
.hero-right {
    grid-area: text;
    text-align: right;
    position: relative;
    z-index: 10;
    min-width: 0;
}

/* متن دسترسی به دنیای آنلاین */
.hero-subtitle {
    font-family: 'YekanBakh-Bold', sans-serif;
    font-weight: 700;
    color: #FFFFFF;
    font-size: 16px;
    display: block;
    margin-bottom: 15px;
}

/* متن طراحی سایت شرکتی و فروشگاهی */
.hero-title {
    font-family: 'YekanBakh-Black', sans-serif;
    font-size: clamp(22px, 4vw, 42px);
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 35px;
    color: #FFFFFF;
    white-space: normal;
    word-wrap: break-word;
}

.hero-features {
    list-style: none;
}

.hero-features li {
    font-size: 16px;
    color: #B2D0E6;
    margin-bottom: 22px;
    position: relative;
    padding-right: 24px;
}

.hero-features li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: #0066FF;
    border-radius: 2px;
}

/* --- ستون وسط: تصویر، هاله و رینگ‌ها --- */
.hero-center {
    grid-area: visual;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: -20px;
    margin-left: -230px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* هاله نورانی غلیظ پشت لپ‌تاپ (Glow Effect) */
.image-wrapper::before {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.9) 0%, rgba(0, 102, 255, 0.6) 40%, rgba(0, 0, 0, 0) 75%);
    filter: blur(55px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.main-laptop {
    width: 100%;
    height: auto;
    z-index: 5;
    position: relative;
}

/* --- استایل رینگ‌های تصویری اصلی --- */
.hero-ring {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: auto;
}

.ring-1 {
    width: 120%;
}

.ring-2 {
    width: 100%;
}

/* ==========================================================================
   ۳. بخش حرکت روان توپ‌ها روی بالاترین لایه‌ی ممکن (Always on Top)
   ========================================================================== */

.hero-ball {
    position: absolute;
    z-index: 7; /* توپ‌ها همیشه بالاتر از همه لایه‌ها باقی می‌مانند */
    border-radius: 50%;
}

/* توپ اول (آبی نئونی - روی رینگ بزرگ) */
.ball-1 {
    width: 14px;
    height: 14px;
    background-color: #0066FF;
    box-shadow: 0 0 12px #0066FF, 0 0 25px #0066FF;
    
    offset-path: ellipse(60% 25% at 50% 50%);
    animation: moveAlwaysOnTop 14s linear infinite;
}

/* توپ دوم (سفید درخشان - روی رینگ کوچک) */
.ball-2 {
    width: 10px;
    height: 10px;
    background-color: #FFFFFF;
    box-shadow: 0 0 10px #FFFFFF, 0 0 20px rgba(0, 102, 255, 0.8);
    
    offset-path: ellipse(50% 20% at 50% 50%);
    animation: moveAlwaysOnTopReverse 18s linear infinite;
}

/* انیمیشن‌های خطی و پیوسته حرکت */
@keyframes moveAlwaysOnTop {
    0% { offset-distance: 0%; }
    100% { offset-distance: 100%; }
}

@keyframes moveAlwaysOnTopReverse {
    0% { offset-distance: 100%; }
    100% { offset-distance: 0%; }
}

/* --- انیمیشن ستاره‌های شناور --- */
@keyframes floatStar {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.hero-star {
    position: absolute;
    z-index: 6;
    height: auto;
}
.star-big { width: 42px; }
.star-small { width: 20px; }

.star-1 { top: 8%; right: 12%; animation: floatStar 4s ease-in-out infinite; }
.star-2 { top: 45%; left: -5%; animation: floatStar 5s ease-in-out infinite 1s; }
.star-3 { bottom: 25%; right: 2%; animation: floatStar 4.5s ease-in-out infinite 0.5s; }
.star-4 { bottom: 8%; left: 15%; animation: floatStar 5.5s ease-in-out infinite 1.5s; }

/* --- ستون سمت چپ: آمار --- */
.hero-left {
    grid-area: stats;
    display: flex;
    flex-direction: column;
    gap: 45px;
    align-items: flex-end;
    position: relative;
    z-index: 10;
    min-width: 0;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5px;
}

.stat-number {
    font-size: 38px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-label {
    font-size: 14px;
    color: #B2D0E6;
    margin-top: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   ۴. بخش جدید: استایل‌های نوار ویژگی‌ها (Features Bar)
   ========================================================================== */

.features-bar-section {
    max-width: 1440px;
    margin: 80px auto 40px auto; /* فاصله مناسب از هیرو سکشن */
    padding: 0 40px;
    direction: rtl;
    box-sizing: border-box;
}

.features-bar-container {
    background-color: #0066FF;
    border-radius: 40px;
    position: relative;
    padding: 30px 60px;
    box-shadow: 0 20px 40px rgba(0, 102, 255, 0.2);
    box-sizing: border-box;
}

.features-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF;
}

/* --- بخش راست نوار آبی --- */
.fb-right {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fb-title {
    font-family: 'YekanBakh-Black', sans-serif;
    font-size: 32px;
    font-weight: 900;
    margin: 0;
    line-height: 1;
}

.fb-subtitle {
    font-family: 'YekanBakh-Bold', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #E6F0FF;
}

/* --- بخش وسط (آیتم‌های آیکون‌دار) --- */
.fb-center {
    display: flex;
    gap: 45px;
    align-items: center;
}

.fb-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fb-item-text {
    font-family: 'YekanBakh-Bold', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

/* کنترل قطعی ابعاد آیکون‌های SVG جهت جلوگیری از غول‌پیکر شدن */
.fb-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    color: #FFFFFF;
}

/* --- بخش چپ نوار آبی --- */
.fb-left {
    max-width: 250px;
    text-align: right;
    line-height: 1.6;
}

.fb-left p {
    font-size: 14px;
    margin: 0;
    color: #E6F0FF;
}

/* ==========================================================================
   ۵. طراحی گردالی پایین نوار (Notch) و فلش درون آن با منحنی نرم معکوس
   ========================================================================== */

.features-notch {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 35px;
    background-color: #0066FF;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5px;
    z-index: 5;
    box-sizing: border-box;
}

/* گوشه‌های نرم متصل‌کننده چپ و راست گردالی */
.features-notch::before,
.features-notch::after {
    content: "";
    position: absolute;
    top: 0;
    width: 30px;
    height: 30px;
    background-color: transparent;
}

.features-notch::before {
    left: -30px;
    border-top-right-radius: 30px;
    box-shadow: 15px -15px 0 0 #0066FF;
}

.features-notch::after {
    right: -30px;
    border-top-left-radius: 30px;
    box-shadow: -15px -15px 0 0 #0066FF;
}

.notch-arrow {
    width: 22px;
    height: 22px;
    color: #FFFFFF;
    margin-top: 2px;
}

/* ==========================================================================
   ۶. واکنش‌گرایی هیرو — Grid مدرن
   ========================================================================== */

@media (max-width: 1200px) {
    .hero-center {
        margin-left: -80px;
        margin-right: -10px;
    }

    .hero-container {
        grid-template-columns: 1fr 1.4fr 0.6fr;
        gap: 20px 12px;
    }

    .image-wrapper::before {
        width: 380px;
        height: 380px;
    }
}

/* تبلت و موبایل: چیدمان عمودی — متن بالا، لپ‌تاپ پایین */
@media (max-width: 1100px) {
    .main-content {
        padding-top: 96px;
    }

    .hero-section {
        padding: 16px 24px 0;
        overflow: visible;
    }

    .hero-container {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "text"
            "visual"
            "stats";
        gap: 32px;
        align-items: center;
        justify-items: center;
        width: 100%;
    }

    .hero-right {
        width: 100%;
        max-width: 560px;
        text-align: center;
        justify-self: center;
    }

    .hero-center {
        width: 100%;
        max-width: 480px;
        margin: 0 !important;
        justify-self: center;
    }

    .hero-left {
        width: 100%;
        max-width: 480px;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px 36px;
        align-items: center;
        align-self: center;
    }

    .hero-features {
        display: inline-block;
        text-align: right;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-features li {
        text-align: right;
    }

    .image-wrapper {
        max-width: 100%;
        width: min(420px, 92vw);
    }

    .image-wrapper::before {
        width: min(340px, 80vw);
        height: min(340px, 80vw);
    }

    .ring-1 { width: 110%; }
    .ring-2 { width: 95%; }
}

@media (max-width: 768px) {
    .main-content {
        padding-top: 88px;
    }

    .hero-section {
        padding: 12px 20px 0;
    }

    .hero-container {
        gap: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-features li {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .stat-number {
        font-size: 28px;
    }

    .stat-label {
        font-size: 12px;
    }

    .hero-left {
        gap: 16px 28px;
    }

    .image-wrapper {
        width: min(360px, 90vw);
    }

    .star-big { width: 28px; }
    .star-small { width: 16px; }
}

@media (max-width: 576px) {
    .main-content {
        padding-top: 80px;
    }

    .hero-container {
        gap: 24px;
    }

    .hero-center {
        max-width: 100%;
    }

    .image-wrapper {
        width: min(300px, 88vw);
    }

    .image-wrapper::before {
        width: min(280px, 75vw);
        height: min(280px, 75vw);
        filter: blur(40px);
    }

    .ring-1,
    .ring-2 {
        opacity: 0.75;
    }

    .ball-1,
    .ball-2 {
        display: none;
    }

    .star-2 { left: 0; }
    .star-4 { left: 10%; }

    .hero-left {
        gap: 14px 20px;
    }

    .stat-box {
        min-width: 88px;
    }

    .stat-number {
        font-size: 24px;
    }
}

@media (max-width: 400px) {
    .image-wrapper {
        width: min(260px, 86vw);
    }

    .hero-star.star-3,
    .hero-star.star-4 {
        display: none;
    }
}