/* ============================================
   home.css — صفحه اصلی (شبیه موکاپ)
   ============================================ */

/* ---------- هیرو وسط‌چین (شبیه Modrinth) ---------- */
.hero-center {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 64px 20px 44px;
    /* تمام‌عرض: از لبه‌ی چپ تا لبه‌ی راست صفحه (مستقل از عرض کانتینر) */
    margin: -10px calc(50% - 50vw) 0;
    /* تمام‌صفحه: کل ارتفاع دیدِ زیر هدر رو پر می‌کنه و محتوا وسطش می‌شینه */
    min-height: calc(100vh - var(--hdr-h, 72px));
    min-height: calc(100svh - var(--hdr-h, 72px));
    justify-content: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
}
/* جلوگیری از اسکرول افقی به‌خاطر 100vw (بدون خراب کردن sticky هدر) */
body:has(.hero-center) { overflow-x: clip; }
.hero-center__bg {
    position: absolute; inset: -4% 0;
    z-index: 0;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(63,143,47,.14), transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(63,143,47,.10), transparent 60%),
        repeating-linear-gradient(135deg, rgba(63,143,47,.045) 0px, rgba(63,143,47,.045) 2px, transparent 2px, transparent 26px);
    /* محو شدن پایین رو لایه‌ی .hero-center__fade انجام میده، پس خود الگو کل هیرو رو می‌پوشونه */
    animation: heroBgDrift 22s ease-in-out infinite;
    pointer-events: none;
}
[data-theme="dark"] .hero-center__bg {
    background-image:
        radial-gradient(circle at 50% 0%, rgba(98,201,74,.18), transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(98,201,74,.10), transparent 60%),
        repeating-linear-gradient(135deg, rgba(98,201,74,.05) 0px, rgba(98,201,74,.05) 2px, transparent 2px, transparent 26px);
}
@keyframes heroBgDrift {
    0%, 100% { opacity: 1; transform: translateY(0) scale(1); }
    50% { opacity: .82; transform: translateY(-2%) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-center__bg, .hero-center__blob { animation: none !important; }
}

/* لایه‌ی نرم‌کننده: پایین هیرو رو دقیقاً با رنگ پس‌زمینه‌ی صفحه یکی می‌کنه
   تا هیچ خط یا لبه‌ی مشخصی بین هیرو و بخش بعدی دیده نشه */
:root { --hero-fade-rgb: 247, 249, 252; }
[data-theme="dark"] { --hero-fade-rgb: 5, 11, 22; }
.hero-center__fade {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 120px;
    z-index: 0;
    background: linear-gradient(to top,
        rgba(var(--hero-fade-rgb), 1) 0%,
        rgba(var(--hero-fade-rgb), .75) 30%,
        rgba(var(--hero-fade-rgb), .32) 60%,
        rgba(var(--hero-fade-rgb), 0) 100%);
    pointer-events: none;
}
.hero-center__blob {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(50px);
    opacity: .35;
    pointer-events: none;
}
.hero-center__blob--1 {
    width: 220px; height: 220px;
    background: var(--accent);
    top: -60px; right: 6%;
    animation: heroBlobDrift 9s ease-in-out infinite;
}
.hero-center__blob--2 {
    width: 160px; height: 160px;
    background: var(--accent-2);
    bottom: -30px; left: 8%;
    animation: heroBlobDrift 11s ease-in-out infinite reverse;
}
@keyframes heroBlobDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-14px, 16px) scale(1.12); }
}
@media (max-width: 768px) {
    .hero-center__blob--1 { width: 130px; height: 130px; }
    .hero-center__blob--2 { width: 110px; height: 110px; }
}
.hero-center__logo {
    position: relative; z-index: 1;
    width: 150px; height: 150px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px;
    animation: heroLogoFloat 4s ease-in-out infinite;
}
.hero-center__logo img {
    width: 100%; height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(63,143,47,.45));
}
.hero-center__logo-fallback {
    display: none;
    width: 100%; height: 100%;
    align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff; font-size: 58px;
    box-shadow: 0 16px 40px rgba(63,143,47,.4);
}
@keyframes heroLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.hero-center__title-line1 {
    position: relative; z-index: 1;
    font-family: "Lalezar", "Poppins", sans-serif;
    font-size: 34px; font-weight: 400;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0 auto;
    max-width: 640px;
    width: 100%;
}
.hero-center__rotate-wrap {
    position: relative; z-index: 1;
    display: block;
    overflow: hidden;
    margin: 2px auto 18px;
    line-height: 1.4;
}
.hero-center__rotate {
    display: inline-block;
    font-family: "Lalezar", "Poppins", sans-serif;
    color: var(--accent);
    font-weight: 400;
    font-size: 38px;
    cursor: pointer;
    padding: 2px 10px;
    border-radius: 10px;
    transition: transform .26s ease, opacity .26s ease, background .2s ease, filter .26s ease;
    transform: translateY(0); opacity: 1;
}
.hero-center__rotate.is-out { transform: translateY(14px) scale(.9); opacity: 0; filter: blur(2px); }
.hero-center__rotate.is-in { animation: heroRotateIn .32s cubic-bezier(.34,1.56,.64,1); }
@keyframes heroRotateIn {
    from { transform: translateY(-12px) scale(.92); opacity: 0; filter: blur(2px); }
    to   { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}
.hero-center__rotate:hover,
.hero-center__rotate.is-held {
    background: rgba(63,143,47,.12);
}
[data-theme="dark"] .hero-center__rotate:hover,
[data-theme="dark"] .hero-center__rotate.is-held {
    background: rgba(98,201,74,.16);
}
.hero-center__sub {
    position: relative; z-index: 1;
    font-size: 14px; font-weight: 600; line-height: 1.9;
    color: var(--text-muted);
    max-width: 440px;
    width: 100%;
    margin: 0 auto 26px;
}
.hero-center__actions {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    gap: 12px; flex-wrap: wrap;
    width: 100%;
}
.hero-center__btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px;
    border-radius: 30px;
    font-family: "Vazirmatn", "Poppins", sans-serif;
    font-weight: 700; font-size: 14px;
    transition: transform .2s, box-shadow .2s;
}
.hero-center__btn--primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 10px 24px rgba(63,143,47,.4);
}
.hero-center__btn--outline {
    background: transparent;
    color: var(--text-main);
    border: 1.5px solid var(--border-soft);
}
.hero-center__btn:hover { transform: translateY(-2px); }

