﻿/* ─── BLOG PAGE ─── */
.page { padding: 0 60px 48px; position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; }

/* ── HERO CARDS ── */
.hero-cards {
    display: flex;
    gap: 24px;
    margin-top: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
}
.hero-cards::-webkit-scrollbar { display: none; }
.hero-card { scroll-snap-align: start; flex-shrink: 0; }
.hero-card { position: relative; border-radius: 30px; overflow: hidden; flex-shrink: 0; display: block; text-decoration: none; }
.hero-card img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, black 100%); border-radius: 30px; }
.hero-card .card-text { position: absolute; bottom: 24px; right: 24px; left: 24px; z-index: 2; text-align: right; }
.hero-card .cat { font-size: 14px; font-weight: 500; color: #f2971e; margin-bottom: 8px; }
.hero-card .title { font-size: 24px; font-weight: 700; color: #fff; line-height: 1.4; }
.hc-sm { width: 366px; height: 500px; }
.hc-sm .title { font-size: 22px; }
.hc-lg { width: 536px; height: 500px; }
.hc-lg .title { font-size: 28px; }

/* ── ARTICLES ROW ── */
.articles-row {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.articles-row::-webkit-scrollbar { display: none; }
.article-item { flex: 1; display: flex; gap: 8px; align-items: center; justify-content: flex-end; text-decoration: none; color: inherit; }
.article-item-text { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.article-meta { display: flex; align-items: center; gap: 8px; }
.article-date { display: flex; align-items: center; gap: 4px; font-size: 12.3px; color: #5e6972; }
.meta-sep { width: 1px; height: 13px; background: #e7e9eb; flex-shrink: 0; }
.article-cat { font-size: 14px; font-weight: 700; color: #212529; }
.article-title { font-size: 14px; font-weight: 800; color: #212529; text-align: right; line-height: 1.4; }
.article-thumb { width: 88px; height: 88px; border-radius: 15px; overflow: hidden; flex-shrink: 0; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── SECTION HEADER ── */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; flex-direction: row-reverse; }
.section-title { text-align: right; }
.section-title .sub {
    font-size: 12px;
    color: #14a8e3;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.section-title .main {
    font-size: 22px;
    font-weight: 800;
    color: #184362;
    position: relative;
    padding-right: 12px;
}
.section-title .main::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: #f2971e;
    border-radius: 4px;
}

/* dark section */
.dark-section .section-title .sub { color: rgba(255,255,255,0.6); }
.dark-section .section-title .main { color: #fff; }
.dark-section .section-title .main::before { background: #f2971e; }
.view-all {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600;
    color: #fff; cursor: pointer;
    text-decoration: none;
    background: #14a8e3;
    padding: 6px 16px;
    border-radius: 20px;
    transition: background 0.2s;
}
.view-all:hover { background: #0e8bbf; color: #fff; }

/* dark section روی پس‌زمینه تیره */
.dark-section .view-all {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.dark-section .view-all:hover { background: rgba(255,255,255,0.25); }

/* ── POPULAR GRID ── */
.popular-grid {
    display: flex;
    gap: 24px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
    justify-content: flex-start;
}
.popular-grid::-webkit-scrollbar { display: none; }
.pop-card { scroll-snap-align: start; flex-shrink: 0; }
.pop-card { width: 312px; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.pop-card-img { width: 312px; height: 241px; border-radius: 30px 30px 0 30px; overflow: hidden; position: relative; flex-shrink: 0; }
.pop-card-img img { width: 100%; height: 100%; object-fit: cover; }
.pop-card-tag { position: absolute; bottom: -14px; right: 0; background: #14a8e3; color: #fff; font-size: 14px; font-weight: 500; padding: 4px 8px; border-radius: 15px 0 15px 15px; }
.pop-card-body { padding-top: 24px; text-align: right; }
.pop-card-body .title { font-size: 20px; font-weight: 800; color: #212529; line-height: 1.4; margin-bottom: 4px; }
.pop-card-body .desc { font-size: 16px; color: #5e6972; line-height: 1.5; }

/* ── DARK SECTION ── */
.dark-section { background: #184362; padding: 48px 60px; }

.video-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* پلیر اصلی */
.video-main {
    flex: 1;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    background: #000;
    min-width: 0;
    height: 0;
    padding-bottom: 56.25%; /* نسبت 16:9 */
}
.video-main iframe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
}
.video-main video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.video-main > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-main::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 57%, black 100%); }
.video-main-text { position: absolute; bottom: 30px; right: 30px; left: 30px; z-index: 2; text-align: right; }
.video-main-text .cat { font-size: 14px; font-weight: 500; color: #f2971e; margin-bottom: 8px; }
.video-main-text .title { font-size: 32px; font-weight: 700; color: #fff; line-height: 1.3; }

/* لیست ویدیوها */
.video-list {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 550px;
    scrollbar-width: none;
}
.video-list::-webkit-scrollbar { display: none; }

.video-item {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.video-item:hover { background: rgba(255,255,255,0.08); }
.active-video-item { background: rgba(255,255,255,0.12) !important; }

.video-item-text { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.video-item-meta { display: flex; align-items: center; gap: 8px; }
.video-item-date { display: flex; align-items: center; gap: 4px; font-size: 11px; color: rgba(255,255,255,0.7); }
.vsep { width: 1px; height: 13px; background: rgba(255,255,255,.3); flex-shrink: 0; }
.video-item-cat { font-size: 12px; font-weight: 700; color: #fff; }
.video-item-title { font-size: 13px; font-weight: 700; color: #fff; text-align: right; line-height: 1.4; }

.video-thumb { width: 90px; height: 70px; border-radius: 10px; overflow: hidden; flex-shrink: 0; position: relative; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }

.play-sm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); }
.play-btn-sm { background: rgba(255,255,255,0.9); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }

/* ── BLOG GRID ── */
.blog-section { margin-top: 48px; }
.blog-two-col { display: flex; gap: 24px; }
.blog-left { width: 424px; flex-shrink: 0; display: flex; flex-direction: column; gap: 48px; }
.blog-right { flex: 1; display: flex; flex-direction: column; gap: 24px; }
.blog-grid-row { display: flex; gap: 26px; }

/* Playlist */
.playlist { display: flex; flex-direction: column; gap: 4px; }
.playlist-item { height: 60px; border-radius: 15px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; text-decoration: none; }
.playlist-item > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.playlist-item::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 1; }
.playlist-item-content { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; width: 100%; }
.playlist-num { background: #fff; border-radius: 10px; padding: 4px 16px; font-size: 14px; font-weight: 500; color: #ff794c; }
.playlist-title { font-size: 14px; font-weight: 500; color: #fff; }

/* Small article list */
.small-article-list { display: flex; flex-direction: column; }
.small-article { display: flex; gap: 8px; align-items: center; justify-content: flex-start; flex-direction: row; padding: 14px 0; border-bottom: 1px solid #e7e9eb; text-decoration: none; color: inherit; }
.small-article:last-child { border-bottom: none; }
.small-article-text { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.small-article-meta { display: flex; align-items: center; gap: 8px; flex-direction: row-reverse; }
.sa-date { display: flex; align-items: center; gap: 4px; font-size: 12.3px; color: #5e6972; }
.sa-sep { width: 1px; height: 13px; background: #e7e9eb; flex-shrink: 0; }
.sa-cat { font-size: 14px; font-weight: 700; color: #212529; }
.sa-title { font-size: 14px; font-weight: 800; color: #212529; text-align: left; line-height: 1.4; }
.sa-thumb { width: 88px; height: 88px; border-radius: 15px; overflow: hidden; flex-shrink: 0; }
.sa-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Big blog card */
.big-blog-card { width: 425px; height: 488px; border-radius: 30px; overflow: hidden; position: relative; display: block; text-decoration: none; }
.big-blog-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.big-blog-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 74%, black 100%); }
.big-blog-card-text { position: absolute; bottom: 24px; right: 24px; left: 24px; z-index: 2; }
.big-blog-card-text .cat { font-size: 14px; color: #14a8e3; margin-bottom: 8px; }
.big-blog-card-text .title { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.4; text-align: right; }

/* Blog card */
.blog-card { width: 423px; text-decoration: none; color: inherit; }
.blog-card-img { width: 423px; height: 283px; border-radius: 30px 30px 0 30px; overflow: hidden; position: relative; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-tag { position: absolute; bottom: -14px; right: 0; background: #14a8e3; color: #fff; font-size: 14px; font-weight: 500; padding: 4px 8px; border-radius: 15px 0 15px 15px; }
.blog-card-body { padding-top: 24px; }
.blog-card-body .title { font-size: 20px; font-weight: 800; color: #212529; line-height: 1.4; margin-bottom: 4px; text-align: right; }
.blog-card-body .desc { font-size: 16px; color: #5e6972; line-height: 1.5; text-align: right; }

/* Load more */
.load-more-wrap { display: flex; justify-content: center; margin-top: 48px; }
.load-more-btn { background: #14a8e3; color: #fff; font-size: 16px; font-weight: 500; padding: 16px 24px; border: none; border-radius: 15px; cursor: pointer; }

/* Utilities */
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }

/* ── SCROLL NAV ── */
.scroll-row-wrap { position: relative; }
.scroll-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #fff;
    border: none;
    border-radius: 16px;
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    font-size: 20px;
    color: #184362;
    transition: box-shadow 0.2s, transform 0.2s;
}
.scroll-nav-btn:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transform: translateY(-50%) scale(1.05);
}
.scroll-nav-btn.prev { right: -16px; }
.scroll-nav-btn.next { left: -16px; }
.scroll-nav-btn.visible { display: flex; }

/* articles row همیشه دکمه دارد */
.scroll-row-wrap:has(#articlesRow) .scroll-nav-btn,
.scroll-row-wrap:has(#popularGrid) .scroll-nav-btn {
    display: flex;
}

/* fix footer visibility */
body { overflow-x: hidden; }



/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
    .page { padding: 0 32px 48px; }
    .dark-section { padding: 48px 32px; }
    .hc-sm { width: 280px; height: 380px; }
    .hc-lg { width: 400px; height: 380px; }
    .pop-card { width: 220px; }
    .pop-card-img { width: 220px; height: 180px; }
    .blog-card { width: 100%; }
    .blog-card-img { width: 100%; }
}

/* scroll hint — پیش‌فرض مخفی */
.scroll-hint {
    display: none;
    align-items: center;
    gap: 4px;
    color: #14a8e3;
    font-size: 11px;
    margin-top: 6px;
    justify-content: center;
    transition: opacity 0.3s;
}
.scroll-hint i { font-size: 14px; }

/* نقطه‌های اسکرول مثل carousel */
.scroll-dots {
    display: none;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}
.scroll-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #14a8e3;
    opacity: 0.3;
    transition: opacity 0.3s, width 0.3s;
}
.scroll-dot.active {
    opacity: 1;
    width: 18px;
    border-radius: 3px;
}

@media (max-width: 900px) {
    .scroll-dots { display: flex; }
}

@keyframes hintMove {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(-8px); opacity: 0.5; }
}

@media (max-width: 900px) {
    .page { padding: 0 16px 32px; }
    .dark-section { padding: 32px 16px; }

    /* hero */
    .hero-cards { flex-direction: column; }
    .hc-sm, .hc-lg { width: 100%; height: 280px; }

    /* articles row - اسکرول افقی */
    .articles-row {
        flex-wrap: nowrap;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .articles-row::-webkit-scrollbar { display: none; }
    .article-item {
        min-width: 78vw;
        max-width: 78vw;
        flex: none;
        scroll-snap-align: start;
    }

    /* popular - اسکرول افقی */
    .popular-grid {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 16px;
        padding-bottom: 8px;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }
    .popular-grid::-webkit-scrollbar { display: none; }
    .pop-card {
        min-width: 78vw;
        width: 78vw;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .pop-card-img { width: 100%; height: 200px; }

    /* scroll hint نمایش در موبایل */
    .scroll-hint {
        display: flex;
        animation: hintMove 1.5s ease-in-out infinite;
    }

    /* dark section */
    .video-layout { flex-direction: column; }
    .video-main {
        width: 100%;
        height: 0 !important;
        padding-bottom: 56.25% !important;
        position: relative;
        flex: none;
    }
    .video-list {
        width: 100%;
        max-height: 350px;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .video-item { width: 100%; }

    /* blog grid */
    .blog-two-col { flex-direction: column; }
    .blog-left { width: 100%; }
    .big-blog-card { width: 100%; height: 300px; }
    .blog-grid-row { flex-direction: column; }
    .blog-card { width: 100%; }
    .blog-card-img { width: 100%; height: 220px; }
}

@media (max-width: 600px) {
    .page { padding: 0 12px 24px; }
    .dark-section { padding: 24px 12px; }

    /* hero */
    .hc-sm, .hc-lg { height: 220px; }
    .hero-card .title { font-size: 16px; }

    /* articles row */
    .article-item {
        min-width: 80vw;
        max-width: 80vw;
    }

    /* popular */
    .pop-card {
        min-width: 80vw;
        width: 80vw;
    }

    /* dark section */
    .video-main {
        width: 100%;
        height: 0 !important;
        padding-bottom: 56.25% !important;
    }
    .video-list {
        width: 100%;
        max-height: 300px;
        overflow-y: auto;
    }
    .video-item { width: 100%; }

    /* section header */
    .section-title .main { font-size: 16px; }
    .view-all { font-size: 12px; padding: 4px 12px; }

    /* blog cards */
    .blog-card-img { height: 180px; }
    .blog-card-body .title { font-size: 16px; }
    .blog-card-body .desc { font-size: 14px; }

    /* playlist */
    .playlist-item { height: 50px; }
    .sa-thumb { width: 64px; height: 64px; }
}

/* fix */
body { overflow-x: hidden; }