/* ============================================
   CAREER VAHINI – BLOG STYLESHEET
   blog/blog-style.css
   ============================================ */

:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --dark: #1a1a2e;
  --dark-2: #16213e;
  --text: #2d3748;
  --text-light: #64748b;
  --border: #e2e8f0;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --success: #10b981;
  --article-max: 800px;
  --sidebar-w: 300px;
  --gap: 40px;
  --radius: 10px;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

/* ============================================
   BLOG HEADER / NAV OVERRIDES
   ============================================ */
.blog-page #main-header { position: sticky; top: 0; z-index: 999; }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-light);
  padding: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #cbd5e1; }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ============================================
   BLOG LAYOUT – ARTICLE + SIDEBAR
   ============================================ */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--gap);
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 24px 60px;
  align-items: start;
}

/* Article Main Column */
.article-main { min-width: 0; }

/* ============================================
   ARTICLE TYPOGRAPHY
   ============================================ */
.article-body { font-size: 1.05rem; line-height: 1.8; color: var(--text); }

.article-body h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 1.25;
  color: var(--dark);
  margin-bottom: 16px;
  font-weight: 800;
}

.article-body h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  margin: 42px 0 16px;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
  line-height: 1.3;
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-2);
  margin: 30px 0 12px;
  padding-left: 12px;
  border-left: 3px solid rgba(230,57,70,0.3);
  line-height: 1.35;
}

.article-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 22px 0 8px;
}

.article-body p { margin-bottom: 18px; }

.article-body ul, .article-body ol {
  margin: 0 0 18px 24px;
}
.article-body li { margin-bottom: 8px; }

.article-body strong { color: var(--dark); }

/* ============================================
   ARTICLE META (date, read time, tags)
   ============================================ */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 10px 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.article-meta i { margin-right: 4px; color: var(--primary); }

/* ============================================
   TAG PILLS
   ============================================ */
.tag-pill {
  display: inline-block;
  padding: 3px 12px;
  background: rgba(230,57,70,0.08);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(230,57,70,0.2);
  transition: background .2s;
}
.tag-pill:hover { background: rgba(230,57,70,0.18); color: var(--primary); }

/* ============================================
   TABLE STYLES – striped, bordered, responsive
   ============================================ */
.table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.article-body table,
.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.article-body table th,
.blog-table th {
  background: var(--dark);
  color: #fff;
  padding: 13px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.article-body table td,
.blog-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.article-body table tr:nth-child(even) td,
.blog-table tr:nth-child(even) td {
  background: #f8fafc;
}

.article-body table tr:hover td,
.blog-table tr:hover td {
  background: rgba(230,57,70,0.04);
}

/* ============================================
   BLOCKQUOTE
   ============================================ */
.article-body blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: #fff8f8;
  border-left: 5px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: #555;
  font-size: 1.05rem;
}

/* ============================================
   CTA STRIP – Main theme dark style
   ============================================ */
.cta-strip {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  color: #fff;
  padding: 36px 32px;
  border-radius: var(--radius);
  text-align: center;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.cta-strip::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,57,70,0.15) 0%, transparent 70%);
}
.cta-strip h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #fff;
  border: none;
  padding: 0;
}
.cta-strip p { margin-bottom: 20px; opacity: .9; font-size: 1rem; }
.cta-strip .btn-white {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: 0 4px 12px rgba(230,57,70,0.25);
  border: none;
}
.cta-strip .btn-white:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px rgba(230,57,70,0.4); 
  background: var(--primary-dark); 
  color: #fff; 
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-section { margin: 40px 0; }
.faq-section h2 { margin-bottom: 24px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.faq-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  background: #fff;
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark);
  user-select: none;
  gap: 12px;
  transition: background .15s;
}
.faq-question:hover { background: #fef2f2; }
.faq-question.active { background: #fef2f2; color: var(--primary); }

.faq-icon {
  width: 28px; height: 28px;
  min-width: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  transition: transform .3s;
}
.faq-question.active .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .25s ease;
  background: #fafafa;
  padding: 0 20px;
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text);
}
.faq-answer.open {
  max-height: 600px;
  padding: 16px 20px 20px;
}

/* ============================================
   AUTHOR BOX
   ============================================ */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 48px 0 32px;
}
.author-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.author-info h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--dark);
}
.author-info .author-role {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}
.author-info p { font-size: 0.88rem; color: var(--text-light); margin: 0; }

/* ============================================
   TABLE OF CONTENTS (TOC)
   ============================================ */
.toc-sidebar {
  position: sticky;
  top: 90px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-size: 0.88rem;
}
.toc-sidebar h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 14px;
}
.toc-sidebar ol {
  list-style: decimal;
  padding-left: 18px;
  margin: 0;
}
.toc-sidebar li { margin-bottom: 8px; line-height: 1.4; }
.toc-sidebar a {
  color: var(--text);
  font-weight: 500;
  transition: color .2s;
}
.toc-sidebar a:hover { color: var(--primary); }
.toc-sidebar a.active { color: var(--primary); font-weight: 700; }

