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

/* ── MAIN WRAP ── */
/* .main-wrap is defined in style.css — no override needed */

/* ── 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-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.cat-left-sidebar .sw-header {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2.2px; color: var(--navy); background: var(--off-white);
  padding: 10px 14px; display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--border); border-left: 3px solid var(--red);
  font-family: var(--font-ui);
}
.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: 400; color: var(--text);
  line-height: 1.42; margin-bottom: 5px; transition: color .2s;
  font-family: var(--font-display);
}
.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: 8.5px; letter-spacing: 1px; font-family: var(--font-ui);
}

/* ============================================================
   FEATURED ARTICLE (TOP STORY)
   ============================================================ */
/* Badge wrapper */
/* .cat-feat-label-wrap removed — badge now inside image */
.cat-feat-badge-top {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-ui);
  box-shadow: 0 2px 8px rgba(192,57,43,.5);
  z-index: 3;
  backdrop-filter: blur(2px);
}
/* Card — Desktop: vertical (image top, body below) */
.cat-featured {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow .25s, transform .2s;
  text-decoration: none;
}
.cat-featured:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Image wrapper — position relative for badge overlay */
.cat-featured-img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, #0e1f3d, #162847);
}

/* Actual <img> tag — fills wrapper, proper aspect ratio */
.cat-featured-img-tag {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .4s ease;
}
.cat-featured:hover .cat-featured-img-tag { transform: scale(1.03); }

/* No-image fallback */
.cat-featured-img {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-featured-img-noimg { background: linear-gradient(145deg, #0e1f3d, #162847); }

/* Body */
.cat-featured-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.cf-cat {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--red);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
}
.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: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: color .2s;
}
.cat-featured:hover .cf-title { color: var(--red); }
.cf-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: auto;
}
/* Old overlay badge — not used */
.cat-feat-badge { display: none; }

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-head { display: flex; align-items: center; gap: 12px; margin: 28px 0 16px; }
.section-head-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2.5px; color: var(--navy); white-space: nowrap;
  display: flex; align-items: center; gap: 8px; font-family: var(--font-ui);
}
.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;
  min-height: 110px; overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 12px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s;
  text-decoration: none;
}
.art-item:hover { box-shadow: var(--shadow); transform: translateX(3px); border-color: transparent; }
.art-item-img {
  width: 140px; min-width: 140px; max-width: 140px; min-height: 110px;
  flex-shrink: 0; overflow: hidden;
  position: relative;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.art-item-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block !important;
}
.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;
  min-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: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; color: var(--red); white-space: nowrap; font-family: var(--font-ui); }
.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: 7px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--text); cursor: pointer; text-decoration: none;
  transition: all .15s; font-family: var(--font-ui);
}
.page-btn:hover { background: var(--off-white); border-color: var(--border-dark); }
.page-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: var(--shadow-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 */


.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 12px; border-radius: 20px; background: var(--off-white);
  border: 1px solid var(--border); color: var(--text-mid); transition: all .15s;
  font-family: var(--font-ui);
}
.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; }

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

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


.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:700;
  text-transform:uppercase; letter-spacing:3px; color:#c0392b; margin-bottom:12px;
  animation:ch-slide-left .45s ease both; font-family:var(--font-ui);
}
.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; font-family:var(--font-ui); }

/* ============================================================
   RESPONSIVE — TABLET LANDSCAPE (≤ 1024px)
   ============================================================ */
