/* ============================================================
   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-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)
   ============================================================ */
.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-lg); box-shadow: var(--shadow-sm);
  margin-bottom: 24px; cursor: pointer;
  transition: box-shadow .25s, transform .25s; text-decoration: none;
}
.cat-featured:hover { transform: translateY(-2px); }
.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: 8.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 4px; text-transform: uppercase;
  letter-spacing: 2px; z-index: 1; font-family: var(--font-ui);
  box-shadow: var(--shadow-red);
}
.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: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.8px; color: var(--red); margin-bottom: 5px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  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: 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: 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;
  height: 110px; max-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; 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;
  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: 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 */

.nl-mini {
  background: linear-gradient(145deg, #0a1628 0%, #0e1f3d 55%, #0c1a34 100%);
  border-radius: 14px;
  padding: 20px 18px;
  color: #fff;
  box-shadow: 0 8px 28px rgba(6,13,31,.4);
  border: 1px solid rgba(255,255,255,.08);
  position: relative;
  overflow: hidden;
}
.nl-mini::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #c0392b, #e74c3c 50%, transparent);
}
.nl-mini::after {
  content: '';
  position: absolute;
  top: -40px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(192,57,43,.1) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.nl-mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(192,57,43,.9);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  font-family: var(--font-ui);
  position: relative;
  width: fit-content;
  box-shadow: 0 3px 10px rgba(192,57,43,.3);
}
.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: 8px; padding: 11px; font-size: 11px; font-weight: 800;
  cursor: pointer; transition: background .2s, box-shadow .2s, transform .15s;
  font-family: var(--font-ui); letter-spacing: .7px; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(192,57,43,.4);
}
.nl-mini-btn:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(192,57,43,.55); }

.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; }
.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: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 (≤ 1024px)
   ============================================================ */
/* ============================================================
   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; }
}

/* ============================================================
   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; }
  .body-ad-320x100     { display: block; }
  .cat-hero-inner      { padding: 28px 24px 24px; }
}

/* ============================================================
   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; }
  .cat-featured        { border-radius: 10px; }
  .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 — stack vertically on mobile */
  .cat-featured         { flex-direction: column; height: auto; max-height: none; border-radius: 12px; margin-bottom: 12px; }
  .cat-featured-img     { width: 100%; min-width: 100%; max-width: 100%; height: 190px; border-radius: 12px 12px 0 0; }
  .cat-featured-body    { height: auto; max-height: none; padding: 14px 14px 16px; }
  .cf-title             { font-size: 16px; -webkit-line-clamp: 3; font-weight: 600; }
  .cf-meta              { font-size: 10.5px; }

  /* ── Article items — IMPROVED MOBILE CARD ── */
  .art-item {
    height: auto !important;
    max-height: none !important;
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 0;
    overflow: hidden;
    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 — taller and square-ish thumbnail */
  .art-item-img {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    height: 100px !important;
    flex-shrink: 0;
    border-radius: 0;
  }

  /* Body */
  .art-item-body {
    height: auto !important;
    max-height: none !important;
    padding: 10px 13px 12px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  /* 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 — Hindi friendly line height */
  .ai-title {
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    -webkit-line-clamp: 3 !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; }
  .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: 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; }
  .art-item-img         { width: 90px !important; min-width: 90px !important; height: 88px !important; }
  .ai-title             { font-size: 13px !important; }
  .cat-featured-img     { height: 160px; }
  .cf-title             { font-size: 15px; }
  .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; }
}