/* Right sidebar (for article pages - counselling CTA etc) */
.blog-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.sidebar-widget h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.sidebar-cta-widget {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  color: #fff;
}
.sidebar-cta-widget h4 { color: #fff; border-color: var(--primary); }
.sidebar-cta-widget p { font-size: 0.88rem; color: rgba(255,255,255,0.75); margin-bottom: 16px; }

.sidebar-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 10px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s;
}
.sidebar-form input::placeholder { color: rgba(255,255,255,0.5); }
.sidebar-form input:focus { border-color: var(--primary); }
.sidebar-form .btn-red {
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background .2s, transform .2s;
}
.sidebar-form .btn-red:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Related articles widget */
.related-article-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.related-article-item:last-child { border: none; padding-bottom: 0; }
.related-article-item .ra-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  opacity: .3;
  min-width: 28px;
  line-height: 1.3;
}
.related-article-item a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.related-article-item a:hover { color: var(--primary); }

/* ============================================
   BLOG LISTING PAGE – HERO
   ============================================ */
.blog-hero {
  background: linear-gradient(135deg, var(--dark) 0%, #0f0f1e 100%);
  padding: 80px 24px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,57,70,0.15) 0%, transparent 70%);
}
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,57,70,0.10) 0%, transparent 70%);
}
.blog-hero > * { position: relative; z-index: 1; }
.blog-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}
.blog-hero h1 span { color: var(--primary); }
.blog-hero p { color: rgba(255,255,255,0.75); font-size: 1.1rem; max-width: 580px; margin: 0 auto 32px; }

.blog-search-wrap {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.blog-search-wrap input {
  flex: 1;
  padding: 14px 22px;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text);
}
.blog-search-wrap button {
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background .2s;
}
.blog-search-wrap button:hover { background: var(--primary-dark); }

/* ============================================
   CATEGORY FILTER TABS
   ============================================ */
.category-tabs {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 70px;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.category-tab {
  padding: 16px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.category-tab:hover { color: var(--primary); }
.category-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ============================================
   BLOG LISTING LAYOUT
   ============================================ */
.blog-listing-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

/* ============================================
   ARTICLE CARD
   ============================================ */
.article-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

.card-img-wrap {
  height: 180px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-img-wrap .card-icon {
  font-size: 3rem;
  opacity: .25;
  color: #fff;
}
.card-img-wrap .card-cat-badge {
  position: absolute;
  top: 14px; left: 14px;
}

.category-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-blue    { background: #eff6ff; color: #1d4ed8; }
.badge-green   { background: #f0fdf4; color: #16a34a; }
.badge-orange  { background: #fff7ed; color: #ea580c; }
.badge-purple  { background: #faf5ff; color: #7c3aed; }
.badge-red     { background: #fff1f2; color: var(--primary); }

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 10px 0 10px;
  color: var(--dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-light);
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.card-footer .read-more {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}
.card-footer .read-more:hover { gap: 8px; }

/* ============================================
   LISTING SIDEBAR
   ============================================ */
.listing-sidebar {
  position: sticky;
  top: 130px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-cta-card {
  background: linear-gradient(135deg, var(--dark) 0%, #0f0f1e 100%);
  border-radius: var(--radius);
  padding: 28px 22px;
  color: #fff;
  text-align: center;
}
.sidebar-cta-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.sidebar-cta-card p { font-size: 0.88rem; color: rgba(255,255,255,0.7); margin-bottom: 20px; }

.sidebar-cta-form input {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}
.sidebar-cta-form input::placeholder { color: rgba(255,255,255,0.45); }
.sidebar-cta-form button {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background .2s;
}
.sidebar-cta-form button:hover { background: var(--primary-dark); }

/* ============================================
   CHECKLIST STYLE
   ============================================ */
.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 0.97rem;
}
.checklist li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================
   HIGHLIGHT BOX
   ============================================ */
.highlight-box {
  background: linear-gradient(135deg, #fff8f8 0%, #fff 100%);
  border: 1px solid rgba(230,57,70,0.2);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.highlight-box h4 {
  color: var(--primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Key stat cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.stat-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.stat-card .num {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 6px;
}

/* ============================================
   RESPONSIVE – MOBILE
   ============================================ */
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar { position: static; }
  .toc-sidebar { position: static; }

  .blog-listing-wrap {
    grid-template-columns: 1fr;
  }
  .listing-sidebar { position: static; }
}

@media (max-width: 768px) {
  .blog-hero { padding: 60px 20px 50px; }
  .blog-layout { padding: 20px 16px 40px; gap: 24px; }

  .article-body h1 { font-size: 1.65rem; }
  .article-body h2 { font-size: 1.35rem; }
  .article-body h3 { font-size: 1.15rem; }

  .articles-grid { grid-template-columns: 1fr; }
  .category-tabs { justify-content: flex-start; gap: 0; }

  .stat-cards { grid-template-columns: repeat(2, 1fr); }

  .cta-strip { padding: 28px 20px; }
  .cta-strip h3 { font-size: 1.25rem; }

  .author-box { flex-direction: column; }

  .blog-listing-wrap { padding: 28px 16px; }
}

@media (max-width: 480px) {
  .articles-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}
