/* =====================================================
   هوم‌پیج عمومی + صفحه بلاگ
   این فایل روی assets/css/style.css سوار می‌شود (فونت‌ها و متغیرهای رنگی از همان‌جا می‌آیند)
   ===================================================== */

body.home-page {
    min-height: 100dvh;
    display: block;
    padding: 0;
}

.home-shell {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px 10px;
}

/* ===================== هدر هوم‌پیج ===================== */
.home-header {
    text-align: center;
    padding: 38px 10px 26px;
}

.home-header .brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--c-primary);
    background: color-mix(in srgb, var(--c-primary) 12%, transparent);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.home-header h1 {
    margin: 0 0 10px;
    font-size: clamp(24px, 4.6vw, 38px);
    font-weight: 800;
    line-height: 1.35;
    color: var(--text);
}

.home-header p {
    margin: 0 auto;
    max-width: 560px;
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.9;
}

/* ===================== بج‌های وضعیت (مشترک بین هیرو و کارت‌ها) ===================== */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.status-chip.is-live {
    background: rgba(22, 163, 74, .14);
    color: #16a34a;
}
[data-mode="dark"] .status-chip.is-live,
html:not([data-mode="light"]) .status-chip.is-live { color: #4ade80; }

.status-chip.is-live .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,.6);
    animation: pulse-dot 1.6s infinite;
}

@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
    70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.status-chip.is-upcoming { background: rgba(217, 119, 6, .15); color: #b45309; }
.status-chip.is-ended    { background: rgba(107, 114, 128, .16); color: #6b7280; }
[data-mode="dark"] .status-chip.is-upcoming,
html:not([data-mode="light"]) .status-chip.is-upcoming { color: #fbbf24; }
[data-mode="dark"] .status-chip.is-ended,
html:not([data-mode="light"]) .status-chip.is-ended { color: #9ca3af; }

@media (prefers-color-scheme: light) {
    html[data-mode="auto"] .status-chip.is-live { color: #16a34a; }
    html[data-mode="auto"] .status-chip.is-upcoming { color: #b45309; }
    html[data-mode="auto"] .status-chip.is-ended { color: #6b7280; }
}

/* ===================== بخش هیرو (رویداد در حال برگزاری) ===================== */
.hero-event {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 22px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 16px 42px rgba(15, 23, 42, .14);
    margin-bottom: 40px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.hero-event:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 52px rgba(15, 23, 42, .18);
}

.hero-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 11;
    background: linear-gradient(135deg, var(--c-grad-1), var(--c-grad-2));
    overflow: hidden;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 45%);
}

.hero-badges {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.hero-badges .status-chip {
    background: rgba(255,255,255,.92);
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.hero-badges .status-chip.is-live { background: rgba(255,255,255,.92); color: #15803d; }

.hero-body {
    padding: 24px 26px 28px;
    text-align: center;
}

.hero-eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: var(--c-primary);
    margin-bottom: 8px;
    letter-spacing: .3px;
}

.hero-title {
    font-size: clamp(22px, 3.6vw, 32px);
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.4;
    color: var(--text);
}

.hero-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 20px;
    line-height: 1.9;
    white-space: pre-line;
}

.hero-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 34px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--c-grad-1), var(--c-grad-2));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    align-self: flex-start;
    justify-content: center;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--c-primary) 35%, transparent);
}

/* اگر چند رویداد هم‌زمان در حال برگزاری باشند */
.hero-secondary-note {
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
    margin: -22px 0 32px;
}

@media (min-width: 760px) {
    .hero-event { display: flex; }
    .hero-banner { width: 46%; aspect-ratio: auto; }
    .hero-body { width: 54%; text-align: start; padding: 34px 36px; display: flex; flex-direction: column; justify-content: center; }
    .hero-subtitle { margin: 0 0 20px; }
    .hero-meta { justify-content: flex-start; }
    .hero-cta { align-self: flex-start; }
    .hero-badges { inset-inline-start: auto; inset-inline-end: 16px; }
}

/* ===================== عنوان بخش‌ها ===================== */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 18px;
}

.section-head h2 {
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-head .section-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

section.home-section { margin-bottom: 44px; }

/* ===================== گرید رویدادها ===================== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}

.event-card-mini {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.event-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, .16);
}

.event-card-mini .thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 2.3;
    background: linear-gradient(135deg, var(--c-grad-1), var(--c-grad-2));
    overflow: hidden;
}

.event-card-mini .thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.event-card-mini .thumb .status-chip {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: rgba(255,255,255,.92);
    color: inherit;
}
.event-card-mini .thumb .status-chip.is-live { color: #15803d; }
.event-card-mini .thumb .status-chip.is-upcoming { color: #b45309; }
.event-card-mini .thumb .status-chip.is-ended { color: #4b5563; }

.event-card-mini .body {
    padding: 15px 16px 17px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-card-mini .title {
    font-size: 15.5px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.6;
    color: var(--text);
}

.event-card-mini .excerpt {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0 0 12px;
    flex: 1;
}

.event-card-mini .date-row {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

/* ===================== بخش بلاگ ===================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.blog-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(15, 23, 42, .16); }

.blog-card .thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--c-grad-1), var(--c-grad-2));
    overflow: hidden;
}
.blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.blog-card .body { padding: 16px 17px 18px; display: flex; flex-direction: column; flex: 1; }

.blog-card .date { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }

.blog-card .title { font-size: 15.5px; font-weight: 700; margin: 0 0 8px; line-height: 1.6; }

.blog-card .excerpt { font-size: 12.5px; color: var(--text-muted); line-height: 1.85; margin: 0 0 12px; flex: 1; }

.blog-card .related-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    color: var(--c-primary);
    background: color-mix(in srgb, var(--c-primary) 10%, transparent);
    padding: 5px 11px;
    border-radius: 999px;
}

/* ===================== حالت خالی ===================== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    background: var(--surface);
    border: 1.5px dashed var(--border);
    border-radius: 18px;
    font-size: 13.5px;
    line-height: 1.9;
}

.empty-state .emoji { font-size: 34px; margin-bottom: 10px; display: block; }

/* ===================== فوتر ===================== */
footer.home-footer {
    text-align: center;
    font-size: 11.5px;
    color: var(--text-muted);
    padding: 26px 16px 34px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
}

/* ===================== صفحه تک‌پست بلاگ ===================== */
.blog-post-shell {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 16px 50px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 18px;
}
.back-link:hover { color: var(--c-primary); }

.blog-post-cover {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-grad-1), var(--c-grad-2));
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}
.blog-post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.blog-post-date { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

.blog-post-title { font-size: clamp(22px, 4vw, 30px); font-weight: 800; line-height: 1.5; margin: 0 0 14px; }

.blog-post-related {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--c-primary);
    background: color-mix(in srgb, var(--c-primary) 10%, transparent);
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 24px;
}

.blog-post-content {
    font-size: 15px;
    line-height: 2.1;
    color: var(--text);
    white-space: pre-line;
    margin-bottom: 26px;
}

.blog-post-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.blog-post-gallery a {
    display: block;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.blog-post-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.blog-post-gallery a:hover img { transform: scale(1.06); }

@media (min-width: 640px) {
    .home-shell { padding: 0 24px 10px; }
}
