/* =============================================
   NAAMAKARAN BLOG — Shared Stylesheet
   Inherits design tokens from the main site
   ============================================= */

/* --- Design Tokens (mirrored from index.html) --- */
:root {
  --accent: #ff9933;
  --accent-dark: #cc5200;
  --accent-light: #fff5e6;
  --text-main: #3d0c02;
  --text-body: #4a2600;
  --text-muted: #777;
  --bg-gradient: linear-gradient(135deg, #fff5e6 0%, #ffcc00 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --border-soft: rgba(255, 153, 51, 0.15);
  --shadow-soft: 0 4px 16px rgba(255, 100, 0, 0.08);
  --shadow-hover: 0 8px 28px rgba(255, 100, 0, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --max-article: 820px;
  --max-page: 1100px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: 'Outfit', 'Noto Sans', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); transition: color 0.2s; }
a:hover { color: var(--accent); }

/* --- Top Navigation Bar --- */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.blog-nav .brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--accent-dark);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.blog-nav .brand span { color: var(--accent); }

.blog-nav .nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.blog-nav .nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 0;
  position: relative;
  transition: color 0.2s;
}

.blog-nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.blog-nav .nav-links a:hover { color: var(--accent-dark); }
.blog-nav .nav-links a:hover::after { width: 100%; }

/* --- Breadcrumbs --- */
.breadcrumbs {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 16px 24px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 6px; opacity: 0.5; }

/* --- Article Hero --- */
.article-hero {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 40px 24px 32px;
}

.article-hero .category-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #ff5e00);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.article-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.2;
  color: var(--text-main);
  margin: 0 0 16px;
  max-width: var(--max-article);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.article-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* --- Article Layout (Content + Sidebar) --- */
.article-layout {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  align-items: start;
}

.article-body {
  max-width: var(--max-article);
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}

/* --- Typography for Article Body --- */
.article-body p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-body);
  margin: 0 0 20px;
}

.article-body h2 {
  font-size: 24px;
  color: var(--accent-dark);
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-soft);
}

.article-body h3 {
  font-size: 19px;
  color: #5a1a00;
  margin: 28px 0 12px;
}

.article-body h4 {
  font-size: 16px;
  color: var(--accent-dark);
  margin: 20px 0 10px;
  font-weight: 700;
}

.article-body ul, .article-body ol {
  padding-left: 24px;
  margin: 12px 0 20px;
}

.article-body li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 8px;
}

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

/* --- Drop Caps --- */
.article-body > p:first-of-type::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: 0.85;
  font-weight: 800;
  margin: 4px 12px 0 0;
  color: var(--accent-dark);
}

/* --- Blockquotes & Pull Quotes --- */
.article-body blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 153, 51, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  font-size: 17px;
  line-height: 1.7;
  color: #5a1a00;
}

.pull-quote {
  text-align: center;
  padding: 32px;
  margin: 36px -10px;
  border-top: 2px solid var(--border-soft);
  border-bottom: 2px solid var(--border-soft);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--accent-dark);
  font-style: italic;
}

/* --- Info / Callout Boxes --- */
.callout-box {
  background: linear-gradient(135deg, #fff9f0, var(--accent-light));
  border: 1px solid rgba(255, 153, 51, 0.25);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 24px 0;
}

.callout-box .callout-title {
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-box p { margin: 0; font-size: 15px; }

.editorial-note {
  margin: 32px 0 0;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: #fff7ee;
  border: 1px solid rgba(255, 153, 51, 0.22);
}

.editorial-note h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: var(--accent-dark);
}

.editorial-note p {
  margin: 0 0 10px;
}

.editorial-note p:last-child {
  margin-bottom: 0;
}

/* --- Tables --- */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.article-body thead th {
  background: linear-gradient(135deg, var(--accent), #ff5e00);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 12px;
  padding: 12px 14px;
  text-align: left;
}

.article-body tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 153, 51, 0.1);
  color: var(--text-body);
}

.article-body tbody tr:nth-child(even) {
  background: rgba(255, 153, 51, 0.04);
}

.article-body tbody tr:hover {
  background: rgba(255, 153, 51, 0.1);
}

/* Responsive table scroll */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

.table-wrap table {
  margin: 0;
  min-width: 500px;
}

