/*
Theme Name: TriangleKerala News
Theme URI: https://trianglekerala.com
Author: TriangleKerala
Description: Classic Kerala News Portal — Mobile Optimized, No Ads
Version: 6.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Mukta+Malar:wght@400;600;700;800&family=Noto+Serif:wght@400;700&family=Inter:wght@400;500;600;700;900&display=swap');

:root {
  --red:       #c0392b;
  --red-dark:  #962d22;
  --black:     #111111;
  --black-sec: #1a1a1a;
  --navy:      #1b2a4a;
  --gray-bg:   #f2f2f2;
  --gray-br:   #ddd;
  --gray-txt:  #555;
  --white:     #ffffff;
  --blue:      #1a56db;
  --shadow:    0 1px 4px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 14px rgba(0,0,0,0.12);
  --trans:     all 0.2s ease;
  --serif:     'Noto Serif', Georgia, serif;
  --sans:      'Inter', 'Mukta Malar', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--gray-bg);
  color: var(--black);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: var(--trans); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 14px; }



/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  background: var(--white);
  padding: 10px 0;
  border-bottom: 3px solid var(--red);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-logo img { height: 46px; width: auto; }
.logo-text {
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--black);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.logo-text span { color: var(--red); }
.logo-tagline {
  font-size: 10px;
  font-weight: 500;
  color: var(--gray-txt);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Menu Toggle (mobile) */
.menu-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.4px;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.main-nav {
  background: var(--black);
  display: none;
}
.main-nav.active { display: block; }

