/* ============================================================
   CATEGORY PAGE — category.css
   BusinessMunch Theme
   3-column layout: Left Sidebar | Main Feed | Right Sidebar
   ============================================================ */

/* ── MAIN WRAP ── */
.main-wrap { max-width: var(--max); margin: 0 auto; padding: 28px 24px; }

/* ── 3-COLUMN LAYOUT ── */
.cat-layout {
  display: grid;
  grid-template-columns: 240px 1fr 290px;
  gap: 28px;
  align-items: start;
}

/* ============================================================
   LEFT SIDEBAR
   ============================================================ */
.cat-left-sidebar { position: sticky; top: 80px; }
.cat-left-sidebar .sidebar-widget {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.cat-left-sidebar .sw-header {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 2px; color: #fff; background: var(--navy);
  padding: 10px 14px; display: flex; align-items: center; gap: 6px;
}
.cat-left-sidebar .sw-item {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px; transition: background .15s;
}
.cat-left-sidebar .sw-item:hover { background: var(--off-white); }
.cat-left-sidebar .sw-item:last-child { border-bottom: none; }
.cat-left-sidebar .sw-num {
  font-size: 20px; font-weight: 800; color: var(--border-dark);
  min-width: 22px; line-height: 1; padding-top: 2px; flex-shrink: 0;
}
.cat-left-sidebar .sw-title {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  line-height: 1.4; margin-bottom: 5px; transition: color .2s;
}
.cat-left-sidebar .sw-item:hover .sw-title { color: var(--red); }
.cat-left-sidebar .sw-meta { font-size: 10px; color: var(--text-light); }
.cat-left-sidebar .sw-cat {
  font-weight: 700; color: var(--red); text-transform: uppercase;
  font-size: 9px; letter-spacing: .8px;
}

/* ============================================================
   FEATURED ARTICLE (TOP STORY)
   ============================================================ */
.cat-featured {
  display: flex; align-items: flex-start;
  height: 160px; max-height: 160px; overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  margin-bottom: 24px; cursor: pointer;
  transition: box-shadow .25s; text-decoration: none;
}
.cat-featured:hover { box-shadow: var(--shadow-lg); }
.cat-featured-img {
  width: 200px; min-width: 200px; max-width: 200px;
  height: 160px; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(145deg, #0e1f3d, #162847, #0a1830);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.cat-featured-img img { display: none; }
.cat-feat-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--red); color: #fff; font-size: 9px; font-weight: 800;
  padding: 4px 10px; border-radius: 3px; text-transform: uppercase;
  letter-spacing: 1.5px; z-index: 1;
}
.cat-featured-body {
  flex: 1; padding: 14px 18px; overflow: hidden;
  height: 160px; max-height: 160px;
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
}
.cf-cat {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--red); margin-bottom: 5px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cf-cat::before {
  content: ''; display: block; width: 3px; height: 12px;
  background: var(--red); border-radius: 2px; flex-shrink: 0;
}
.cf-title {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  color: var(--text); line-height: 1.4; margin-bottom: 6px;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color .2s;
}
.cat-featured:hover .cf-title { color: var(--red); }
.cf-excerpt { display: none; }
.cf-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-light); }

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-head { display: flex; align-items: center; gap: 12px; margin: 28px 0 16px; }
.section-head-title {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 2.5px; color: var(--navy); white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.section-head-title::before {
  content: ''; display: block; width: 4px; height: 16px;
  background: var(--red); border-radius: 2px;
}
.section-head-line { flex: 1; height: 1px; background: linear-gradient(to right, var(--border), transparent); }

/* ============================================================
   ARTICLE LIST ITEMS (MORE STORIES)
   ============================================================ */
.art-item {
  display: flex; align-items: flex-start;
  height: 110px; max-height: 110px; overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
  text-decoration: none;
}
.art-item:hover { box-shadow: var(--shadow); transform: translateX(2px); }
.art-item-img {
  width: 140px; min-width: 140px; max-width: 140px; height: 110px;
  flex-shrink: 0; overflow: hidden;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.art-item-img img { display: none; }
.art-item-img.ai-1 { background-color: #0e2244; background-image: linear-gradient(135deg,#0e2244,#1c4080); }
.art-item-img.ai-2 { background-color: #0e4a1e; background-image: linear-gradient(135deg,#0e4a1e,#1c8038); }
.art-item-img.ai-3 { background-color: #4a0e0e; background-image: linear-gradient(135deg,#4a0e0e,#8a1c1c); }
.art-item-img.ai-4 { background-color: #2a0e4a; background-image: linear-gradient(135deg,#2a0e4a,#501c8a); }
.art-item-img.ai-5 { background-color: #4a2a0e; background-image: linear-gradient(135deg,#4a2a0e,#8a501c); }
.art-item-img.ai-6 { background-color: #0e4a4a; background-image: linear-gradient(135deg,#0e4a4a,#1c8a8a); }
.art-item-img.ai-7 { background-color: #1e0e4a; background-image: linear-gradient(135deg,#1e0e4a,#3a1c8a); }
.art-item-img.ai-8 { background-color: #1e3a0e; background-image: linear-gradient(135deg,#1e3a0e,#387a1c); }
.art-item-body {
  flex: 1; padding: 12px 16px; overflow: hidden;
  height: 110px; max-height: 110px;
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
}
.ai-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ai-cat { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--red); white-space: nowrap; }
.ai-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-dark); flex-shrink: 0; }
.ai-time { font-size: 10.5px; color: var(--text-light); }
.ai-title {
  font-family: var(--font-display); font-size: 14px; font-weight: 400;
  color: var(--text); line-height: 1.4;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color .2s;
}
.art-item:hover .ai-title { color: var(--red); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; align-items: center; gap: 6px; padding: 20px 0 8px; flex-wrap: wrap; }
.page-btn {
  width: 36px; height: 36px; display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 5px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--white);
  color: var(--text); cursor: pointer; text-decoration: none; transition: all .15s;
}
.page-btn:hover { background: var(--off-white); border-color: var(--border-dark); }
.page-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.page-sep { color: var(--text-light); font-size: 13px; padding: 0 4px; }

/* ============================================================
   RIGHT SIDEBAR
   ============================================================ */
.cat-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 20px; }
.ad-sidebar { width: 100%; background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* sidebar-widget / sw-* defined in style.css — category overrides only below */

.nl-mini { background: var(--navy); border-radius: var(--radius); padding: 20px 18px; color: #fff; }
.nl-mini-badge {
  display: inline-block; background: var(--red); color: #fff; font-size: 8.5px;
  font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;
  padding: 3px 10px; border-radius: 3px; margin-bottom: 10px;
}
.nl-mini h4 { font-family: var(--font-display); font-size: 16px; font-weight: 400; margin-bottom: 8px; line-height: 1.3; }
.nl-mini p { font-size: 12.5px; opacity: .75; line-height: 1.6; margin-bottom: 14px; }
.nl-mini input[type="email"] {
  width: 100%; padding: 9px 12px; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px; background: rgba(255,255,255,0.1); color: #fff;
  font-size: 13px; margin-bottom: 8px; outline: none;
}
.nl-mini input[type="email"]::placeholder { opacity: .55; }
.nl-mini-btn {
  width: 100%; background: var(--red); color: #fff; border: none;
  border-radius: 4px; padding: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .2s; font-family: var(--font-display);
}
.nl-mini-btn:hover { background: var(--red-dark); }

.ad-sidebar-600-block { width: 100%; text-align: center; }
.ad-sidebar-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #bbb; margin-bottom: 6px; }

.tag-cloud-wrap { padding: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud-item {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 3px; background: var(--off-white);
  border: 1px solid var(--border); color: var(--text-mid); transition: all .15s;
}
.tag-cloud-item:hover,
.tag-cloud-item.hot { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ============================================================
   BODY AD SLOTS
   ============================================================ */
.body-ad-wrap { text-align: center; margin: 24px 0; }
.body-ad-label { font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #aab0c0; margin-bottom: 6px; }
.body-ad-728x90 { display: block; }
.body-ad-320x100 { display: none; }
.ad-mobile-sticky { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 300; }

/* ============================================================
   LATEST NEWS GRID (bottom)
   ============================================================ */

/* news-card defined in style.css */

/* ============================================================
   CATEGORY HERO
   ============================================================ */
@keyframes ch-slide-up   { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes ch-slide-left { from { opacity:0; transform:translateX(-12px); } to { opacity:1; transform:translateX(0); } }
@keyframes ch-bar-grow   { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@keyframes ch-dot-pulse  { 0%,100% { box-shadow:0 0 0 0 rgba(192,57,43,.5); } 60% { box-shadow:0 0 0 6px rgba(192,57,43,0); } }

.cat-hero { background:#fff; position:relative; border-bottom:1px solid #ebebeb; overflow:hidden; }
.cat-hero::after { content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:#c0392b; }
.cat-hero-inner { max-width:var(--max); margin:0 auto; padding:36px 40px 32px; position:relative; }
.cat-hero-eyebrow {
  display:inline-flex; align-items:center; gap:7px; font-size:10px; font-weight:800;
  text-transform:uppercase; letter-spacing:3px; color:#c0392b; margin-bottom:12px;
  animation:ch-slide-left .45s ease both;
}
.cat-hero-eyebrow-dot { width:7px; height:7px; background:#c0392b; border-radius:50%; animation:ch-dot-pulse 1.8s ease-in-out infinite; }
.cat-hero-title { font-family:var(--font-display); font-size:52px; font-weight:400; color:#0d1117; letter-spacing:-2px; line-height:1; animation:ch-slide-up .5s ease .05s both; }
.cat-hero-title-bar { display:block; height:4px; width:64px; background:#c0392b; border-radius:2px; margin:12px 0 16px; transform-origin:left; animation:ch-bar-grow .6s cubic-bezier(.4,0,.2,1) .2s both; }
.cat-hero-desc { font-size:14px; color:#6b7280; line-height:1.7; max-width:480px; margin-bottom:24px; animation:ch-slide-up .5s ease .15s both; }
.cat-hero-stats { display:flex; }
.cat-hero-stat { display:flex; flex-direction:column; gap:2px; padding:10px 20px 10px 0; margin-right:20px; border-right:1px solid #e5e7eb; }
.cat-hero-stat:first-child { padding-left:0; }
.cat-hero-stat:last-child  { border-right:none; }
.cat-hero-stat-val { font-family:var(--font-display); font-size:24px; font-weight:400; color:#0d1117; letter-spacing:-0.5px; line-height:1; }
.cat-hero-stat-val.red { color:#c0392b; }
.cat-hero-stat-label { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:1.5px; color:#9ca3af; }

/* ============================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================ */
@media (max-width:1024px) {
  .cat-layout { grid-template-columns: 200px 1fr 250px; gap: 20px; }
  .news-grid-4 { grid-template-columns: repeat(3,1fr); }
}

/* ============================================================
   RESPONSIVE — SMALL TABLET (≤ 900px)
   ============================================================ */
@media (max-width:900px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-left-sidebar { display: none; }
  .cat-sidebar { display: none; }
  .news-grid-4 { grid-template-columns: repeat(2,1fr); }
  .body-ad-728x90  { display: none; }
  .body-ad-320x100 { display: block; }
  .cat-hero-inner  { padding: 28px 24px 24px; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 640px)
   ============================================================ */
@media (max-width:640px) {
  html, body { overflow-x: hidden; }
  .main-wrap  { padding: 10px 12px; overflow-x: hidden; }

  /* Hero */
  .cat-hero::after      { width: 3px; }
  .cat-hero-inner       { padding: 18px 12px 16px 16px; }
  .cat-hero-title       { font-size: 26px; letter-spacing: -0.5px; }
  .cat-hero-title-bar   { width: 36px; margin: 8px 0 10px; }
  .cat-hero-desc        { font-size: 13px; margin-bottom: 14px; }
  .cat-hero-eyebrow     { font-size: 9px; letter-spacing: 2px; }
  .cat-hero-stats       { flex-wrap: wrap; gap: 8px 0; }
  .cat-hero-stat        { padding: 6px 14px 6px 0; margin-right: 14px; }
  .cat-hero-stat-val    { font-size: 18px; }
  .cat-hero-stat-label  { font-size: 8px; }

  /* Featured card — stack vertically on mobile */
  .cat-featured         { flex-direction: column; height: auto; max-height: none; }
  .cat-featured-img     { width: 100%; min-width: 100%; max-width: 100%; height: 160px; }
  .cat-featured-body    { height: auto; max-height: none; padding: 12px 14px; }
  .cf-title             { font-size: 15px; -webkit-line-clamp: 3; }

  /* Article items */
  .art-item             { height: auto; max-height: none; }
  .art-item-img         { width: 90px; min-width: 90px; max-width: 90px; height: 90px; }
  .art-item-body        { height: auto; max-height: none; padding: 10px 12px; }
  .ai-title             { font-size: 13px; }

  /* Bottom grid */
  .news-grid-4          { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .nc-title             { font-size: 13px; }

  /* Ads — leaderboard cap on mobile */
  .body-ad-728x90       { display: none !important; }
  .body-ad-320x100      { display: block !important; max-width: 100%; overflow: hidden; }
  .ad-sidebar           { display: none !important; }
  .ad-sidebar-600-block { display: none !important; }

  /* Pagination */
  .pagination           { gap: 4px; }
  .page-btn             { width: 32px; height: 32px; font-size: 12px; }
}

/* ============================================================
   RESPONSIVE — VERY SMALL (≤ 400px)
   ============================================================ */
@media (max-width:400px) {
  .cat-hero-title { font-size: 22px; }
  .art-item-img   { width: 75px; min-width: 75px; }
  .ai-title       { font-size: 12.5px; }
  .news-grid-4    { grid-template-columns: 1fr; }
}