@media (max-width: 768px) {
    .hero-center { padding: 30px 16px 40px; margin: -10px calc(50% - 50vw) 0; }
    .hero-center__logo { width: 84px; height: 84px; margin-bottom: 12px; }
    .hero-center__logo-fallback { font-size: 32px; }
    .hero-center__title-line1 { font-size: 21px; line-height: 1.7; }
    .hero-center__rotate { font-size: 23px; }
    .hero-center__sub { font-size: 12px; line-height: 2; margin-bottom: 16px; }
    .hero-center__btn { padding: 9px 16px; font-size: 12px; }
    .hero-center__fade { height: 80px; }
}

/* ---------- هیرو (قدیمی) ---------- */
.hero-mc {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #071a36 0%, #10315e 50%, #0a1c3c 100%);
    min-height: 240px;
    padding: 30px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0;
    box-shadow: 0 14px 40px rgba(0,20,60,.35), inset 0 1px rgba(255,255,255,.06);
    border: 1px solid rgba(92,201,255,.22);
}
.hero-mc__bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 78% 45%, rgba(92,201,255,.35), transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(124,92,255,.25), transparent 55%);
    pointer-events: none;
}
.hero-mc__content { position: relative; z-index: 3; max-width: 58%; }
.hero-mc__eyebrow { color: #b8d4ff; font-size: 12px; margin-bottom: 6px; }
.hero-mc__title {
    font-size: 20px; font-weight: 800; color: #ffffff;
    line-height: 1.5; margin-bottom: 6px;
}
.hero-mc__title .hl {
    background: linear-gradient(135deg, #7dd3ff, #38b6ff 50%, #2f6bff);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    font-size: 26px; display: block; line-height: 1.3;
    filter: drop-shadow(0 4px 12px rgba(56,182,255,.4));
}
.hero-mc__sub { color: #b8d4ff; font-size: 12px; line-height: 1.8; margin-bottom: 16px; }
.hero-mc__btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    background: linear-gradient(135deg, #38b6ff, #2f6bff);
    color: #fff; border-radius: 30px; font-weight: 700; font-size: 13px;
    box-shadow: 0 8px 20px rgba(47,107,255,.5);
    transition: transform .2s;
}
.hero-mc__btn:hover { transform: translateY(-2px); }
.hero-mc__art {
    position: absolute; right: -10px; bottom: 0;
    height: 105%; max-height: 260px;
    z-index: 2;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,.55));
    pointer-events: none;
}
.hero-mc__dots {
    position: absolute; bottom: 12px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 4;
}
.hero-mc__dots span {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.4);
    transition: all .3s;
}
.hero-mc__dots span.active {
    width: 20px; border-radius: 4px;
    background: #5cc9ff; box-shadow: 0 0 10px #5cc9ff;
}

