/* Amrut Blog Style – July 2025 + GitHub Extension (English Main) */

/* ✅ Base Post Container */
.amrut-post-container {
  font-size: 18px;
  line-height: 1.85;
  font-family: 'Segoe UI', sans-serif;
  color: #2a2a2a;
  padding: 0 4px;
}




/* Headings */
.amrut-post-container h1 {
  text-align: left;
  color: #0b5394;
  text-decoration: underline;
  margin: 24px 0 28px;
  padding: 0;
  line-height: 1.5;
}
.amrut-post-container h2 {
  font-size: 22px;
  color: #1c1c1c;
  margin: 28px 0 14px;
  font-weight: bold;
}

/* Lists */
.amrut-post-container ul,
.amrut-post-container ol { margin-left: 20px; margin-bottom: 20px; }
.amrut-post-container ul li,
.amrut-post-container ol li { margin-bottom: 10px; }

/* Tables */
.amrut-post-container table {
  margin: 20px 0;
  border: 1px solid #ddd;
  width: 100%;
  font-family: Arial, sans-serif;
  font-size: 16px;
  border-collapse: collapse;
}
.amrut-post-container table th,
.amrut-post-container table td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: left;
}
.amrut-post-container table th {
  background: #f6f8fa;
  font-weight: 600;
}

/* Blockquotes */
.amrut-post-container blockquote {
  background-color: #f0f8ff;
  border-left: 4px solid #007acc;
  margin: 20px 0;
  padding: 14px 20px;
  font-style: italic;
  color: #003366;
}

/* GitHub-style Code */
.amrut-post-container pre,
.amrut-post-container code {
  font-family: 'Courier New', monospace;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 4px 6px;
}
.amrut-post-container pre {
  padding: 12px;
  overflow-x: auto;
}

/* GitHub-style Links */
.amrut-post-container a {
  color: #0969da;
  text-decoration: none;
}
.amrut-post-container a:hover {
  color: #0550ae;
  text-decoration: underline;
}

/* Table of Contents */
.toc-wrap {
  background: #f7fbff;
  border: 1px solid #d7eafe;
  padding: 16px 18px;
  border-radius: 8px;
  margin: 18px 0 26px;
}
.toc-wrap .toc-title { font-weight: 700; margin-bottom: 8px; }
.toc-wrap a { text-decoration: none; color: #0b5394; }

/* Author Disclaimer */
.author-disclaimer {
  background: #e8f5e9;
  border-left: 5px solid #388e3c;
  padding: 14px 18px;
  margin: 25px 0;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.7;
  color: #2a2a2a;
}

/* TL;DR Block */
.tldr {
  background: #e8f4ff;
  border-left: 5px solid #2196f3;
  padding: 16px 20px;
  margin: 18px 0 22px;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1.7;
}

/* Impact Section */
.impact p { margin: 10px 0; }
.impact ul { margin: 6px 0 14px 1.25em; }
.impact ul li { margin: 8px 0; }
.impact ul ul { margin-left: 1.15em; list-style: circle; }
.impact .example {
  background: #fafcff;
  border-left: 4px solid #7aa7ff;
  padding: 10px 12px;
  margin: 8px 0 16px;
  border-radius: 6px;
}
.impact .math { font-family: Consolas, Monaco, monospace; white-space: pre-wrap; margin-left: 1.25em; }
.impact .label { display: block; font-weight: 700; margin: 12px 0 6px; }

/* Indented Sections */
.amrut-post-container .indent-2 { padding-left: 2em !important; }
.amrut-post-container .indent-2 p,
.amrut-post-container .indent-2 ul,
.amrut-post-container .indent-2 ol,
.amrut-post-container .indent-2 blockquote,
.amrut-post-container .indent-2 .example,
.amrut-post-container .indent-2 .math { margin-left: 0 !important; }

/* Chalk Blackboard Block */
.chalk-board {
  background: #111;
  color: #fff !important;
  border: 14px solid #8B4513;
  border-radius: 8px;
  padding: 16px 18px;
  margin: 18px 0;
  box-shadow: inset 0 0 6px rgba(255,255,255,0.05), 0 0 6px rgba(0,0,0,0.5);
  position: relative;
  font-family: 'Courier New', monospace;
}
.chalk-board:before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(255,255,255,0.04), transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(255,255,255,0.03), transparent 65%);
  pointer-events: none;
}
.chalk-title {
  font-weight: 900; font-size: 20px; text-align: center; margin-bottom: 12px;
  color: #fff !important; text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 0 4px rgba(255,255,255,0.25);
  border-bottom: 1px dashed rgba(255,255,255,0.25); padding-bottom: 6px;
}
.chalk-table, .chalk-table th, .chalk-table td {
  color: #fff !important; border: 1px dashed rgba(255,255,255,0.4); padding: 8px;
}
.chalk-header-strip {
  background: rgba(255,255,255,0.1); padding: 8px 12px; text-align: center;
  font-weight: 700; font-size: 16px; color: #fff !important; text-shadow: 0 0 3px rgba(255,255,255,0.4);
  border-bottom: 1px dashed rgba(255,255,255,0.4); margin-bottom: 12px;
}