@media (max-width:1024px) {
  .cat-layout          { grid-template-columns: 200px 1fr 250px; gap: 20px; }
  .news-grid-4         { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .main-wrap           { padding: 20px 20px; }
  .cat-featured-img-tag { height: 200px; }
  .cf-title            { font-size: 16px; }
}

/* ============================================================
   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); gap: 14px; }
  .main-wrap           { padding: 16px 20px; }
  .body-ad-728x90      { display: none; }
  .cat-hero-inner      { padding: 28px 24px 24px; }
  .cat-featured-img-tag { height: 195px; }
  .cf-title            { font-size: 15px; }
}

/* ============================================================
   RESPONSIVE — TABLET PORTRAIT (≤ 768px)
   ============================================================ */
@media (max-width:768px) {
  .main-wrap           { padding: 14px 16px; }
  .cat-hero-inner      { padding: 24px 20px 20px; }
  .cat-hero-title      { font-size: 38px; letter-spacing: -1.2px; }
  /* Top Story — vertical on tablet too */
  .cat-featured        { flex-direction: column; border-radius: 10px; }
  .cat-featured-img-tag { height: 190px; }
  .cat-featured-body   { padding: 14px 16px 16px; }
  .cf-title            { font-size: 16px; -webkit-line-clamp: 3; }
  .art-item            { border-radius: 10px; }
  .news-grid-4         { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-left-sidebar    { display: none; }
  .cat-sidebar         { display: none; }
}

/* ============================================================
   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 14px 16px 18px; }
  .cat-hero-title       { font-size: 28px; letter-spacing: -0.8px; }
  .cat-hero-title-bar   { width: 40px; margin: 8px 0 10px; height: 3px; }
  .cat-hero-desc        { font-size: 13px; margin-bottom: 14px; line-height: 1.65; }
  .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: 20px; }
  .cat-hero-stat-label  { font-size: 8px; }

  /* Featured card — VERTICAL full-width on mobile */
  .cat-feat-badge-top   { font-size: 8.5px; padding: 4px 11px; letter-spacing: 1.5px; top: 10px; left: 10px; }
  .cat-featured         { flex-direction: column !important; border-radius: 12px; margin-bottom: 16px; overflow: hidden; }
  .cat-featured-img-tag { width: 100%; height: 200px; object-fit: cover; }
  .cat-featured-body    { padding: 14px 14px 16px !important; }
  .cf-cat               { font-size: 9px; margin-bottom: 6px; }
  .cf-title             { font-size: 15px !important; font-weight: 700; line-height: 1.45; -webkit-line-clamp: 3 !important; margin-bottom: 8px; }
  .cf-meta              { font-size: 11px; margin-top: 4px; }

  /* ── Article items — IMPROVED MOBILE CARD ── */
  .art-item {
    height: auto !important;
    max-height: none !important;
    min-height: 88px;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 0;
    overflow: visible !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    border: 1px solid #ebebeb;
    background: #fff;
  }
  .art-item:hover       { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,.07); }

  /* Image */
  .art-item-img {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    height: 100px !important;
    flex-shrink: 0;
    border-radius: 10px 0 0 10px;
    overflow: hidden;
  }

  /* Body — auto height, no overflow hidden */
  .art-item-body {
    height: auto !important;
    max-height: none !important;
    min-height: 88px;
    padding: 10px 12px 12px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    overflow: visible !important;
  }

  /* Category label */
  .ai-cat {
    font-size: 9px;
    letter-spacing: 1.4px;
    font-weight: 800;
    color: #c0392b;
  }

  /* Dot */
  .ai-dot { width: 3px; height: 3px; }

  /* Date */
  .ai-time { font-size: 10px; color: #999; }

  /* Title — visible, no overflow clipping */
  .ai-title {
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    white-space: normal !important;
    margin-top: 2px;
  }
  .art-item:hover .ai-title { color: #c0392b; }

  /* Bottom grid */
  .news-grid-4          { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .nc-title             { font-size: 13px; }
  .news-card            { border-radius: 10px; }
  .news-card-img        { height: 110px; }
  .news-card:hover      { transform: none; }
  .news-card-body       { padding: 10px 12px 12px; }

  /* Section head */
  .section-head         { margin: 20px 0 12px; }
  .section-head-title   { font-size: 9.5px; letter-spacing: 2.2px; }

  /* Ads */
  .body-ad-728x90       { display: none !important; }

  /* Pagination */
  .pagination           { gap: 5px; padding: 16px 0 6px; }
  .page-btn             { width: 34px; height: 34px; font-size: 12.5px; border-radius: 6px; }

  /* NL mini */
  .nl-mini              { padding: 16px 14px; border-radius: 8px; }
  .nl-mini h4           { font-size: 14px; }
  .nl-mini p            { font-size: 12px; }
  .nl-mini-btn          { font-size: 12px; padding: 10px; }

  /* Tag cloud */
  .tag-cloud-wrap       { padding: 12px; gap: 6px; }
  .tag-cloud-item       { font-size: 11px; padding: 4px 11px; }
}

/* ============================================================
   RESPONSIVE — VERY SMALL (≤ 400px)
   ============================================================ */
@media (max-width:400px) {
  .main-wrap            { padding: 8px 10px; }
  .cat-hero-title       { font-size: 22px; }
  .cat-hero-desc        { font-size: 12.5px; }
  /* Very small mobile — compact image */
  .cat-featured-img-tag { height: 170px !important; }
  .cf-title             { font-size: 14px !important; }
  .art-item-img         { width: 90px !important; min-width: 90px !important; height: 88px !important; }
  .ai-title             { font-size: 13px !important; }
  .news-grid-4          { grid-template-columns: 1fr; gap: 10px; }
  .news-card-img        { height: 160px; }
  .nc-title             { font-size: 14px; }
  .pagination           { gap: 4px; }
  .page-btn             { width: 30px; height: 30px; font-size: 12px; }
  .cat-feat-badge-top   { font-size: 8px; padding: 3px 9px; letter-spacing: 1.2px; }
}
