/*
Theme Name: Bangla Kantho Modern (Prothom Alo Style)
Author: Custom Developer
Description: A clean, minimalist, editorial Bengali News Portal WordPress Theme inspired by Prothom Alo.
Version: 2.0
Text Domain: banglakantho-modern
*/

:root {
    --primary-red: #d32f2f;
    --dark-text: #121212;
    --muted-text: #555555;
    --border-color: #e2e2e2;
    --bg-light: #f8f9fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'SolaimanLipi', 'Kalpurush', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #ffffff;
    color: var(--dark-text);
    line-height: 1.65;
}
a { text-decoration: none; color: var(--dark-text); transition: color 0.2s ease; }
a:hover { color: var(--primary-red); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* Editorial Header (Prothom Alo Style) */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
}
.header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
}
.header-left { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted-text); }
.header-search-form { display: flex; max-width: 240px; border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; }
.header-search-form input { border: none; padding: 6px 10px; font-size: 13px; width: 100%; outline: none; }
.header-search-form button { background: #fff; border: none; padding: 0 10px; cursor: pointer; color: var(--muted-text); }

.header-center { text-align: center; }
.site-title { font-size: 42px; font-weight: 800; letter-spacing: -0.5px; color: var(--dark-text); line-height: 1.1; }
.site-title span { color: var(--primary-red); }
.site-tagline { font-size: 13px; color: var(--muted-text); margin-top: 2px; }

.header-right { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.btn-epaper {
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-text);
}
.btn-epaper:hover { border-color: var(--primary-red); color: var(--primary-red); }

/* Clean Sticky Navigation */
.main-nav {
    background: #fff;
    border-bottom: 2px solid var(--dark-text);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.main-nav ul li { position: relative; }
.main-nav ul li a {
    display: block;
    padding: 11px 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-text);
}
.main-nav ul li a:hover { color: var(--primary-red); }
.main-nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    min-width: 190px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    flex-direction: column;
}
.main-nav ul li:hover > ul { display: flex; }
.main-nav ul li ul li a { padding: 9px 15px; font-size: 15px; border-bottom: 1px solid #f2f2f2; }

/* Ad Slots */
.ad-slot {
    text-align: center;
    margin: 20px auto;
    padding: 12px;
    background: var(--bg-light);
    border: 1px solid #ececec;
}
.ad-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; display: block; }

/* Hero / Top News 3-Column Editorial Grid */
.hero-editorial {
    display: grid;
    grid-template-columns: 1.2fr 2.1fr 1.2fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}
.col-border-right { border-right: 1px solid var(--border-color); padding-right: 24px; }

/* Center Main Lead */
.main-lead-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 14px; }
.main-lead-card h1 { font-size: 30px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.main-lead-card p { font-size: 16px; color: var(--muted-text); line-height: 1.6; }
.news-time { font-size: 12px; color: #888; margin-top: 8px; display: block; }

.sub-lead-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.sub-lead-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 8px; }
.sub-lead-item h3 { font-size: 18px; font-weight: 700; line-height: 1.35; }

/* Left Column Stacked News */
.side-story-item {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.side-story-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.side-story-item img { width: 105px; height: 72px; object-fit: cover; flex-shrink: 0; }
.side-story-item h4 { font-size: 16px; font-weight: 600; line-height: 1.38; }

/* Right Column Tabs (পঠিত / সর্বশেষ) */
.tab-header {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 14px;
}
.tab-btn {
    flex: 1;
    padding: 8px 10px;
    background: none;
    border: none;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    color: var(--muted-text);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.tab-btn.active { color: var(--dark-text); border-bottom-color: var(--primary-red); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.ranked-item {
    display: flex;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #efefef;
    align-items: flex-start;
}
.ranked-num {
    font-size: 24px;
    font-weight: 800;
    color: #ccc;
    line-height: 1;
    min-width: 24px;
}
.ranked-item h4 { font-size: 15.5px; font-weight: 600; line-height: 1.4; }

/* Category Section (Prothom Alo Editorial Style) */
.category-block {
    padding: 28px 0;
    border-bottom: 1px solid var(--border-color);
}
.cat-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.cat-heading h2 {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cat-heading h2::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--primary-red);
    border-radius: 50%;
}
.cat-more { font-size: 14px; font-weight: 600; color: var(--muted-text); }
.cat-more:hover { color: var(--primary-red); }

.editorial-4-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.editorial-card {
    border-right: 1px solid var(--border-color);
    padding-right: 22px;
}
.editorial-card:last-child { border-right: none; padding-right: 0; }
.editorial-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 10px; }
.editorial-card h3 { font-size: 18px; font-weight: 700; line-height: 1.38; margin-bottom: 6px; }
.editorial-card p { font-size: 14px; color: var(--muted-text); line-height: 1.5; }

/* Single Article Page */
.single-layout {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 32px;
    padding: 28px 0;
}
.article-cat { color: var(--primary-red); font-weight: 700; font-size: 15px; margin-bottom: 8px; display: inline-block; }
.article-title { font-size: 34px; font-weight: 700; line-height: 1.3; margin-bottom: 14px; }
.article-meta {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--muted-text);
    display: flex;
    justify-content: space-between;
}
.article-body { font-size: 19px; line-height: 1.8; color: #1d1d1d; }
.article-body p { margin-bottom: 18px; }

/* Footer */
.site-footer {
    background: #fafafa;
    border-top: 2px solid var(--dark-text);
    padding: 36px 0 24px;
    margin-top: 30px;
    color: var(--muted-text);
    font-size: 14px;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.footer-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; }

@media (max-width: 992px) {
    .hero-editorial, .single-layout { grid-template-columns: 1fr; }
    .col-border-right { border-right: none; padding-right: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; }
    .editorial-4-grid { grid-template-columns: repeat(2, 1fr); }
    .editorial-card { border-right: none; padding-right: 0; }
    .header-grid { grid-template-columns: 1fr; text-align: center; }
    .header-left, .header-right { justify-content: center; align-items: center; }
}
@media (max-width: 576px) {
    .editorial-4-grid, .sub-lead-grid { grid-template-columns: 1fr; }
    .site-title { font-size: 32px; }
}