/* Hero Image */
.hero-figure { margin: 16px 0; text-align: center; }
.hero-figure img {
  max-width: 100%; height: auto; display: block; margin: 0 auto;
  border: 1px solid #3d85c6; border-radius: 6px;
}
.hero-figure figcaption {
  background: #fff9e6; color: #0b5394; border: 1px solid #f4b400;
  border-radius: 6px; padding: 8px; font-size: 14px;
}

/* Featured 2-Up */
.amrut-post-container .featured-2up { margin: 32px 4px; }
.featured-2up-title { font-size: 20px; margin-bottom: 14px; color: #0b5394; font-family: 'Segoe UI', sans-serif; }
.featured-2up-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px){ .featured-2up-grid { grid-template-columns: 1fr; } }
.featured-card {
  display: block; background: #fff; border: 2px solid #ddd; border-radius: 8px;
  padding: 10px; text-decoration: none; transition: box-shadow .2s, transform .2s;
}
.featured-card:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.07); transform: translateY(-2px); }
.featured-card:focus-visible { outline: 2px solid #0b5394; outline-offset: 3px; }
.featured-card figure { margin: 0; display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start; }
.featured-card img {
  width: 120px; height: 120px; object-fit: cover;
  border: 1px solid #3d85c6; border-radius: 6px; display: block;
}
.featured-card figcaption { font-family: 'Segoe UI', sans-serif; font-weight: 600; color: #1c1c1c; line-height: 1.3; }
.featured-card .desc { font-weight: normal; font-size: 14px; color: #555; margin-top: 4px; }

/* Note text */
.note { font-size:13px; color:#555; margin-top:8px; }

/* CTA Box */
.cta-box {
  background:#fff3cd; border-left:6px solid #ff9800; padding:20px; margin:30px 0;
  border-radius:8px; font-size:18px; line-height:1.7; font-family:'Segoe UI', sans-serif;
}

/* Universal image safety */
.amrut-post-container img { max-width:100%; height:auto; }

/* Motion preference */
@media (prefers-reduced-motion: reduce){
  .featured-card{ transition:none; }
  .featured-card:hover{ transform:none; }
}

/* ===============================
   Flow Chart / Timeline Steps
   =============================== */
.amrut-post-container .flow-steps{
  counter-reset: step;
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
}
.amrut-post-container .flow-steps li{
  counter-increment: step;
  position: relative;
  background: #f7fbff;
  border: 1px solid #d7eafe;
  border-radius: 10px;
  padding: 16px 18px 16px 58px;
  margin: 0;
}
.amrut-post-container .flow-steps li + li{ margin-top: 14px; }

/* Number circle */
.amrut-post-container .flow-steps li::before{
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #0b5394; /* Amrut blue */
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  line-height: 1;
}

/* Connector line between cards */
.amrut-post-container .flow-steps li:not(:last-child)::after{
  content: "";
  position: absolute;
  left: 31.5px; /* centers under number circle */
  top: calc(50% + 20px);
  height: 22px; width: 2px;
  background: #d7eafe;
}

/* Title + Description inside each node */
.amrut-post-container .flow-title{
  font-weight: 700; color: #0b5394; margin-bottom: 6px;
}
.amrut-post-container .flow-desc{ margin: 0; color: #2a2a2a; }

           /* ===============================
   Table of Contents (Upgraded)
   =============================== */
.toc-wrap {
  background: #eaf4ff;               /* light blue bg */
  border-left: 6px solid #0b5394;    /* dark blue strip */
  padding: 18px 20px;
  border-radius: 6px;
  margin: 22px 0 28px;
  font-family: 'Segoe UI', sans-serif;
}
.toc-wrap .toc-title {
  font-weight: 700;
  font-size: 18px;
  color: #0b5394;
  margin-bottom: 10px;
}
.toc-wrap ol {
  margin: 0;
  padding-left: 20px;
}
.toc-wrap a {
  color: #0b5394;
  text-decoration: none;
}
.toc-wrap a:hover {
  color: #c62828; /* hover red for contrast */
  text-decoration: underline;
} 

/* ================================================
   Start: Related Topics Slider – Scoped to #related1
   Compatible with existing HTML in your post
   ================================================ */

#related1.related-slider{
  /* Theme tokens (override per-instance if needed) */
  --lwa-accent: #0b5394;
  --lwa-accent-hover: #064579;
  --lwa-border: #ddd;
  --lwa-text: #444;
  --lwa-shadow: 0 2px 6px rgba(0,0,0,.15);

  position: relative;
  max-width: 600px;
  margin: 20px auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--lwa-border);
  border-radius: 10px;
}

#related1 .related-track{
  display: flex;
  transition: transform .5s ease-in-out;
  will-change: transform;
}

#related1 .related-card{
  min-width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 14px;
}

#related1 .related-card a{
  display: block;
  color: inherit;
  text-decoration: none;
}