/* --- Sidebar --- */
.article-sidebar {
  position: sticky;
  top: 80px;
}

/* Table of Contents */
.toc-card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
}

.toc-card h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-dark);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-soft);
}

.toc-card ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.toc-card li {
  counter-increment: toc;
  margin-bottom: 8px;
}

.toc-card li a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  padding: 4px 0;
  transition: all 0.2s;
  line-height: 1.4;
}

.toc-card li a::before {
  content: counter(toc) ".";
  font-weight: 700;
  color: var(--accent);
  min-width: 18px;
}

.toc-card li a:hover {
  color: var(--accent-dark);
  transform: translateX(4px);
}

.toc-card li a.active {
  color: var(--accent-dark);
  font-weight: 700;
}

/* Sidebar CTA */
.sidebar-cta {
  background: linear-gradient(135deg, var(--accent), #ff5e00);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.sidebar-cta h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.sidebar-cta p {
  font-size: 13px;
  opacity: 0.9;
  margin: 0 0 16px;
  line-height: 1.5;
}

.sidebar-cta a {
  display: inline-block;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 800;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.sidebar-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* --- CTA Banner (Inline) --- */
.cta-banner {
  background: linear-gradient(135deg, #3d0c02, #6b1e04);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
  margin: 36px 0;
  text-align: center;
}

.cta-banner h3 {
  color: var(--accent);
  margin: 0 0 8px;
  font-size: 20px;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  margin: 0 0 18px;
  font-size: 15px;
}

.cta-banner .cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #ff5e00);
  color: #fff;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(255, 153, 51, 0.4);
  transition: all 0.25s;
}

.cta-banner .cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 153, 51, 0.5);
  color: #fff;
}

/* --- Related Articles Grid --- */
.related-articles {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 48px 24px;
}

.related-articles h2 {
  font-size: 24px;
  color: var(--accent-dark);
  margin: 0 0 24px;
  text-align: center;
}

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

.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s;
  text-decoration: none;
  display: block;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.related-card .rc-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 10px;
}

.related-card h3 {
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-main);
  margin: 0 0 8px;
}

.related-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* --- Blog Hub (blog.html) Specific --- */
.blog-hero {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 56px 24px 32px;
  text-align: center;
}

.blog-hero h1 {
  font-size: clamp(32px, 6vw, 48px);
  color: var(--text-main);
  margin: 0 0 12px;
}

.blog-hero p {
  font-size: 17px;
  color: var(--text-body);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.blog-section {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 0 24px 48px;
}

.blog-section h2 {
  font-size: 22px;
  color: var(--accent-dark);
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card .card-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff5e00);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.blog-card h3 {
  font-size: 17px;
  line-height: 1.4;
  color: var(--text-main);
  margin: 0 0 10px;
}

.blog-card .card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

.blog-card .card-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}

/* --- Site Footer (Blog Pages) --- */
.blog-footer {
  background: #3d0c02;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 28px 20px;
  font-size: 13px;
  line-height: 1.7;
}

.blog-footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 10px;
  font-weight: 600;
  transition: color 0.2s;
}

.blog-footer a:hover {
  color: #ffcc00;
  text-decoration: underline;
}

.blog-footer .footer-links { margin-bottom: 12px; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .article-body { padding: 28px 20px; }
}

@media (max-width: 600px) {
  .blog-nav { padding: 12px 16px; }
  .blog-nav .brand { font-size: 17px; }
  .blog-nav .nav-links { gap: 12px; }
  .blog-nav .nav-links a { font-size: 12px; }

  .article-hero { padding: 28px 16px 20px; }
  .article-hero h1 { font-size: 26px; }

  .article-layout { padding: 0 16px; }
  .article-body { padding: 20px 16px; }
  .article-body h2 { font-size: 20px; }

  .article-sidebar {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner { padding: 24px 16px; }
  .pull-quote { font-size: 18px; padding: 24px 16px; }
}

/* --- Smooth Scroll --- */
html { scroll-behavior: smooth; }

/* --- Print Styles --- */
@media print {
  .blog-nav, .article-sidebar, .cta-banner, .related-articles, .blog-footer { display: none; }
  .article-layout { grid-template-columns: 1fr; }
  .article-body { box-shadow: none; border: none; padding: 0; }
}
