/* ===== Homepage layout (additive — does not modify home.css) ===== */

/* Hero slider */
.hero-slider { position: relative; height: 440px; overflow: hidden; background: #111; }
.hero-slider .hero-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .55s ease; }
.hero-slider .hero-slide.active { opacity: 1; pointer-events: auto; z-index: 1; }
.hs-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
    width: 38px; height: 38px; border: 0; background: rgba(0,0,0,.45); color: #fff;
    font-size: 22px; line-height: 1; cursor: pointer; border-radius: 50%;
    display: grid; place-items: center;
}
.hs-arrow:hover { background: var(--red); }
.hs-arrow.prev { left: 12px; }
.hs-arrow.next { right: 12px; }
.hs-dots { position: absolute; top: 14px; right: 16px; z-index: 6; display: flex; gap: 6px; }
.hs-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; }
.hs-dot.active { background: var(--red); }

/* Hero side title */
.side-title {
    font-family: "Noto Serif Bengali", serif; font-size: 18px; font-weight: 700;
    border-top: 3px solid var(--red); padding-top: 7px; margin-bottom: 2px;
}

/* Fix: hero side-news list layout (image left, text right) — matches approved design.
   The card is an <article> wrapping one <a>; move the 2-col grid onto the <a> itself. */
.side-card { display: block; }
.side-card a { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }

/* Two-col: important + latest */
.two-col { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(300px,1fr); gap: 18px; margin-top: 26px; }
.tc-left, .tc-right { background: #fff; border: 1px solid #ddd; padding: 12px; }
.imp-list { margin-top: 6px; }
.imp-card { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eee; }
.imp-card:last-child { border-bottom: 0; }
.imp-card img { width: 130px; height: 90px; object-fit: cover; }
.imp-card h3 { font-family: "Noto Serif Bengali", serif; font-size: 16px; line-height: 1.4; font-weight: 700; margin-top: 4px; }
.imp-card .meta { margin-top: 6px; }
.imp-badge {
    display: inline-block; background: var(--red); color: #fff; font-size: 10px;
    font-weight: 800; padding: 2px 7px; border-radius: 2px; margin-right: 6px;
}
.latest-list { margin-top: 6px; }
.latest-row { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px dotted #ccc; font-size: 14px; }
.latest-row:last-child { border-bottom: 0; }
.lr-time { flex: 0 0 auto; color: var(--red); font-size: 12px; font-weight: 700; min-width: 72px; }
.lr-title { font-weight: 600; line-height: 1.4; }
.latest-row:hover .lr-title { color: var(--red); }

/* In-content ad */
.home-ad { margin: 22px 0; text-align: center; display: flex; justify-content: center; }
.home-ad .ad-slot { display: inline-block; max-width: 100%; }

/* District section */
.district-section { margin-top: 26px; }
.district-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 12px; }
.district-card { background: #fff; border: 1px solid #ddd; display: grid; grid-template-columns: 120px 1fr; }
.district-card img { width: 120px; height: 96px; object-fit: cover; }
.district-card .body { padding: 9px; }
.district-card h3 { font-family: "Noto Serif Bengali", serif; font-size: 15px; line-height: 1.4; font-weight: 700; margin-top: 2px; }
.district-card .meta { margin-top: 6px; font-size: 10px; }

/* Editor picks */
.editor-section { margin-top: 26px; }
.editor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 12px; }
.editor-card { background: #fff; border: 1px solid #ddd; overflow: hidden; }
.editor-card img { width: 100%; height: 160px; object-fit: cover; }
.editor-card .body { padding: 10px; }
.editor-card h3 { font-family: "Noto Serif Bengali", serif; font-size: 16px; line-height: 1.4; font-weight: 700; margin: 4px 0; }
.editor-card .meta { margin-top: 6px; font-size: 10px; }

/* Lifestyle grid (5 categories) */
.lifestyle-section { margin-top: 26px; }
.lifestyle-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }

/* Media sections */
.media-section { margin-top: 26px; }
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 12px; }
.video-card { background: #fff; border: 1px solid #ddd; }
.video-card .thumb { position: relative; overflow: hidden; background: #111; }
.video-card .thumb img { width: 100%; height: 160px; object-fit: cover; opacity: .9; }
.video-card .thumb-empty { width: 100%; height: 160px; background: linear-gradient(135deg, #222, #000); }
.play {
    position: absolute; inset: 0; margin: auto; width: 46px; height: 46px;
    background: rgba(0,0,0,.55); border-radius: 50%; display: grid; place-items: center;
    color: #fff; font-size: 18px; pointer-events: none;
}
.dur { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.75); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 3px; }
.video-card h3 { font-family: "Noto Serif Bengali", serif; font-size: 15px; line-height: 1.4; font-weight: 700; padding: 9px 10px; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 12px; }
.gallery-card { position: relative; overflow: hidden; background: #111; height: 160px; }
.gallery-card img { width: 100%; height: 160px; object-fit: cover; transition: transform .4s; }
.gallery-card:hover img { transform: scale(1.06); }
.gallery-card .count { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 3px; }
.gallery-card .overlay { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.85)); padding: 28px 10px 10px; color: #fff; }
.gallery-card .overlay h3 { font-family: "Noto Serif Bengali", serif; font-size: 14px; line-height: 1.4; font-weight: 700; }

/* Rank section (tabs) */
.rank-section { background: #fff; border: 1px solid #ddd; padding: 14px; margin-top: 26px; }
.rank-tabs { display: flex; gap: 6px; border-bottom: 1px solid #ddd; margin-bottom: 12px; }
.rank-tabs button { border: 1px solid #ddd; border-bottom: 0; background: #fff; padding: 8px 16px; cursor: pointer; font-size: 13px; font-weight: 700; }
.rank-tabs button.active { background: var(--red); color: #fff; border-color: var(--red); }
.rank-panel { display: none; }
.rank-panel.active { display: block; }
.rank-no.top { background: var(--red); }

/* Responsive */
@media (max-width: 1100px) {
    .editor-grid { grid-template-columns: repeat(2, 1fr); }
    .lifestyle-grid { grid-template-columns: repeat(3, 1fr); }
    .video-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
    .hero-slider { height: 350px; }
    .two-col { grid-template-columns: 1fr; }
    .district-grid { grid-template-columns: repeat(2, 1fr); }
    .lifestyle-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .hero-slider { height: 300px; }
    .imp-card { grid-template-columns: 110px 1fr; }
    .imp-card img { width: 110px; height: 80px; }
    .district-grid { grid-template-columns: 1fr; }
    .editor-grid { grid-template-columns: 1fr; }
    .lifestyle-grid { grid-template-columns: 1fr; }
    .video-grid, .gallery-grid { grid-template-columns: 1fr; }
    .latest-row { flex-direction: column; gap: 2px; }
}

/* Rank grid (image cards) */
.rank-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.rank-card{display:block;border:1px solid #eee;padding:8px;background:#fff;transition:box-shadow .15s;overflow:hidden}
.rank-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.08)}
.rank-thumb{position:relative;margin-bottom:6px}
.rank-thumb img{width:100%;height:110px;object-fit:cover;display:block;background:#f0f0f0}
.rank-thumb .rank-no{position:absolute;top:6px;left:6px;width:26px;height:26px;background:var(--green);color:#fff;display:grid;place-items:center;font-weight:800;font-size:13px}
.rank-thumb .rank-no.top{background:var(--red)}
.rank-card .rank-cat{display:block;font-size:11px;color:var(--red);font-weight:800;margin-bottom:2px}
.rank-card h4{font-family:"Noto Serif Bengali",serif;font-size:14px;line-height:1.35;margin:0 0 2px}
.rank-card small{color:#888;font-size:10px}
@media(max-width:600px){.rank-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
