/*
Theme Name: Bangla Kantho Prothom Alo Edition (Photo Card & Ticker)
Author: Custom Developer
Description: Prothom Alo inspired modern editorial WordPress theme with Breaking News Ticker, Built-in Photo Card Generator, and Bottom Sticky Ad.
Version: 3.0
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Bengali:wght@400;600;700&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Hind Siliguri', sans-serif; background: #ffffff; color: #121212; line-height: 1.65; }
h1, h2, h3, h4, .editorial-title { font-family: 'Noto Serif Bengali', serif; color: #121212; }
a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
a:hover { color: #d32f2f; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* Header - Prothom Alo Style */
.pa-top-header { border-bottom: 1px solid #e2e2e2; padding: 14px 0; background: #fff; }
.pa-header-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 15px; }
.pa-date-search { font-size: 14px; color: #555; }
.pa-date-search .date-text { font-weight: 600; color: #222; margin-bottom: 6px; display: block; }
.pa-search-form { display: flex; border: 1px solid #ccc; border-radius: 3px; overflow: hidden; max-width: 240px; }
.pa-search-form input { border: none; padding: 5px 10px; font-size: 13px; width: 100%; outline: none; font-family: inherit; }
.pa-search-form button { background: #f5f5f5; border: none; padding: 5px 10px; cursor: pointer; font-weight: 600; }

.pa-logo { text-align: center; }
.pa-logo h1 { font-size: 42px; font-weight: 700; letter-spacing: -0.5px; color: #121212; line-height: 1.1; }
.pa-logo span.tagline { font-size: 13px; color: #666; font-family: 'Hind Siliguri', sans-serif; display: block; margin-top: 2px; }

.pa-header-right { text-align: right; display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.pa-edition-badge { background: #f4f4f4; border: 1px solid #ddd; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }

/* Navigation */
.pa-nav-wrap { border-bottom: 2px solid #121212; background: #fff; position: sticky; top: 0; z-index: 999; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.pa-nav ul { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; }
.pa-nav ul li { position: relative; }
.pa-nav ul li a { display: block; padding: 11px 16px; font-size: 16px; font-weight: 600; color: #121212; }
.pa-nav ul li a:hover { color: #d32f2f; }
.pa-nav ul li ul { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid #ddd; min-width: 180px; z-index: 1000; flex-direction: column; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.pa-nav ul li:hover > ul { display: flex; }
.pa-nav ul li ul li a { padding: 8px 14px; font-size: 14px; border-bottom: 1px solid #f0f0f0; }

/* Breaking News Scroller (শিরোনাম স্ক্রলার) */
.pa-ticker-wrap { background: #fafafa; border-bottom: 1px solid #e2e2e2; padding: 8px 0; }
.pa-ticker-box { display: flex; align-items: center; background: #fff; border: 1px solid #e0e0e0; border-radius: 3px; overflow: hidden; }
.pa-ticker-label { background: #d32f2f; color: #fff; font-weight: 700; padding: 6px 14px; font-size: 14px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.pa-ticker-label .pulse-dot { width: 8px; height: 8px; background: #fff; border-radius: 50%; display: inline-block; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
.pa-ticker-content { flex: 1; overflow: hidden; padding: 4px 12px; }
.pa-ticker-content marquee a { font-size: 15px; font-weight: 600; color: #121212; margin-right: 35px; }
.pa-ticker-content marquee a:hover { color: #d32f2f; }

/* Ad Zones */
.pa-ad-zone { text-align: center; margin: 18px 0; padding: 10px; background: #f9f9f9; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.pa-ad-label { font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; display: block; }

/* Prothom Alo 3-Column Editorial Lead Grid */
.pa-lead-grid { display: grid; grid-template-columns: 1fr 1.85fr 1.15fr; gap: 24px; margin-top: 22px; padding-bottom: 24px; border-bottom: 2px solid #121212; }

/* Left Column */
.pa-left-col { border-right: 1px solid #e2e2e2; padding-right: 20px; display: flex; flex-direction: column; gap: 16px; }
.pa-left-item { border-bottom: 1px solid #ebebeb; padding-bottom: 14px; }
.pa-left-item:last-child { border-bottom: none; padding-bottom: 0; }
.pa-left-item h3 { font-size: 18px; font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.pa-left-item p { font-size: 14px; color: #555; line-height: 1.5; }
.pa-time { font-size: 12px; color: #777; margin-top: 5px; display: block; }

/* Center Main Lead */
.pa-center-col { border-right: 1px solid #e2e2e2; padding-right: 20px; }
.pa-main-lead { border-bottom: 1px solid #e2e2e2; padding-bottom: 18px; margin-bottom: 18px; }
.pa-main-lead img { width: 100%; height: 340px; object-fit: cover; margin-bottom: 14px; }
.pa-main-lead h2 { font-size: 30px; font-weight: 700; line-height: 1.28; margin-bottom: 10px; }
.pa-main-lead p { font-size: 15px; color: #444; line-height: 1.6; }

.pa-sub-leads { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pa-sub-card img { width: 100%; height: 145px; object-fit: cover; margin-bottom: 8px; }
.pa-sub-card h4 { font-size: 17px; font-weight: 700; line-height: 1.35; }

/* Right Column Tabs */
.pa-tabs-header { display: flex; border-bottom: 2px solid #e2e2e2; margin-bottom: 14px; }
.pa-tab-btn { flex: 1; background: none; border: none; padding: 8px; font-size: 17px; font-weight: 700; font-family: 'Noto Serif Bengali', serif; cursor: pointer; color: #666; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.pa-tab-btn.active { color: #d32f2f; border-bottom-color: #d32f2f; }
.pa-tab-panel { display: none; }
.pa-tab-panel.active { display: block; }
.pa-ranked-item { display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid #eee; padding: 10px 0; }
.pa-ranked-item:last-child { border-bottom: none; }
.pa-rank-num { font-size: 26px; font-weight: 700; color: #d0d0d0; font-family: 'Noto Serif Bengali', serif; line-height: 1; min-width: 26px; }
.pa-ranked-item h4 { font-size: 16px; font-weight: 600; line-height: 1.38; }

/* Category Sections */
.pa-cat-block { margin-top: 28px; padding-bottom: 24px; border-bottom: 1px solid #dcdcdc; }
.pa-cat-title-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-left: 4px solid #d32f2f; padding-left: 10px; }
.pa-cat-title-bar h2 { font-size: 24px; font-weight: 700; }
.pa-cat-title-bar a { font-size: 14px; font-weight: 600; color: #d32f2f; }
.pa-cat-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pa-grid-card { border-right: 1px solid #eee; padding-right: 15px; }
.pa-grid-card:last-child { border-right: none; padding-right: 0; }
.pa-grid-card img { width: 100%; height: 155px; object-fit: cover; margin-bottom: 10px; }
.pa-grid-card h3 { font-size: 17px; font-weight: 700; line-height: 1.38; margin-bottom: 6px; }
.pa-grid-card p { font-size: 13.5px; color: #555; }

/* Single Post & Photo Card Generator */
.pa-single-wrap { display: grid; grid-template-columns: 2.2fr 1fr; gap: 30px; margin-top: 25px; }
.pa-single-article h1 { font-size: 34px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.pa-single-meta { font-size: 14px; color: #666; border-top: 1px solid #eee; border-bottom: 1px solid #eee; padding: 10px 0; margin-bottom: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.pa-single-content { font-size: 18px; line-height: 1.85; color: #1c1c1c; }
.pa-single-content p { margin-bottom: 18px; }

/* Photo Card Box in Single Post */
.pa-photocard-box { background: #f8f9fa; border: 1px solid #dcdcdc; border-radius: 6px; padding: 18px; margin: 25px 0; }
.pa-photocard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.pa-photocard-header h3 { font-size: 20px; color: #d32f2f; }
.pa-btn { background: #121212; color: #fff; border: none; padding: 8px 16px; font-size: 14px; font-weight: 600; border-radius: 4px; cursor: pointer; font-family: inherit; }
.pa-btn-red { background: #d32f2f; }
.pa-btn:hover { opacity: 0.9; }
#bk-photocard-canvas { width: 100%; max-width: 540px; height: auto; border: 1px solid #ccc; margin: 12px auto; display: block; box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

/* Bottom Sticky Ad Bar */
.pa-sticky-bottom-ad { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(255,255,255,0.97); border-top: 2px solid #d32f2f; box-shadow: 0 -3px 12px rgba(0,0,0,0.12); z-index: 9999; padding: 8px 15px; text-align: center; }
.pa-sticky-close { position: absolute; top: -26px; right: 15px; background: #121212; color: #fff; border: none; padding: 3px 10px; font-size: 12px; cursor: pointer; border-radius: 4px 4px 0 0; }

/* Footer */
.pa-footer { background: #f7f7f7; border-top: 2px solid #121212; padding: 35px 0 70px 0; margin-top: 40px; text-align: center; }
.pa-footer-links { margin: 15px 0; }
.pa-footer-links ul { list-style: none; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.pa-footer-links a { font-weight: 600; font-size: 15px; }

@media (max-width: 900px) {
    .pa-header-grid, .pa-lead-grid, .pa-single-wrap { grid-template-columns: 1fr; }
    .pa-left-col, .pa-center-col { border-right: none; padding-right: 0; }
    .pa-cat-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .pa-header-right { display: none; }
}
@media (max-width: 520px) {
    .pa-cat-grid-4, .pa-sub-leads { grid-template-columns: 1fr; }
}