#related1 .related-card img{
  width: 120px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin: 0 auto;
  display: block;
}

#related1 .related-card h3{
  font-size: 17px;
  margin: 8px 0 4px;
  color: var(--lwa-accent);
  line-height: 1.25;
}

#related1 .related-card p{
  font-size: 14px;
  color: var(--lwa-text);
  line-height: 1.5;
  margin: 6px auto 0;
  max-width: 80%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Navigation buttons */
#related1 .related-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: var(--lwa-accent);
  color: #fff;
  font-size: 16px;
  box-shadow: var(--lwa-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

#related1 .related-btn:hover{ background: var(--lwa-accent-hover); }
#related1 .related-prev{ left: 10px; }
#related1 .related-next{ right: 10px; }
#related1 .related-btn:focus{ outline: 2px solid #99c; outline-offset: 2px; }

/* Reduced-motion preference */
@media (prefers-reduced-motion: reduce){
  #related1 .related-track{ transition: none; }
}

/* Dark mode polish */
@media (prefers-color-scheme: dark){
  #related1.related-slider{
    background: #0f1115;
    border-color: #333;
  }
  #related1 .related-card p{ color: #c8c8c8; }
  #related1 .related-card img{ border-color: #444; }
}

/* Small screens */
@media (max-width: 480px){
  #related1 .related-card img{ width: 110px; height: 100px; }
  #related1 .related-card h3{ font-size: 16px; }
  #related1 .related-card p{
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
}

/* ================================================
   End: Related Topics Slider – Scoped to #related1
   ================================================ */
/* ==========================
   Action Bar
========================== */
.amrut-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 24px 0 8px;
  background: #fff;
  padding: 8px 12px;
  border-top: 1px solid var(--lwa-line);
  border-bottom: 1px solid var(--lwa-line);
}

/* ==========================
   Comment Button (Gold CTA)
========================== */
.amrut-gold-btn {
  background: var(--lwa-gold);
  color: #111;
  border: 0;
  border-radius: 9999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  transition: filter 0.2s ease, transform 0.1s ease;
}
.amrut-gold-btn:hover {
  filter: brightness(1.07);
}
.amrut-gold-btn:active {
  transform: translateY(1px);
}

/* ==========================
   Language Switcher
========================== */
.lang-switch {
  text-align: right;
  margin: 15px 0;
  position: relative;
  font-family: Arial, sans-serif;
}

.lang-toggle {
  background: #0b5394;
  color: #fff;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: bold;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lang-toggle:hover {
  background: #09427a; /* Darker shade for hover */
}

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  z-index: 999;
  width: 250px;
}