/* ---------- ردیف دسته‌بندی ---------- */
.cat-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 20px 0;
}
.cat-strip__item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    cursor: pointer;
}
.cat-strip__item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(47,107,255,.2);
}
.cat-strip__icon {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
}
.cat-strip__icon.c-plugin { background: linear-gradient(135deg, #8b5cf6, #6d28d9); box-shadow: 0 6px 18px rgba(139,92,246,.4); }
.cat-strip__icon.c-client { background: linear-gradient(135deg, #38b6ff, #2f6bff); box-shadow: 0 6px 18px rgba(56,182,255,.4); }
.cat-strip__icon.c-script { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 6px 18px rgba(239,68,68,.4); }
.cat-strip__icon.c-server { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 6px 18px rgba(245,158,11,.4); }
.cat-strip__icon.c-other  { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 6px 18px rgba(16,185,129,.4); }

.cat-strip__name { font-size: 11px; font-weight: 700; color: var(--text-main); line-height: 1.3; }
.cat-strip__sub { font-size: 9.5px; color: var(--text-muted); line-height: 1.4; }

/* ---------- تیتر بخش ---------- */
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin: 26px 0 14px;
}
.section-head h2 {
    font-size: 17px; font-weight: 800;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-main);
}
.section-head h2 i { color: var(--accent); font-size: 16px; }
.section-head a {
    font-size: 12px; color: var(--accent); font-weight: 600;
    display: flex; align-items: center; gap: 4px;
}

/* ---------- گرید کارت‌ها ---------- */
.mc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

/* ---------- کارت محصول (شبیه موکاپ) ---------- */
.mc-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 14px;
    display: flex; flex-direction: column;
    gap: 12px;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    overflow: hidden;
}
.mc-card::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(92,201,255,.06), transparent 60%);
    pointer-events: none;
}
.mc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(47,107,255,.22);
    border-color: rgba(56,182,255,.4);
}

