/*
Theme Name: Bangla Kantho - Editorial Edition
Author: Custom Developer
Description: A clean, minimalist, high-converting WordPress theme modeled after Prothom Alo's exact editorial layout, typography, and ad zones.
Version: 3.0
*/

:root {
    --primary-red: #d32f2f;
    --accent-blue: #0056b3;
    --text-main: #121212;
    --text-muted: #555555;
    --text-time: #767676;
    --border-light: #e2e2e2;
    --border-dark: #121212;
    --bg-gray: #f8f9fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'SolaimanLipi', 'Kalpurush', 'Noto Sans Bengali', Arial, sans-serif;
    background-color: #ffffff;
    color: var(--text-main);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--text-main); transition: color 0.15s ease; }
a:hover { color: var(--accent-blue); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* Top Utility Bar */
.palo-topbar {
    border-bottom: 1px solid var(--border-light);
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-muted);
    background: #fff;
}
.palo-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar-left { display: flex; align-items: center; gap: 15px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.search-box form { display: flex; border: 1px solid #ccc; border-radius: 3px; overflow: hidden; }
.search-box input { border: none; padding: 4px 8px; font-size: 13px; outline: none; font-family: inherit; width: 150px; }
.search-box button { background: #f1f1f1; border: none; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.epaper-btn {
    border: 1px solid var(--border-light);
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: bold;
    color: var(--text-main);
}
.epaper-btn:hover { background: #f1f1f1; }

/* Main Logo Header */
.palo-header {
    padding: 18px 0;
    text-align: center;
    background: #fff;
}
.palo-logo h1 {
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
    line-height: 1.1;
}
.palo-logo span.dot { color: var(--primary-red); }
.palo-logo img { max-height: 75px; margin: 0 auto; }

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

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

/* Prothom Alo 3-Column Hero Grid */
.hero-wrapper {
    display: grid;
    grid-template-columns: 3fr 6fr 3fr;
    gap: 20px;
    padding-top: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}
.col-left {
    border-right: 1px solid var(--border-light);
    padding-right: 18px;
}
.col-center {
    border-right: 1px solid var(--border-light);
    padding-right: 18px;
}

/* Center Main Lead */
.main-lead {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 18px;
}
.main-lead img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 12px;
}
.main-lead .caption {
    font-size: 12px;
    color: var(--text-time);
    margin-bottom: 8px;
}
.main-lead h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.28;
    margin-bottom: 10px;
}
.main-lead p.excerpt {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.5;
}
.time-meta {
    display: block;
    font-size: 12px;
    color: var(--text-time);
    margin-top: 6px;
}

/* Sub-leads under main lead */
.sub-leads-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.sub-lead-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-bottom: 8px;
}
.sub-lead-card h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

/* Left Column Story Items */
.left-story-item {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.left-story-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.left-story-top {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.left-story-top img {
    width: 105px;
    height: 70px;
    object-fit: cover;
    flex-shrink: 0;
}
.left-story-item h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}
.left-story-item p.excerpt {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Right Column: Tabs (সর্বশেষ / পঠিত) & Opinion */
.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--border-dark);
    margin-bottom: 12px;
}
.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    color: var(--text-muted);
}
.tab-btn.active {
    color: var(--primary-red);
    border-bottom: 3px solid var(--primary-red);
    margin-bottom: -2px;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.ranked-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}
.ranked-item:last-child { border-bottom: none; }
.rank-num {
    font-size: 24px;
    font-weight: 800;
    color: #b0b0b0;
    line-height: 1.1;
    min-width: 24px;
}
.ranked-item h4 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.38;
}

/* Opinion Box (মতামত) */
.opinion-box {
    margin-top: 22px;
    background: #fcfaf7;
    border: 1px solid #e6dfd5;
    padding: 14px;
}
.opinion-header {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-red);
    border-bottom: 1px solid #e6dfd5;
    padding-bottom: 6px;
    margin-bottom: 12px;
}
.opinion-item {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ece6dd;
}
.opinion-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.opinion-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-red);
    display: block;
}
.opinion-item h4 { font-size: 16px; font-weight: 700; line-height: 1.35; }

/* Editorial Category Sections */
.cat-block {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}
.cat-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-top: 2px solid var(--border-dark);
    padding-top: 8px;
}
.cat-block-header h2 {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cat-block-header h2::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--primary-red);
    border-radius: 50%;
}
.cat-block-header a.more-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}
.cat-4-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.cat-card {
    border-right: 1px solid var(--border-light);
    padding-right: 16px;
}
.cat-card:last-child { border-right: none; padding-right: 0; }
.cat-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-bottom: 10px;
}
.cat-card h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
}
.cat-card p.excerpt {
    font-size: 14px;
    color: var(--text-muted);
}

/* Single Article Page */
.single-layout {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 28px;
    padding: 24px 0;
}
.single-article {
    border-right: 1px solid var(--border-light);
    padding-right: 24px;
}
.single-cat {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-red);
    border-bottom: 2px solid var(--primary-red);
    display: inline-block;
    margin-bottom: 10px;
}
.single-article h1 {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.28;
    margin-bottom: 14px;
}
.single-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--text-muted);
}
.share-btns a {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    font-size: 13px;
    margin-left: 6px;
}
.single-content {
    font-size: 19px;
    line-height: 1.75;
    color: #1f1f1f;
}
.single-content p { margin-bottom: 18px; }

/* Bottom Sticky Scroll Ad */
.bottom-sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #d4d4d4;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 9999;
    text-align: center;
    padding: 6px 10px;
}
.sticky-ad-close {
    position: absolute;
    top: -22px;
    right: 12px;
    background: #222;
    color: #fff;
    border: none;
    font-size: 11px;
    padding: 3px 8px;
    cursor: pointer;
    border-radius: 3px 3px 0 0;
}

/* Footer */
.palo-footer {
    background: #fff;
    border-top: 2px solid var(--border-dark);
    padding: 32px 0 75px;
    margin-top: 20px;
    text-align: center;
}
.footer-logo { font-size: 32px; font-weight: 800; margin-bottom: 14px; }
.footer-links ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    padding: 14px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
}
.footer-links ul li a { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.footer-info { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* Responsive */
@media (max-width: 992px) {
    .hero-wrapper { grid-template-columns: 1fr; }
    .col-left, .col-center { border-right: none; padding-right: 0; }
    .cat-4-grid { grid-template-columns: repeat(2, 1fr); }
    .single-layout { grid-template-columns: 1fr; }
    .single-article { border-right: none; padding-right: 0; }
}
@media (max-width: 600px) {
    .palo-logo h1 { font-size: 32px; }
    .sub-leads-grid, .cat-4-grid { grid-template-columns: 1fr; }
    .palo-topbar-inner { flex-direction: column; gap: 8px; }
}
