/* ═══════════════════════════════════════════════════════════════════════════
   The Rising Campus — Main Stylesheet
   Font: SolaimanLipi (self-hosted) + fallback system fonts
═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'SolaimanLipi';
  src: url('../fonts/solaimanlipi.woff2') format('woff2'),
       url('../fonts/solaimanlipi.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red:       #c41e3a;
  --dark-red:  #9e1530;
  --black:     #111111;
  --dark:      #1a1a1a;
  --gray-dark: #444444;
  --gray:      #777777;
  --gray-light:#ebebeb;
  --white:     #ffffff;
  --bg:        #f5f5f5;
  --card-bg:   #ffffff;
  --border:    #e0e0e0;
  --text:      #222222;
  --text-muted:#888888;
  --link:      #c41e3a;
  --font:      'SolaimanLipi', 'Noto Serif Bengali', 'Hind Siliguri', Arial, sans-serif;
  --font-en:   'Segoe UI', Arial, sans-serif;
  --shadow:    0 2px 8px rgba(0,0,0,.08);
  --radius:    6px;
  --transition:.2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--dark-red); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }

/* ── Container ────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.col { padding: 0 10px; }
.col-8  { width: 66.666%; }
.col-4  { width: 33.333%; }
.col-9  { width: 75%; }
.col-3  { width: 25%; }
.col-6  { width: 50%; }
.col-12 { width: 100%; }
@media(max-width:900px) { .col-8,.col-9,.col-4,.col-3 { width: 100%; } }
@media(max-width:600px) { .col-6 { width: 100%; } }

/* ── Breaking News Ticker ─────────────────────────────────────────────────── */
.ticker-bar {
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 36px;
}
.ticker-label {
  background: var(--dark-red);
  padding: 0 16px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.ticker-content {
  display: flex;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}
.ticker-content a {
  color: #fff;
  font-size: 0.82rem;
  padding: 0 32px;
  border-right: 1px solid rgba(255,255,255,.3);
}
.ticker-content a:hover { color: #ffe0e0; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── Stock Marquee ────────────────────────────────────────────────────────── */
.stock-bar {
  background: var(--dark);
  color: #eee;
  font-size: 0.75rem;
  padding: 5px 0;
  overflow: hidden;
}
.stock-content {
  display: flex;
  gap: 28px;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}
.stock-item { display: flex; gap: 6px; align-items: center; }
.stock-item .name { color: #ccc; }
.stock-item .price { color: #fff; font-weight: 600; }
.stock-up { color: #4caf50 !important; }
.stock-down { color: #ef5350 !important; }

/* ── Header ───────────────────────────────────────────────────────────────── */
#site-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 900; }
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { height: 54px; width: auto; }
.site-logo .logo-text { display: flex; flex-direction: column; }
.site-logo .logo-name { font-size: 1.5rem; font-weight: 700; color: var(--red); line-height: 1; }
.site-logo .logo-tagline { font-size: 0.72rem; color: var(--gray); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-search { background: none; border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 0.82rem; color: var(--gray-dark); display: flex; align-items: center; gap: 6px; }
.btn-search:hover { border-color: var(--red); color: var(--red); }
.lang-toggle { display: flex; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.lang-toggle button { background: none; border: none; padding: 5px 12px; font-size: 0.78rem; transition: background var(--transition), color var(--transition); }
.lang-toggle button.active { background: var(--red); color: #fff; }

/* ── Navigation ───────────────────────────────────────────────────────────── */
nav.main-nav { background: var(--red); }
.nav-list {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list a {
  display: block;
  color: #fff;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.15);
  transition: background var(--transition);
}
.nav-list a:hover, .nav-list a.active { background: var(--dark-red); color: #fff; }
.hamburger { display: none; background: none; border: none; color: var(--dark); font-size: 1.4rem; padding: 8px; }
.mobile-nav { display: none; background: var(--dark); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; color: #eee; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 0.9rem; }
@media(max-width:768px) {
  .hamburger { display: block; }
  nav.main-nav .nav-list { display: none; }
  .header-top { flex-wrap: wrap; gap: 8px; }
}

/* ── Search Box ───────────────────────────────────────────────────────────── */
.search-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 999; display: none; align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.search-overlay.open { display: flex; }
.search-box {
  background: #fff; border-radius: var(--radius);
  padding: 20px; width: 100%; max-width: 600px; margin: 0 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.search-input-row { display: flex; gap: 8px; }
.search-input-row input {
  flex: 1; border: 2px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; font-size: 1rem; font-family: var(--font);
  outline: none;
}
.search-input-row input:focus { border-color: var(--red); }
.search-input-row button { background: var(--red); color: #fff; border: none; padding: 10px 20px; border-radius: var(--radius); font-size: 0.9rem; }
.search-close { position: absolute; top: 20px; right: 20px; background: #fff; border: none; font-size: 1.4rem; border-radius: 50%; width: 36px; height: 36px; color: #333; }

/* ── Section Titles ───────────────────────────────────────────────────────── */
.sec-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  border-left: 4px solid var(--red);
  padding-left: 10px;
  margin-bottom: 14px;
}
.sec-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--red);
  padding-bottom: 6px;
}
.sec-title-bar .title { font-size: 1.05rem; font-weight: 700; color: var(--red); }
.sec-title-bar a { font-size: 0.78rem; color: var(--gray); }

/* ── News Cards ───────────────────────────────────────────────────────────── */
.news-section { padding: 20px 0; }

/* Hero Card */
.card-hero {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--dark); cursor: pointer;
}
.card-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-hero .overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  padding: 32px 16px 16px;
}
.card-hero .overlay h2 { color: #fff; font-size: 1.1rem; line-height: 1.5; }
.card-hero .overlay .meta { color: rgba(255,255,255,.7); font-size: 0.75rem; margin-top: 6px; }

/* Standard Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.14); }
.card .card-img { overflow: hidden; }
.card .card-img img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.04); }
.card .card-body { padding: 12px; }
.card .card-title { font-size: 0.92rem; font-weight: 700; line-height: 1.5; color: var(--black); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .card-meta { font-size: 0.72rem; color: var(--text-muted); display: flex; gap: 10px; align-items: center; }
.card .card-meta .cat-badge { background: var(--red); color: #fff; padding: 1px 8px; border-radius: 10px; font-size: 0.68rem; }

/* Horizontal List Card */
.card-h {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--gray-light);
}
.card-h:last-child { border-bottom: none; }
.card-h .thumb { width: 90px; height: 64px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.card-h .info { flex: 1; }
.card-h .info h3 { font-size: 0.85rem; line-height: 1.5; font-weight: 600; color: var(--black); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-h .info .time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

/* ── Grid Layouts ─────────────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media(max-width:900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:540px)  { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

/* Homepage layout: hero + grid */
.home-top { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }
.home-top .right-stack { display: flex; flex-direction: column; gap: 10px; }
@media(max-width:768px) { .home-top { grid-template-columns: 1fr; } }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: 80px; }
.sidebar-widget { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.sidebar-widget .widget-title { background: var(--red); color: #fff; padding: 8px 14px; font-size: 0.88rem; font-weight: 700; }
.sidebar-widget .widget-body { padding: 10px 14px; }

/* Most read list */
.most-read-list { counter-reset: mr-counter; }
.most-read-list li {
  counter-increment: mr-counter;
  display: flex; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--gray-light);
  align-items: flex-start;
}
.most-read-list li:last-child { border-bottom: none; }
.most-read-list li::before {
  content: counter(mr-counter);
  background: var(--red); color: #fff;
  min-width: 22px; height: 22px;
  border-radius: 50%; font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.most-read-list li a { font-size: 0.82rem; color: var(--black); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Ad Slots ─────────────────────────────────────────────────────────────── */
.ad-slot { text-align: center; margin: 14px 0; }
.ad-slot img { max-width: 100%; border-radius: 4px; margin: 0 auto; }
.ad-slot .ad-label { font-size: 0.65rem; color: var(--text-muted); margin-bottom: 4px; }

/* ── Badge / Tag ──────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 600; }
.badge-red  { background: var(--red); color: #fff; }
.badge-gray { background: var(--gray-light); color: var(--gray-dark); }
.badge-break { background: #ff3b30; color: #fff; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:.6; } }

/* ── Article / News Detail ────────────────────────────────────────────────── */
.article-wrap { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.article-wrap .article-cat { margin-bottom: 10px; }
.article-wrap h1 { font-size: 1.5rem; line-height: 1.6; color: var(--black); margin-bottom: 12px; }
.article-wrap .article-subtitle { font-size: 1rem; color: var(--gray-dark); margin-bottom: 12px; font-style: italic; }
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-light); }
.article-meta span { display: flex; align-items: center; gap: 4px; }
.article-banner { border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.article-banner img { width: 100%; max-height: 480px; object-fit: cover; }
.article-banner .caption { font-size: 0.75rem; color: var(--gray); padding: 5px 0; }
.article-body { font-size: 0.95rem; line-height: 1.9; color: var(--text); }
.article-body p { margin-bottom: 14px; }
.article-body h2 { font-size: 1.15rem; margin: 20px 0 10px; }
.article-body img { border-radius: 4px; margin: 14px auto; }
.article-body blockquote { border-left: 4px solid var(--red); padding: 10px 16px; background: #fff5f5; color: var(--gray-dark); margin: 16px 0; font-style: italic; border-radius: 0 4px 4px 0; }

/* Share buttons */
.share-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.share-btn { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 4px; font-size: 0.78rem; color: #fff; border: none; font-family: var(--font); }
.share-fb   { background: #1877f2; }
.share-tw   { background: #1da1f2; }
.share-wa   { background: #25d366; }
.share-link { background: var(--gray); }
.share-btn:hover { opacity: .88; }

/* Hashtags */
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.tag-pill { background: var(--gray-light); color: var(--gray-dark); padding: 3px 10px; border-radius: 14px; font-size: 0.75rem; transition: background var(--transition); }
.tag-pill:hover { background: var(--red); color: #fff; }

/* ── Opinion Poll Widget ──────────────────────────────────────────────────── */
.poll-widget { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.poll-widget .poll-head { background: var(--dark); color: #fff; padding: 10px 14px; font-size: 0.88rem; font-weight: 700; }
.poll-widget .poll-body { padding: 14px; }
.poll-question { font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; line-height: 1.5; }
.poll-option { margin-bottom: 10px; }
.poll-option label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.85rem; }
.poll-option input[type=radio] { accent-color: var(--red); width: 16px; height: 16px; }
.poll-result-bar { margin-top: 6px; height: 6px; background: var(--gray-light); border-radius: 3px; overflow: hidden; }
.poll-result-bar .fill { height: 100%; background: var(--red); border-radius: 3px; transition: width .6s; }
.poll-percent { font-size: 0.72rem; color: var(--text-muted); }
.btn-vote { background: var(--red); color: #fff; border: none; width: 100%; padding: 9px; border-radius: 4px; font-size: 0.85rem; margin-top: 10px; font-family: var(--font); }
.btn-vote:hover { background: var(--dark-red); }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.pagination button {
  background: var(--card-bg); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 4px; font-size: 0.82rem;
  color: var(--gray-dark); transition: all var(--transition); font-family: var(--font);
}
.pagination button:hover { border-color: var(--red); color: var(--red); }
.pagination button.active { background: var(--red); color: #fff; border-color: var(--red); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ── Load More Button ─────────────────────────────────────────────────────── */
.btn-load-more {
  display: block; margin: 20px auto;
  background: none; border: 2px solid var(--red);
  color: var(--red); padding: 9px 28px;
  border-radius: 20px; font-size: 0.88rem; font-family: var(--font);
  transition: all var(--transition);
}
.btn-load-more:hover { background: var(--red); color: #fff; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
#site-footer { background: var(--dark); color: #ccc; padding: 36px 0 16px; margin-top: 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 28px; }
@media(max-width:768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand-name { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-brand p { font-size: 0.82rem; line-height: 1.7; color: #aaa; }
.footer-social { display: flex; gap: 8px; margin-top: 12px; }
.footer-social a { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 0.82rem; transition: background var(--transition); }
.footer-social a:hover { background: var(--red); color: #fff; }
.footer-col h4 { color: #fff; font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 6px; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul li a { color: #aaa; font-size: 0.82rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; text-align: center; font-size: 0.75rem; color: #888; }

/* ── Utilities ────────────────────────────────────────────────────────────── */
.mt-0  { margin-top: 0; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.78rem; }
.d-none { display: none; }
.loading { text-align: center; padding: 30px; color: var(--text-muted); }
.loading::after { content: ''; display: inline-block; width: 20px; height: 20px; border: 2px solid var(--gray-light); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; margin-left: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Dark Mode ────────────────────────────────────────────────────────────── */
body.dark {
  --bg: #111;
  --card-bg: #1e1e1e;
  --text: #e0e0e0;
  --black: #f0f0f0;
  --gray-light: #2a2a2a;
  --border: #333;
  --shadow: 0 2px 8px rgba(0,0,0,.4);
}
body.dark #site-header { background: #1a1a1a; }
body.dark .card, body.dark .sidebar-widget { background: #1e1e1e; }