.mc-card__head {
    display: flex; gap: 12px; align-items: stretch;
    min-height: 78px;
}
.mc-card__thumb {
    width: 78px; height: 78px; flex-shrink: 0;
    border-radius: 14px;
    background: radial-gradient(circle at 40% 40%, #0f2140, #050a17);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 22px rgba(92,201,255,.25);
    border: 1px solid rgba(92,201,255,.15);
}
.mc-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.mc-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.mc-card__badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 9.5px; font-weight: 700;
    padding: 3px 9px; border-radius: 20px;
    color: #fff; letter-spacing: .2px;
}
.mc-card__badge.b-plugin { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.mc-card__badge.b-client { background: linear-gradient(135deg, #38b6ff, #2f6bff); }
.mc-card__badge.b-script { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.mc-card__badge.b-server { background: linear-gradient(135deg, #f59e0b, #d97706); }
.mc-card__badge.b-other  { background: linear-gradient(135deg, #10b981, #059669); }

.mc-card__title {
    font-size: 13.5px; font-weight: 700;
    color: var(--text-main);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-card__sub {
    font-size: 10.5px; color: var(--text-muted);
    line-height: 1.5; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-card__rating {
    font-size: 11px; display: flex; align-items: center; gap: 4px;
    color: #f5b946; font-weight: 600;
}
.mc-card__rating .count { color: var(--text-muted); font-size: 10px; font-weight: 500; }

.mc-card__foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-top: auto; padding-top: 4px;
}
.mc-card__price {
    font-size: 13px; font-weight: 800; color: var(--accent);
    display: flex; align-items: baseline; gap: 3px;
}
.mc-card__price .unit { font-size: 10px; color: var(--text-muted); font-weight: 500; }
.mc-card__price .old {
    font-size: 10.5px; color: var(--text-faint);
    text-decoration: line-through; margin-inline-start: 4px; font-weight: 500;
}

.mc-card__cart {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 11px;
    background: var(--accent-gradient);
    color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    box-shadow: 0 6px 14px rgba(47,107,255,.4);
    transition: transform .2s, box-shadow .2s;
}
.mc-card__cart:hover { transform: scale(1.08); box-shadow: 0 8px 18px rgba(47,107,255,.6); }
.mc-card__cart.atc-disabled { opacity: .4; pointer-events: none; }

/* ---------- موبایل ---------- */
@media (max-width: 768px) {
    .hero-mc {
        min-height: 200px;
        padding: 20px 16px 34px;
        margin: 12px 0;
        border-radius: 18px;
    }
    .hero-mc__content { max-width: 62%; }
    .hero-mc__eyebrow { font-size: 10.5px; }
    .hero-mc__title { font-size: 14px; margin-bottom: 4px; }
    .hero-mc__title .hl { font-size: 19px; }
    .hero-mc__sub { font-size: 10.5px; margin-bottom: 12px; line-height: 1.7; }
    .hero-mc__btn { padding: 8px 16px; font-size: 11.5px; }
    .hero-mc__art { max-height: 200px; right: -20px; }

    .cat-strip {
        gap: 6px;
        margin: 14px 0;
    }
    .cat-strip__item { padding: 12px 4px 9px; border-radius: 13px; gap: 6px; }
    .cat-strip__icon { width: 36px; height: 36px; border-radius: 11px; font-size: 16px; }
    .cat-strip__name { font-size: 9.5px; }
    .cat-strip__sub { display: none; }

    .section-head { margin: 20px 0 10px; }
    .section-head h2 { font-size: 14px; }
    .section-head h2 i { font-size: 13px; }
    .section-head a { font-size: 11px; }

    .mc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .mc-card { padding: 10px; gap: 8px; border-radius: 14px; }
    .mc-card__head { flex-direction: column; gap: 8px; min-height: auto; }
    .mc-card__thumb {
        width: 100%; height: 92px;
        border-radius: 11px;
    }
    .mc-card__body { gap: 3px; }
    .mc-card__title { font-size: 12px; }
    .mc-card__sub { font-size: 9.5px; }
    .mc-card__rating { font-size: 10px; }
    .mc-card__price { font-size: 11.5px; }
    .mc-card__price .unit { font-size: 9px; }
    .mc-card__price .old { font-size: 9px; }
    .mc-card__cart { width: 32px; height: 32px; font-size: 12px; border-radius: 9px; }
}

@media (max-width: 400px) {
    .hero-mc__content { max-width: 68%; }
    .hero-mc__title .hl { font-size: 17px; }
    .hero-mc__art { max-height: 170px; }
}

/* ---------- متن سئوی صفحه اصلی ---------- */
.home-seo { max-width: 860px; margin: 48px auto 20px; line-height: 2.1; color: var(--text-muted); font-size: 14px; }
.home-seo h2 { font-size: 20px; font-weight: 800; color: var(--text-main); margin: 0 0 14px; }
.home-seo h3 { font-size: 16px; font-weight: 700; color: var(--text-main); margin: 22px 0 8px; }
.home-seo p { margin: 0 0 12px; }
.home-seo strong { color: var(--text-main); font-weight: 700; }
@media (max-width: 768px) { .home-seo { font-size: 13px; margin-top: 32px; } .home-seo h2 { font-size: 17px; } }