.nav-menu-wrap ul { display: flex; flex-direction: column; }
.nav-menu-wrap ul li { border-bottom: 1px solid #2a2a2a; position: relative; }
.nav-menu-wrap ul li a {
  display: block;
  padding: 12px 16px;
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-menu-wrap ul li a:hover,
.nav-menu-wrap ul li.current-menu-item > a { color: var(--red); }
.nav-menu-wrap ul li > ul { display: none; background: #222; }
.nav-menu-wrap ul li:hover > ul { display: block; }
.nav-menu-wrap ul li ul li a {
  padding: 9px 24px;
  font-size: 12px;
  text-transform: none;
  color: #bbb;
  border-bottom: 1px solid #2e2e2e;
}

/* ==========================================================================
   BREAKING NEWS TICKER
   ========================================================================== */
.breaking-bar {
  background: var(--white);
  display: flex;
  align-items: center;
  border-top: 1px solid var(--gray-br);
  border-bottom: 2px solid var(--gray-br);
  overflow: hidden;
  min-height: 36px;
}
.breaking-label {
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 10px;
  text-transform: uppercase;
  padding: 6px 14px;
  letter-spacing: 0.8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-wrap { flex: 1; overflow: hidden; }
.ticker {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
.ticker:hover { animation-play-state: paused; }
.ticker a {
  color: var(--black);
  font-size: 12.5px;
  font-weight: 600;
  padding-right: 40px;
}
.ticker a::before {
  content: '▸';
  color: var(--red);
  margin-right: 6px;
}
.ticker a:hover { color: var(--red); }
@keyframes ticker-scroll { 0%{transform:translateX(100%)} 100%{transform:translateX(-100%)} }

/* ==========================================================================
   LAYOUT — Mobile First (single column)
   ========================================================================== */
.main-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 0;
}
.content-area { width: 100%; min-width: 0; }
.sidebar { width: 100%; display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }

/* ==========================================================================
   MOBILE CATEGORY STRIP — visible only on mobile, hidden on desktop
   ========================================================================== */
.mobile-cat-strip {
  background: var(--white);
  border-bottom: 1px solid var(--gray-br);
  overflow: hidden;
}
.mobile-cat-strip-inner {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0;
  gap: 0;
}
.mobile-cat-strip-inner::-webkit-scrollbar { display: none; }
.mobile-cat-strip-inner a {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  border-right: 1px solid var(--gray-br);
  border-bottom: 3px solid transparent;
  transition: var(--trans);
  flex-shrink: 0;
}
.mobile-cat-strip-inner a:first-child {
  color: var(--red);
  border-bottom-color: var(--red);
}
.mobile-cat-strip-inner a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
  background: #fff8f8;
}

/* ==========================================================================
   MOBILE TRENDING STRIP — compact numbered list, mobile only
   ========================================================================== */
.mobile-trending-strip {
  background: var(--white);
  border: 1px solid var(--gray-br);
  margin-bottom: 20px;
}
.mobile-trending-strip .mts-header {
  background: var(--black);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 8px 14px;
  letter-spacing: 0.8px;
  border-top: 3px solid var(--red);
  display: flex;
  align-items: center;
  gap: 6px;
}
.mobile-trending-strip .mts-header i { color: var(--red); }
.mts-list { padding: 4px 0; }
.mts-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #f5f5f5;
  transition: var(--trans);
}
.mts-item:last-child { border-bottom: none; }
.mts-item:hover { background: #fafafa; }
.mts-num {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ddd;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}
.mts-item:nth-child(1) .mts-num { color: var(--red); }
.mts-item:nth-child(2) .mts-num { color: #e67e22; }
.mts-item:nth-child(3) .mts-num { color: #f1c40f; }
.mts-title {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mts-item:hover .mts-title { color: var(--red); }

/* Hide mobile strips on desktop */
@media (min-width: 768px) {
  .mobile-cat-strip  { display: none; }
  .mobile-trending-strip { display: none; }
}

/* ==========================================================================
   SECTION HEADER
   ========================================================================== */
.sec-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--black);
}
.sec-header h2 {
  background: var(--black);
  color: #fff;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 6px 14px;
  letter-spacing: 0.8px;
}
.sec-header h2 i { color: var(--red); margin-right: 5px; }
.sec-header-red { border-bottom-color: var(--red); }
.sec-header-red h2 { background: var(--red); }

/* Legacy alias */
.sec-title { display: flex; align-items: center; border-bottom: 2px solid var(--black); margin-bottom: 16px; }
.sec-title h2 { background: var(--black); color: #fff; font-size: 13px; font-weight: 800; text-transform: uppercase; padding: 6px 16px; letter-spacing: 0.5px; }

/* ==========================================================================
   HERO — TOP STORY (NEWSPAPER STYLE)
   ========================================================================== */
.hero-section { margin-bottom: 20px; }

/* Lead full-width card */
.hero-lead {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: var(--black);
  margin-bottom: 12px;
}
.hero-lead-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top center;
  opacity: 0.88;
  display: block;
  transition: opacity 0.3s;
}
.hero-lead:hover .hero-lead-img { opacity: 1; }
.hero-lead-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent 0%, rgba(0,0,0,0.9) 100%);
  padding: 50px 14px 16px;
}
.hero-cat-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 7px;
  border-radius: 2px;
}
.hero-lead-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

/* 2-column sub-stories */
.hero-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hero-sub-card {
  background: var(--white);
  border: 1px solid var(--gray-br);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--trans);
}
.hero-sub-card:hover { border-color: var(--red); }
.hero-sub-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  object-position: top center;
}
.hero-sub-card .sub-body { padding: 8px 10px 10px; flex: 1; }
.hero-sub-card .sub-title {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-sub-card:hover .sub-title { color: var(--red); }
.sub-time { font-size: 10px; color: var(--gray-txt); margin-top: 5px; }

/* ==========================================================================
   NEWS CARD GRID
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.news-grid.col2 { grid-template-columns: 1fr; }

.card {
  background: var(--white);
  border: 1px solid var(--gray-br);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--trans);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #e8e8e8;
  display: block;
}
.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s;
}
.card:hover .card-img { transform: scale(1.04); }
.card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.card-cat {
  font-size: 10px;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.card-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.45;
  margin-bottom: 8px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { color: var(--red); }
.card-meta {
  font-size: 11px;
  color: var(--gray-txt);
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
  margin-top: auto;
}
.card-meta i { color: var(--red); }

/* Horizontal compact card (used in category & latest) */
.h-card {
  display: flex;
  background: var(--white);
  border: 1px solid var(--gray-br);
  overflow: hidden;
  margin-bottom: 10px;
  transition: var(--trans);
}
.h-card:hover { border-color: var(--red); }
.h-card-img { width: 110px; flex-shrink: 0; }
.h-card-img img { width: 100%; height: 80px; object-fit: cover; object-position: top center; }
.h-card-body { padding: 10px 12px; flex: 1; }
.h-card-title {
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}
.h-card:hover .h-card-title { color: var(--red); }
.h-card-meta { font-size: 10.5px; color: var(--gray-txt); }

/* Post card (used in category.php) */
.post-card {
  background: var(--white);
  border: 1px solid var(--gray-br);
  overflow: hidden;
  transition: var(--trans);
}
.post-card:hover { box-shadow: var(--shadow-lg); }
.post-card-thumb-wrap { display: block; aspect-ratio: 16/9; overflow: hidden; background: #e8e8e8; }
.post-card-thumb { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.3s; }
.post-card:hover .post-card-thumb { transform: scale(1.04); }
.post-card-body { padding: 12px; }
.post-card-title { font-family: var(--serif); font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 7px; }
.post-card-title a:hover { color: var(--red); }
.post-card-meta { font-size: 11px; color: var(--gray-txt); display: flex; gap: 10px; }
.post-card-meta i { color: var(--red); margin-right: 3px; }

/* ==========================================================================
   CATEGORY SECTION (homepage)
   ========================================================================== */
.cat-section { margin-bottom: 24px; }
.archive-header {
  background: var(--white);
  border-left: 4px solid var(--red);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.archive-header h1 {
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--black);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   SIDEBAR WIDGETS
   ========================================================================== */
.widget {
  background: var(--white);
  border: 1px solid var(--gray-br);
  overflow: hidden;
  margin-bottom: 16px;
}
.widget-title {
  background: var(--black-sec);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 9px 14px;
  letter-spacing: 0.8px;
  border-top: 3px solid var(--red);
}

/* Trending list */
.trending-list { padding: 0; }
.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: var(--trans);
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: #fafafa; }
.trend-num {
  font-size: 1.3rem;
  font-weight: 900;
  color: #ddd;
  line-height: 1;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.trending-item:nth-child(1) .trend-num { color: var(--red); }
.trend-title {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
}
.trending-item:hover .trend-title { color: var(--red); }
.trend-time { font-size: 10.5px; color: var(--gray-txt); margin-top: 3px; }

/* Categories widget */
.cat-list { padding: 8px 12px; }
.cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--black);
}
.cat-list a:last-child { border-bottom: none; }
.cat-list a:hover { color: var(--red); padding-left: 4px; }
.cat-list .cnt {
  background: var(--gray-bg);
  color: var(--gray-txt);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

/* Category accordion */
.cat-accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
  list-style: none;
}
.cat-accordion summary::-webkit-details-marker { display: none; }
.cat-accordion summary:hover { color: var(--red); padding-left: 4px; }
.cat-sub-list { padding-left: 14px; background: #fafafa; }
.cat-sub-list a { border-bottom: 1px solid #eee; padding: 7px 0; font-size: 12.5px; color: #555; }
.cat-sub-list a:last-child { border-bottom: none; }

/* ==========================================================================
   SINGLE POST
   ========================================================================== */
.single-wrap {
  background: var(--white);
  padding: 16px;
  border: 1px solid var(--gray-br);
}
.s-cat {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.s-title {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--black);
  margin-bottom: 12px;
}
.s-meta {
  font-size: 11.5px;
  color: var(--gray-txt);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-br);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.s-meta i { color: var(--red); margin-right: 4px; }
.s-thumb {
  width: 100%;
  border-radius: 2px;
  margin-bottom: 20px;
  object-fit: cover;
  object-position: top center;
}
.s-content { font-family: var(--serif); font-size: 16px; line-height: 1.75; color: #2a2a2a; }
.s-content p { margin-bottom: 16px; }
.s-content h2 { font-family: var(--sans); font-size: 1.25rem; font-weight: 800; margin: 24px 0 12px; color: var(--black); }
.s-content img { max-width: 100%; height: auto; margin: 16px 0; }
.s-content a { color: var(--blue); text-decoration: underline; }

/* Share buttons */
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.sh-btn {
  flex: 1;
  min-width: 75px;
  text-align: center;
  padding: 9px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  border-radius: 3px;
}
.sh-btn.fb { background: #1877f2; }
.sh-btn.tw { background: #14171a; }
.sh-btn.wa { background: #25d366; }

/* Post navigation */
.post-nav {
  display: flex;
  flex-direction: column;   /* FIX 2: stack vertically on mobile */
  gap: 10px;
  margin-top: 24px;
  border-top: 1px solid var(--gray-br);
  padding-top: 16px;
}
.prev-post, .next-post {
  background: var(--gray-bg);
  border: 1px solid var(--gray-br);
  padding: 10px 14px;
  border-radius: 3px;
  font-size: 13px;
  width: 100%;              /* FIX 2: full width on mobile */
  max-width: 100%;
  transition: var(--trans);
}
.next-post { text-align: left; }  /* FIX 2: left-align when stacked */
.prev-post:hover, .next-post:hover { border-color: var(--red); }
.nav-label { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.nav-ttl { font-weight: 700; color: var(--black); font-size: 13px; line-height: 1.3; }

/* Tags */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a {
  background: var(--gray-bg);
  border: 1px solid var(--gray-br);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 2px;
  color: var(--black);
}
.tag-cloud a:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 20px 0; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--gray-br);
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  border-radius: 2px;
  transition: var(--trans);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--black);
  color: #999;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 4px solid var(--red);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid #222;
}
.f-logo img { height: 38px; margin-bottom: 10px; }
.f-about { font-size: 12.5px; line-height: 1.65; }
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-left: 8px;
  border-left: 3px solid var(--red);
  letter-spacing: 0.5px;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 12.5px; transition: var(--trans); }
.footer-col ul li a:hover { color: var(--red); }
.footer-bottom {
  background: #0a0a0a;
  padding: 14px 16px;
  text-align: center;
  font-size: 11.5px;
  color: #666;
  margin-top: 0;
}
.footer-bottom a { color: #999; }

/* ==========================================================================
   LEGAL / PAGE TEMPLATE
   ========================================================================== */
.legal-page-wrapper { max-width: 800px; margin: 0 auto; background: var(--white); padding: 32px 20px; border: 1px solid var(--gray-br); }
.breadcrumbs { font-size: 12px; color: var(--gray-txt); margin-bottom: 18px; }
.breadcrumbs a { color: var(--blue); text-decoration: none; }
.legal-title { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--black); margin-bottom: 24px; text-align: center; border-bottom: 2px solid var(--red); padding-bottom: 12px; }
.legal-content { font-family: var(--serif); font-size: 15.5px; line-height: 1.8; color: #333; }
.legal-content h2 { font-family: var(--sans); font-size: 1.3rem; font-weight: 800; margin: 26px 0 12px; }
.legal-content h3 { font-family: var(--sans); font-size: 1.1rem; font-weight: 700; margin: 18px 0 8px; }
.legal-content p { margin-bottom: 16px; }
.legal-content ul { margin-bottom: 16px; padding-left: 18px; list-style: disc; }
.legal-content li { margin-bottom: 8px; }

/* ==========================================================================
   DESKTOP ENHANCEMENTS (768px+)
   ========================================================================== */
@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .main-nav { display: block; position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow); }
  .nav-menu-wrap ul { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .nav-menu-wrap ul li { border-bottom: none; }
  .nav-menu-wrap ul li > ul {
    position: absolute; top: 100%; left: 0;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-top: 2px solid var(--red);
    z-index: 100;
  }

  /* Layout: 2-column */
  .main-wrapper { flex-direction: row; gap: 24px; }
  .content-area { flex: 1; }
  .sidebar { width: 280px; flex-shrink: 0; margin-top: 0; }

  /* Hero */
  .hero-lead-img { height: 380px; }
  .hero-lead-title { font-size: 1.6rem; }
  .hero-sub-card img { height: 140px; }

  /* Grids */
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid.col2 { grid-template-columns: repeat(2, 1fr); }
  .news-grid.col3 { grid-template-columns: repeat(3, 1fr); }

  /* Single */
  .single-wrap { padding: 28px 32px; }
  .s-title { font-size: 2rem; }
  .sh-btn { flex: none; min-width: 110px; }

  /* Footer */
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }

  /* Legal */
  .legal-page-wrapper { padding: 40px; }
}

/* ==========================================================================
   MOBILE-ONLY FIXES (max 767px)
   ========================================================================== */
@media (max-width: 767px) {
  /* FIX 1: Hero sub-cards stack full-width on mobile */
  .hero-sub-grid {
    grid-template-columns: 1fr;
  }
  .hero-sub-card img {
    height: 180px;
  }

  /* FIX 2: Post nav already stacked above (flex-direction: column) */
  /* On desktop, override back to side-by-side — handled in 768px block */

  /* FIX 3: Hide sidebar on single post mobile (it shows redundantly at bottom) */
  .single-post .sidebar {
    display: none;
  }
}

@media (min-width: 768px) {
  /* Restore post-nav to side-by-side on desktop */
  .post-nav {
    flex-direction: row;
  }
  .prev-post, .next-post {
    max-width: 48%;
    width: auto;
    flex: 1;
  }
  .next-post { text-align: right; }
}

@media (min-width: 1024px) {
  .hero-sub-grid { grid-template-columns: repeat(4, 1fr); }
  .news-grid.col3 { grid-template-columns: repeat(3, 1fr); }
}
