/* =========================================================
   BBS Alerts 24 News — Dawn.com style theme
   Same class names as before, redesigned visuals only.
   ========================================================= */

:root{
  --ink:#161616;
  --paper:#ffffff;
  --rule:#dcdcdc;
  --red:#bb1919;
  --muted:#6b6b6b;
  --bg-soft:#f7f7f5;
  --font-display: Georgia, 'PT Serif', 'Times New Roman', serif;
  --font-body: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }
html, body { width:100%; overflow-x:hidden; }
body { font-family: var(--font-body); color:var(--ink); line-height:1.6; background:var(--paper); -webkit-font-smoothing:antialiased; }
a { text-decoration:none; color:inherit; }
a:hover { text-decoration:underline; }
img { max-width:100%; display:block; }

/* ---------- Header / masthead ---------- */
.site-header { border-top:2px solid var(--ink); border-bottom:1px solid var(--ink); }
.header-inner {
  max-width:1200px; margin:0 auto; padding:22px 20px 10px;
  display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px;
}
.logo { display:flex; align-items:center; gap:10px; }
.logo-text {
  font-family:var(--font-display);
  font-size:36px; font-weight:700; color:var(--ink); letter-spacing:.01em;
}
.tagline { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.12em; margin-top:2px; }

.main-nav { background:var(--ink); border-top:2px solid var(--red); }
.main-nav {
  max-width:1200px; margin:0 auto; padding:0 20px;
  display:flex; gap:0; overflow-x:auto;
}
.main-nav a {
  color:#fff; padding:12px 14px; font-size:12.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:.03em; white-space:nowrap;
  border-right:1px solid rgba(255,255,255,.12);
}
.main-nav a:hover { color:#fff; background:var(--red); text-decoration:none; }

/* ---------- Mobile header/nav optimization ---------- */
@media (max-width:600px){
  .header-inner { padding:14px 16px 8px; gap:2px; }
  .logo { gap:8px; }
  .logo img { height:34px !important; }
  .logo-text { font-size:22px; line-height:1.15; }
  .tagline { font-size:9.5px; letter-spacing:.09em; margin-top:4px; }
  .main-nav a { padding:10px 12px; font-size:11.5px; }
  .site-main { padding-left:14px; padding-right:14px; }
  .top-row, .homepage-grid { padding-left:0; padding-right:0; }
}

/* ---------- Homepage banner / layout ---------- */
.homepage-banner { width:100%; overflow:hidden; line-height:0; }
.homepage-banner img { width:100%; height:auto; display:block; }
.site-main { max-width:1200px; margin:0 auto; padding:28px 20px; }
.homepage-grid { display:grid; grid-template-columns:2.2fr 1fr; gap:36px; }
@media (max-width:800px){ .homepage-grid{grid-template-columns:1fr;} }

.category-tag {
  display:inline-flex; align-items:center; gap:6px;
  color:var(--red); font-size:11px; font-weight:800;
  text-transform:uppercase; letter-spacing:.08em; margin-bottom:10px;
  background:none; padding:0; border-radius:0;
}
.category-tag::before{
  content:''; width:7px; height:7px; border-radius:50%; background:var(--red); display:inline-block;
}

/* Featured / hero article */
.featured-article { border-bottom:1px solid var(--rule); padding-bottom:26px; margin-bottom:26px; }
.featured-article img { width:100%; height:380px; object-fit:cover; border-radius:0; margin-bottom:16px; }
.featured-article h1 {
  font-family:var(--font-display); font-size:34px; line-height:1.2;
  font-weight:700; margin:6px 0 12px;
}
.featured-article a:hover h1 { color:var(--red); }
.featured-article p { color:#333; font-size:16px; line-height:1.55; }

/* Article list (homepage + category) */
.articles-list { margin-top:8px; display:grid; gap:0; }
.article-card { display:flex; gap:18px; border-top:1px solid var(--rule); padding:20px 0; }
.article-card:first-child { border-top:none; padding-top:0; }
.article-card a { display:flex; gap:18px; width:100%; }
.article-card img { width:190px; height:130px; object-fit:cover; border-radius:0; flex-shrink:0; }
.article-card-body h2 {
  font-family:var(--font-display); font-size:20px; line-height:1.3;
  font-weight:700; margin:2px 0 8px;
}
.article-card a:hover h2 { color:var(--red); }
.article-card-body p { color:#4a4a4a; font-size:14.5px; line-height:1.5; }
.article-card-body small { color:var(--muted); font-size:12px; }

@media (max-width:600px){
  .article-card { padding:14px 0; gap:0; }
  .article-card a { flex-direction:row; gap:12px; align-items:flex-start; }
  .article-card img { width:104px; height:80px; }
  .article-card-body .category-tag { font-size:9.5px; margin-bottom:4px; }
  .article-card-body h2 { font-size:15.5px; line-height:1.28; margin:0 0 4px; }
  .article-card-body p {
    font-size:12.5px; line-height:1.4; margin-bottom:4px;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }
  .article-card-body small { font-size:10.5px; }

  .featured-article { padding-bottom:16px; margin-bottom:16px; }
  .featured-article img { height:200px; margin-bottom:10px; }
  .featured-article h1 { font-size:21px; margin:4px 0 8px; }
  .featured-article p { font-size:13.5px; line-height:1.45; }
}

/* Sidebar */
.sidebar { border-left:1px solid var(--rule); padding-left:28px; }
@media (max-width:800px){ .sidebar{border-left:none;padding-left:0; margin-top:10px;} }

.trending-box {
  background:var(--bg-soft);
  border:1px solid var(--rule);
  border-top:3px solid var(--red);
  padding:18px 20px 8px;
}
.trending-box h3 {
  font-size:12px; text-transform:uppercase; letter-spacing:.1em; font-weight:800;
  color:var(--red); border-bottom:2px solid var(--ink); padding-bottom:10px; margin-bottom:6px;
}
.trending-box ol { list-style:none; padding-left:0; display:grid; gap:0; counter-reset:trend; }
.trending-box li { counter-increment:trend; display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--rule); }
.trending-box li:last-child { border-bottom:none; }
.trending-box li::before{
  content:counter(trend);
  font-family:var(--font-display); font-size:22px; font-weight:700;
  color:var(--red); flex-shrink:0; width:22px; line-height:1;
}
.trending-box a { font-weight:700; font-size:14px; line-height:1.4; }
.trending-box a:hover { color:var(--red); }

/* Ads */
.ad-slot { background:var(--bg-soft); text-align:center; padding:12px; margin:18px 0; border:1px dashed var(--rule); font-size:11px; color:#999; text-transform:uppercase; letter-spacing:.06em; }

/* ---------- Article page two-column layout ---------- */
.article-page-grid {
  display:grid; grid-template-columns:1fr 320px; gap:36px;
  padding-top:8px;
}
@media (max-width:860px){ .article-page-grid{ grid-template-columns:1fr; } }
.article-sidebar { border-left:1px solid var(--rule); padding-left:26px; }
@media (max-width:860px){ .article-sidebar{ border-left:none; padding-left:0; border-top:1px solid var(--rule); padding-top:20px; margin-top:6px; } }

/* ---------- Single article ---------- */
.single-article { max-width:760px; }
.single-article .category-tag { font-size:12px; }
.single-article h1 {
  font-family:var(--font-display); font-size:34px; line-height:1.22;
  font-weight:700; margin:10px 0 14px; letter-spacing:-.005em;
}
.article-meta { color:var(--muted); font-size:13px; font-style:italic; margin-bottom:22px; padding-bottom:16px; border-bottom:1px solid var(--rule); }
.article-featured-img { width:100%; max-height:460px; object-fit:cover; border-radius:0; margin-bottom:26px; }

.article-content { font-family:var(--font-display); font-size:18.5px; color:#1a1a1a; line-height:1.8; max-width:760px; }
.article-content p:first-of-type::first-letter {
  float:left; font-family:var(--font-display); font-weight:700;
  font-size:64px; line-height:0.8; padding:6px 8px 0 0; color:var(--ink);
}
.article-content p { margin-bottom:20px; }
.article-content img { margin:22px 0; border-radius:0; }
.article-content h2 { font-family:var(--font-display); font-size:25px; font-weight:700; margin:34px 0 14px; padding-top:6px; border-top:1px solid var(--rule); padding-top:22px; }
.article-content h3 { font-family:var(--font-display); font-size:20px; font-weight:700; margin:26px 0 12px; }
.article-content ul, .article-content ol { margin:0 0 20px 22px; }
.article-content li { margin-bottom:8px; }
.article-content strong { font-weight:700; }

.article-faqs { margin-top:38px; border-top:2px solid var(--ink); padding-top:24px; max-width:760px; }
.article-faqs h2 { font-family:var(--font-display); font-size:23px; margin-bottom:16px; }
.faq-item { margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--rule); }
.faq-item h3 { font-family:var(--font-display); font-size:16.5px; margin-bottom:6px; font-weight:700; }
.faq-item p { font-family:var(--font-body); font-size:15px; color:#3a3a3a; }

.related-articles { margin-top:38px; max-width:760px; border-top:1px solid var(--rule); padding-top:20px; }
.related-articles h3 { font-size:12px; text-transform:uppercase; letter-spacing:.1em; color:var(--red); font-weight:800; margin-bottom:14px; border-bottom:2px solid var(--ink); padding-bottom:10px; }
.related-articles-grid { display:grid; grid-template-columns:repeat(2, 1fr); gap:16px; }
@media (max-width:520px){ .related-articles-grid{ grid-template-columns:1fr; } }
.related-card { display:flex; gap:12px; align-items:center; }
.related-card img { width:84px; height:64px; object-fit:cover; flex-shrink:0; }
.related-card span { font-family:var(--font-display); font-weight:700; font-size:14.5px; line-height:1.35; }
.related-card:hover span { color:var(--red); text-decoration:none; }

.comments-section { margin-top:44px; border-top:2px solid var(--ink); padding-top:24px; max-width:760px; }
.comments-section h3 { font-family:var(--font-display); font-size:23px; margin-bottom:18px; }
.comment-item { border-bottom:1px solid var(--rule); padding:14px 0; }
.comment-form, .contact-form, .newsletter-form { display:grid; gap:12px; margin-top:18px; max-width:500px; }
.comment-form input, .comment-form textarea, .contact-form input, .contact-form textarea {
  padding:11px; border:1px solid var(--rule); border-radius:0; font-family:inherit; font-size:14px;
}
.comment-form textarea, .contact-form textarea { min-height:100px; }
.comment-form button, .contact-form button, .newsletter-form button {
  background:var(--red); color:#fff; border:none; padding:11px 22px; border-radius:0;
  cursor:pointer; font-weight:700; text-transform:uppercase; letter-spacing:.04em; font-size:13px;
}
.comment-form button:hover, .contact-form button:hover, .newsletter-form button:hover { background:var(--ink); }
.comment-success { color:#1a7a1a; margin-bottom:12px; font-weight:600; }

/* Newsletter band */
.newsletter-box { background:var(--ink); color:#fff; text-align:center; padding:44px 20px; margin-top:24px; }
.newsletter-box h3 { font-family:var(--font-display); font-size:24px; margin-bottom:8px; }
.newsletter-box p { color:#bbb; margin-bottom:6px; }
.newsletter-form { flex-direction:row; margin:18px auto 0; display:flex; max-width:420px; }
.newsletter-form input { flex:1; border-radius:0; border:none; padding:12px; }
.newsletter-form button { border-radius:0; }

/* Footer */
.site-footer { background:var(--ink); color:#ccc; padding:32px 20px; text-align:center; border-top:3px solid var(--red); }
.footer-links, .footer-social { display:flex; gap:18px; justify-content:center; margin-bottom:12px; flex-wrap:wrap; }
.footer-links a, .footer-social a { color:#ccc; font-size:12.5px; text-transform:uppercase; letter-spacing:.03em; }
.footer-links a:hover, .footer-social a:hover { color:#fff; }
.footer-text { font-size:11.5px; color:#888; margin-top:12px; }

/* Category page */
.category-title {
  font-family:var(--font-display); font-size:28px; font-weight:700;
  border-bottom:2px solid var(--ink); padding-bottom:12px; margin-bottom:22px;
}
.pagination { display:flex; gap:8px; margin-top:26px; }
.pagination a { padding:7px 13px; border:1px solid var(--rule); border-radius:0; font-size:13px; font-weight:600; }
.pagination a:hover { border-color:var(--ink); text-decoration:none; }
.pagination a.active { background:var(--red); color:#fff; border-color:var(--red); }

/* Static pages */
.static-page { max-width:800px; }
.static-page h1 { font-family:var(--font-display); font-size:30px; margin-bottom:18px; }
.not-found { text-align:center; padding:90px 20px; }
.not-found h1 { font-family:var(--font-display); font-size:28px; margin-bottom:10px; }

.article-featured-img { object-fit:cover; }
.article-gallery { margin:26px 0; max-width:760px; }
.article-gallery h3 { font-family:var(--font-display); font-size:19px; margin-bottom:14px; }
.gallery-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.gallery-grid img { width:100%; height:150px; object-fit:cover; border-radius:0; cursor:pointer; }
.gallery-grid img:hover { opacity:.85; }

/* =========================================================
   MAGAZINE HOMEPAGE (Dawn.com style) — top row + sections
   ========================================================= */

.top-row {
  max-width:1200px; margin:0 auto; padding:22px 20px 0;
  display:grid; grid-template-columns:2fr 1fr; gap:28px;
  border-bottom:1px solid var(--rule); padding-bottom:24px;
}
@media (max-width:860px){ .top-row{ grid-template-columns:1fr; } }

.top-row .featured-article { border-bottom:none; padding-bottom:0; margin-bottom:0; }

/* Must Read Stories box */
.must-read-box { border-left:1px solid var(--rule); padding-left:22px; }
@media (max-width:860px){ .must-read-box{ border-left:none; padding-left:0; border-top:1px solid var(--rule); padding-top:18px; } }
.must-read-box h3 {
  font-size:12px; text-transform:uppercase; letter-spacing:.1em; font-weight:800;
  color:var(--red); border-bottom:2px solid var(--ink); padding-bottom:10px; margin-bottom:6px;
}
.must-read-list { display:grid; gap:0; }
.must-read-item { border-top:1px solid var(--rule); padding:14px 0; }
.must-read-item:first-child { border-top:none; }
.must-read-item a { display:flex; gap:12px; }
.must-read-item img { width:78px; height:60px; object-fit:cover; flex-shrink:0; }
.must-read-body h4 {
  font-family:var(--font-display); font-size:14.5px; line-height:1.35; font-weight:700; margin-top:3px;
}
.must-read-item a:hover h4 { color:var(--red); }
.category-tag.small { font-size:10px; }

/* Site main padding removed since top-row/homepage-grid manage their own container */
body > main.site-main { padding-top:0; }
.site-main { max-width:1200px; margin:0 auto; padding:0 20px 28px; }
.top-row, .homepage-grid { padding-left:0; padding-right:0; }
.homepage-grid { padding-top:26px; }

/* Per-category magazine sections */
.category-section { margin-top:8px; margin-bottom:36px; }
.category-section-head {
  display:flex; align-items:baseline; justify-content:space-between;
  border-bottom:2px solid var(--ink); padding-bottom:9px; margin-bottom:16px;
}
.category-section-head h3 {
  font-family:var(--font-display); font-size:19px; font-weight:700;
  text-transform:uppercase; letter-spacing:.03em;
  border-left:4px solid var(--red); padding-left:10px;
}
.category-section-head .more-link {
  font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--red);
}
.category-section-head .more-link:hover { text-decoration:none; opacity:.75; }

.category-section-grid {
  display:grid; grid-template-columns:repeat(4, 1fr); gap:18px;
}
@media (max-width:900px){ .category-section-grid{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:480px){ .category-section-grid{ grid-template-columns:1fr; gap:0; } }

.mini-card img { width:100%; height:120px; object-fit:cover; margin-bottom:8px; }
.mini-card h4 {
  font-family:var(--font-display); font-size:15px; line-height:1.32; font-weight:700; margin-bottom:5px;
}
.mini-card a:hover h4 { color:var(--red); }
.mini-card small { color:var(--muted); font-size:11px; }

@media (max-width:480px){
  .mini-card { border-top:1px solid var(--rule); padding:12px 0; }
  .mini-card:first-child { border-top:none; padding-top:0; }
  .mini-card a { display:flex; gap:12px; align-items:flex-start; }
  .mini-card img { width:90px; height:70px; margin-bottom:0; flex-shrink:0; }
  .mini-card h4 { font-size:14px; margin-bottom:2px; }
}

/* =========================================================
   SEARCH BAR (header) + Search results page
   ========================================================= */
.search-bar-wrap {
  background:var(--ink);
  border-bottom:3px solid var(--red);
  padding:10px 20px;
  display:flex;
  justify-content:flex-end;
}
.search-form {
  max-width:400px; width:100%; margin:0;
  display:flex; align-items:stretch;
  background:#fff;
  border-radius:5px;
  overflow:hidden;
  box-shadow:0 2px 8px rgba(0,0,0,.25);
}
.search-input {
  flex:1; border:none; outline:none; padding:8px 14px;
  font-family:var(--font-body); font-size:13.5px; color:var(--ink); background:transparent;
}
.search-input::placeholder { color:#9a9a9a; }
.search-btn {
  background:var(--red); color:#fff; border:none; padding:0 18px;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition:background .15s ease;
}
.search-btn:hover { background:#8f1414; }

@media (max-width:600px){
  .search-bar-wrap { padding:8px 14px; }
  .search-form { max-width:100%; border-radius:5px; }
  .search-input { padding:8px 12px; font-size:13px; }
  .search-btn { padding:0 16px; }
}

.search-page-title {
  font-family:var(--font-display); font-size:27px; font-weight:700;
  padding-bottom:14px; margin-bottom:4px;
  border-bottom:2px solid var(--ink);
}
.search-page-title::first-letter { color:var(--red); }
.search-count {
  color:var(--muted); font-size:12.5px; font-weight:600;
  text-transform:uppercase; letter-spacing:.06em;
  margin:12px 0 20px;
}
.no-results {
  color:#444; font-size:15px; padding:36px 24px; text-align:center;
  background:var(--bg-soft); border:1px dashed var(--rule); margin-top:12px;
}