.lang-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lang-btn:hover {
  background: #e8e8e8;
}

.lang-note {
  font-size: 12px;
  color: #555;
  margin-top: 8px;
}

.visually-hidden{
  position:absolute !important;
  left:-9999px !important;
  top:auto !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}

 /* Small variant for action buttons */
.amrut-gold-btn.small {
  padding: 6px 12px;
  font-size: 13px;
}

/* Smaller toggle for language */
.lang-toggle.small {
  padding: 6px 12px;
  font-size: 13px;
}

/* Inline language switch so it sits in the flex row */
.lang-switch.inline {
  margin: 0; /* remove the top margin */
}

  
  
  /* 1) Open state: show the menu when JS adds .is-open on wrapper */
.lang-switch.is-open .lang-menu { display: block; }

/* 2) Keyboard focus rings (a11y) */
.lang-toggle:focus,
.lang-btn:focus { outline: 2px solid #0b5394; outline-offset: 2px; }

/* 3) Make sure the dropdown sits above other widgets */
.lang-menu { z-index: 2147483647; } /* was 999; bump to be safe over iframes */

/* 4) Mobile nicety: center the control on narrow screens */
@media (max-width: 480px){
  .lang-switch { text-align: center; }
}

/* 5) Optional: prevent brand/UI from being translated */
.notranslate, .skip-translate { translate: none; } /* class to apply on elements you don’t want GT to touch */

  /* Blue variant for Comment */
.amrut-blue-btn {
  background: #0b5394;   /* same as language */
  color: #fff;
  border: 0;
  border-radius: 9999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: filter 0.2s ease, transform 0.1s ease;
}
.amrut-blue-btn:hover {
  filter: brightness(1.1);
}
.amrut-blue-btn:active {
  transform: translateY(1px);
}

/* Small variant */
.amrut-blue-btn.small,
.lang-toggle.small {
  padding: 6px 12px;
  font-size: 13px;
}


/* ================================================
   Indic Fonts Patch – Kannada & Marathi (Devanagari)
   Purpose: Keep English on Segoe/UI (GitHub-like),
            auto-switch only Indic glyphs to Noto Sans
   Placement: Append AFTER your existing CSS
   Author: You (Amrut) – August 2025
   ================================================ */

/* 0) Token: keep current English/system stack the same */
:root{
  --amrut-latin-stack: -apple-system, BlinkMacSystemFont, "Segoe UI",
                       Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  /* Script-specific families (loaded via <head>) */
  --amrut-devanagari: "Noto Sans Devanagari"; /* Marathi/Hindi/etc */
  --amrut-kannada: "Noto Sans Kannada";       /* Kannada */
}

/* 1) Unify font-family at the container level.
      English stays on Segoe/system; Indic picks Noto automatically. */
.amrut-post-container{
  font-family: var(--amrut-latin-stack),
               var(--amrut-devanagari),
               var(--amrut-kannada),
               sans-serif;
  /* Better shaping/smoothing, esp. for Indic scripts */
  font-feature-settings: "liga" 1, "clig" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 2) Ensure elements that previously force 'Segoe UI' now inherit.
      (Prevents pockets that ignore our unified stack.) */
.amrut-post-container h1,
.amrut-post-container h2,
.amrut-post-container .featured-2up-title,
.amrut-post-container figcaption,
.amrut-post-container .featured-card figcaption{
  font-family: inherit;
}

/* 3) Optional language-aware helpers.
      If you set lang="mr" or lang="kn" on blocks, these force Noto. */
.amrut-post-container :lang(mr),
.amrut-post-container .mr{ /* Marathi (Devanagari) */
  font-family: var(--amrut-devanagari), var(--amrut-latin-stack), sans-serif;
}
.amrut-post-container :lang(kn),
.amrut-post-container .kn{ /* Kannada */
  font-family: var(--amrut-kannada), var(--amrut-latin-stack), sans-serif;
}

/* 4) Keep GitHub-like monospace intact for code (no visual change). */
.amrut-post-container pre,
.amrut-post-container code,
.amrut-post-container kbd,
.amrut-post-container samp{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace !important;
}


