/* =====================================================
   MASTER EK PAGE
===================================================== */

.master-ek-page {
  --master-border: #d8e4dc;
  --master-panel-bg: rgba(255, 255, 255, 0.96);
  --master-soft: #f5faf7;
  overflow-x: hidden;
}

.master-ek-panels {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0 0.5rem;
}

.master-panel {
  background: var(--master-panel-bg);
  border: 1px solid var(--master-border);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(21, 62, 117, 0.1);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.master-quote-panel {
  background: linear-gradient(135deg, rgba(21, 62, 117, 0.96), rgba(66,111,168, 0.92));
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(21, 62, 117, 0.12);
  color: #ffffff;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.master-quote-panel blockquote {
  color: #fff4dc;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.master-quote-panel p {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  margin-bottom: 0;
}

.page-section-nav {
  background: #ffffff;
  border: 1px solid rgba(21, 62, 117, 0.16);
  border-left: 5px solid #b46a18;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(21, 62, 117, 0.08);
  max-width: 100%;
  min-inline-size: 0;
  min-width: 0;
  padding: 0.35rem 1rem 0.9rem;
}

.page-section-nav-title {
  background: #ffffff;
  color: #153e75;
  float: none;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.35rem 0.15rem;
  padding: 0 0.55rem;
  width: auto;
}

.page-section-nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.4rem;
  scrollbar-width: thin;
}

.page-section-nav-links a {
  background: #eef4f8;
  border: 1px solid rgba(21, 62, 117, 0.12);
  border-radius: 999px;
  color: #153e75;
  font-size: 0.86rem;
  font-weight: 700;
  flex: 0 0 auto;
  padding: 0.38rem 0.72rem;
  text-decoration: none;
  white-space: nowrap;
}

.page-section-nav-links a:hover,
.page-section-nav-links a:focus-visible {
  background: #153e75;
  color: #ffffff;
}

.master-ek-page section[id] {
  scroll-margin-top: 1rem;
}

.cvv-lineage-panel {
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 226, 159, 0.3), transparent 28%),
    linear-gradient(145deg, #fffaf0 0%, #f4f8fc 52%, #eef7f2 100%);
  border-color: #d8bd77;
  border-top: 5px solid #153e75;
}

.cvv-lineage-panel .panel-lead {
  color: #6f2148;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
}

.cvv-lineage-intro {
  align-items: center;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  grid-template-columns: minmax(190px, 0.58fr) minmax(0, 1.5fr);
}

.cvv-lineage-gallery {
  display: grid;
  gap: 0.85rem;
  margin-inline: auto;
  max-width: 230px;
  width: 100%;
}

.master-ek-intro-gallery {
  align-items: stretch;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.master-ek-intro-gallery .photo-panel {
  display: flex;
  flex-direction: column;
  margin: 0;
  max-width: none;
}

.master-ek-intro-gallery .photo-panel img {
  aspect-ratio: 4 / 5;
  flex: 0 0 auto;
  height: 270px;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.master-ek-intro-gallery .biography-family-photo img {
  object-position: center top;
}

@media (min-width: 992px) {
  .master-ek-page .service-panel-grid.master-ek-service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .master-ek-intro-gallery {
    grid-template-columns: 1fr;
  }

  .master-ek-intro-gallery .photo-panel {
    margin-inline: auto;
    max-width: 320px;
    width: 100%;
  }
}

.cvv-primary-figure {
  background: #08162f;
  border: 1px solid rgba(222, 174, 77, 0.72);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(8, 22, 47, 0.2);
  margin: 0;
  overflow: hidden;
  padding: 0.75rem;
}

.cvv-primary-figure img {
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: contain;
  width: 100%;
}

.cvv-primary-figure figcaption {
  color: #fff1c9;
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 0.75rem 0.25rem 0.1rem;
  text-align: center;
}

.cvv-overview-link {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(21, 62, 117, 0.18);
  border-radius: 8px;
  color: #153e75;
  display: grid;
  font-size: 0.84rem;
  font-weight: 800;
  gap: 0.75rem;
  grid-template-columns: 74px 1fr;
  padding: 0.55rem;
  text-decoration: none;
}

.cvv-overview-link:hover,
.cvv-overview-link:focus-visible {
  border-color: #b46a18;
  color: #8a2f3e;
  transform: translateY(-1px);
}

.cvv-overview-link img {
  aspect-ratio: 3 / 4;
  border-radius: 5px;
  object-fit: cover;
  object-position: top;
  width: 74px;
}

.cvv-lineage-copy h3 {
  color: #153e75;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  margin-bottom: 0.9rem;
}

.cvv-lineage-copy p {
  color: #42586a;
  line-height: 1.75;
}

.cvv-core-note {
  background: linear-gradient(135deg, #153e75, #234F86);
  border-left: 5px solid #e0aa43;
  border-radius: 8px;
  color: #ffffff;
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
}

.cvv-core-note span {
  color: #ffe0a3;
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.cvv-core-note strong {
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.5;
}

.cvv-core-note p {
  color: rgba(255, 255, 255, 0.84);
  margin: 0.65rem 0 0;
}

.cvv-lineage-flow {
  align-items: stretch;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  margin-top: 1.5rem;
}

.cvv-lineage-flow article {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(21, 62, 117, 0.15);
  border-radius: 8px;
  padding: 1.05rem;
  text-align: center;
}

.cvv-lineage-flow article > span {
  align-items: center;
  background: #8a2f3e;
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  margin-bottom: 0.55rem;
  width: 30px;
}

.cvv-lineage-flow h3 {
  color: #153e75;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.cvv-lineage-flow p {
  color: #596b7a;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}

.cvv-lineage-arrow {
  align-self: center;
  color: #b46a18;
  font-size: 1.7rem;
  font-weight: 800;
}

.cvv-hierarchy-note {
  background: rgba(255, 255, 255, 0.76);
  border-left: 4px solid #234F86;
  border-radius: 8px;
  color: #42586a;
  line-height: 1.7;
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
}

.cvv-hierarchy-note strong {
  color: #153e75;
}

.cvv-source-note {
  color: #6a7680;
  font-size: 0.78rem;
  margin-top: 0.85rem;
  text-align: center;
}

.cvv-source-note a {
  color: #6f2148;
  font-weight: 700;
}

@media (max-width: 767.98px) {
  .cvv-lineage-intro {
    grid-template-columns: 1fr;
  }

  .cvv-lineage-gallery {
    margin-inline: auto;
    max-width: 360px;
    width: 100%;
  }

  .cvv-lineage-flow {
    grid-template-columns: 1fr;
  }

  .cvv-lineage-arrow {
    line-height: 1;
    transform: rotate(90deg);
    justify-self: center;
  }
}

.hahnemann-lineage-panel {
  background: linear-gradient(145deg, #fff9ed 0%, #f4f8f5 55%, #edf4fa 100%);
  border-color: #d8bd77;
  border-top: 5px solid #8a2f3e;
}

.hahnemann-lineage-panel .lineage-highlight {
  color: #6f2148;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.6;
  margin-inline: auto;
  max-width: 900px;
}

.lineage-concept-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lineage-concept-grid article {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(21, 62, 117, 0.14);
  border-left: 4px solid #b46a18;
  border-radius: 8px;
  padding: 1.15rem;
}

.lineage-concept-grid article:nth-child(2) { border-left-color: #8a2f3e; }
.lineage-concept-grid article:nth-child(3) { border-left-color: #234F86; }
.lineage-concept-grid article:nth-child(4) { border-left-color: #31598b; }

.lineage-concept-grid strong {
  color: #153e75;
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  margin-bottom: 0.45rem;
}

.lineage-concept-grid p {
  margin-bottom: 0;
}

.lineage-closing {
  background: #153e75;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 700;
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  text-align: center;
}

.lineage-closing a {
  color: #ffe0a3;
  display: inline-block;
  margin-left: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 767.98px) {
  .lineage-concept-grid {
    grid-template-columns: 1fr;
  }
}

.hahnemann-page .declaration-quote-panel {
  background: linear-gradient(135deg, #6f2148 0%, #9b3f42 55%, #c2762c 100%);
  border: 1px solid rgba(255, 220, 151, 0.5);
  box-shadow: 0 12px 30px rgba(111, 33, 72, 0.2);
}

.hahnemann-page .declaration-quote-panel .panel-kicker {
  color: #ffe0a3;
}

.hahnemann-page .declaration-quote-panel blockquote {
  color: #fffaf0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.5;
  margin-left: auto;
  margin-right: auto;
  max-width: 980px;
}

.hahnemann-page .declaration-quote-panel p {
  color: rgba(255, 247, 230, 0.9);
}

.hahnemann-page .hahnemann-principles-panel {
  background: linear-gradient(145deg, #fffaf0, #f2f8f5);
  border-color: #d8bd77;
}

.hahnemann-page .clinical-method-panel {
  background: linear-gradient(145deg, #f4f8fc, #f8fbf9);
  border-color: #b8ccdc;
}

.hahnemann-page .principle-latin {
  color: #8a2f3e;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.hahnemann-page .principle-meaning {
  color: #b46a18;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 700;
  margin-bottom: 1rem;
}

.law-of-similars-summary {
  background: #8a2f3e;
  border-radius: 8px;
  color: #fffaf0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
  padding: 1.25rem;
  text-align: center;
}

.law-of-similars-summary p {
  margin-bottom: 0;
}

.law-origin-grid,
.similars-core-grid {
  display: grid;
  gap: 1rem;
}

.law-origin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.similars-core-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.law-origin-grid article,
.similars-core-grid article {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(180, 106, 24, 0.25);
  border-radius: 8px;
  padding: 1.2rem;
}

.law-origin-grid h3,
.similars-core-grid h3 {
  color: #153e75;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.law-origin-grid p,
.similars-core-grid p {
  margin-bottom: 0;
}

.law-card-icon {
  align-items: center;
  background: #f9e8c9;
  border-radius: 50%;
  color: #8a2f3e;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  margin-bottom: 0.7rem;
  width: 42px;
}

.similars-core-grid article > strong {
  color: #b46a18;
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.principle-highlight-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.principle-highlight-card {
  background: #ffffff;
  border: 1px solid rgba(21, 62, 117, 0.15);
  border-left: 5px solid #b46a18;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(21, 62, 117, 0.08);
  padding: 1.25rem;
}

.principle-highlight-card:nth-child(2) { border-left-color: #8a2f3e; }
.principle-highlight-card:nth-child(3) { border-left-color: #234F86; }
.principle-highlight-card:nth-child(4) { border-left-color: #31598b; }

.principle-highlight-card .principle-number {
  color: #b46a18;
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 0.35rem;
}

.principle-highlight-card h3,
.error-principle-grid h3 {
  color: #153e75;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 700;
}

.principle-highlight-card p:last-child,
.principle-highlight-card ul {
  margin-bottom: 0;
}

.principle-highlight-card li + li {
  margin-top: 0.35rem;
}

.principle-emphasis {
  color: #8a2f3e;
  font-weight: 800;
}

.error-principle-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.error-principle-grid article {
  background: #ffffff;
  border: 1px solid rgba(180, 106, 24, 0.24);
  border-radius: 8px;
  padding: 1.2rem;
}

.error-principle-grid article > strong {
  color: #b46a18;
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.error-principle-grid p {
  margin-bottom: 0;
}

.lifestyle-guidance-panel {
  border-top: 4px solid #234F86;
}

.guidance-icon {
  align-items: center;
  background: #e6f2eb;
  border-radius: 50%;
  color: #234F86;
  display: inline-flex;
  font-size: 1.7rem;
  height: 64px;
  justify-content: center;
  margin-bottom: 0.8rem;
  width: 64px;
}

.hahnemann-photo-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
}

.hahnemann-photo-grid .photo-panel {
  background: #fffaf0;
  border-color: rgba(180, 106, 24, 0.28);
  overflow: hidden;
}

.hahnemann-photo-grid .photo-panel img {
  aspect-ratio: 4 / 5;
  display: block;
  height: auto;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.hahnemann-photo-grid picture {
  display: block;
}

.hahnemann-photo-grid .photo-panel figcaption {
  color: #5e482f;
}

.biography-family-photo {
  margin: 0;
  max-width: 520px;
}

.biography-family-photo img {
  display: block;
  height: auto;
  max-height: 620px;
  object-fit: contain;
  width: 100%;
}

.biography-glance-layout {
  align-items: stretch;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  margin: 0 0 28px;
}

.biography-glance-layout .biography-family-photo,
.biography-glance-layout .biography-glance-panel {
  height: 100%;
  max-width: none;
}

.biography-glance-layout .biography-family-photo img {
  height: auto;
  max-height: 680px;
  object-fit: contain;
}

.biography-glance-panel {
  margin: 0;
}

@media (min-width: 992px) {
  .sastry-page .biography-glance-layout .biography-family-photo {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .sastry-page .biography-glance-layout .biography-family-photo img {
    flex: 1 1 auto;
    height: 0;
    max-height: none;
    min-height: 0;
    object-fit: cover;
    object-position: center center;
  }

  .sastry-page .biography-glance-layout .biography-family-photo figcaption {
    flex: 0 0 auto;
  }
}

@media (max-width: 991.98px) {
  .biography-glance-layout {
    grid-template-columns: 1fr;
  }

  .biography-glance-layout .biography-family-photo {
    margin-left: auto;
    margin-right: auto;
    max-width: 520px;
  }
}

@media (max-width: 767.98px) {
  .principle-highlight-grid,
  .error-principle-grid,
  .hahnemann-photo-grid,
  .law-origin-grid,
  .similars-core-grid {
    grid-template-columns: 1fr;
  }

  .page-section-nav {
    padding-inline: 0.75rem;
  }

  .page-section-nav-links {
    margin-inline: -0.2rem;
    padding: 0.15rem 0.2rem 0.45rem;
  }
}

.master-hero-panel {
  background:
    linear-gradient(135deg, rgba(255, 244, 220, 0.96), rgba(232, 244, 238, 0.96)),
    url("../../images/thumbs/background1.webp");
  background-position: center;
  background-size: cover;
  border-color: #d9c48a;
}

.master-hero-panel h1 {
  color: #153e75;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.45rem;
}

.master-years {
  color: #d97706;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.master-lead,
.panel-lead {
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.75;
}

.master-lead {
  max-width: 680px;
  margin-bottom: 0;
}

.panel-lead {
  max-width: 880px;
}

.panel-kicker {
  align-items: center;
  color: #426FA8;
  display: inline-flex;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.panel-kicker::before {
  color: #d97706;
  content: "\f4c4";
  font-family: "Font Awesome 6 Free";
  font-size: 0.86rem;
  font-weight: 900;
}

.panel-kicker.icon-service::before {
  content: "\f4c4";
}

.panel-kicker.icon-education::before {
  content: "\f5da";
}

.panel-kicker.icon-healing::before {
  content: "\f0f1";
}

.panel-kicker.icon-growth::before {
  content: "\f4d8";
}

.panel-heading {
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
}

.master-panel-soft {
  background: linear-gradient(135deg, rgba(245, 250, 247, 0.98), rgba(231, 240, 251, 0.9));
}

.master-hero-img {
  aspect-ratio: 4 / 5;
  border: 6px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(21, 62, 117, 0.2);
  max-height: 360px;
  object-fit: cover;
  width: min(100%, 300px);
}

.image-panel {
  background: #ffffff;
  border: 1px solid #dbe6ef;
  border-radius: 8px;
  overflow: hidden;
  padding: 0.5rem;
}

.image-panel img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.photo-panel {
  background: #ffffff;
  border: 1px solid #dde8e1;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(21, 62, 117, 0.08);
  margin-bottom: 0;
  overflow: hidden;
  padding: 0.5rem;
}

.photo-panel img {
  border-radius: 6px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.photo-panel-wide img {
  aspect-ratio: 16 / 7;
}

.master-ek-page .photo-panel-wide:not(:has(.sastry-two-photo-grid)):not(:has(.sastry-collage)) img {
  max-height: 380px;
  object-fit: cover;
  object-position: center;
}

.master-ek-page .photo-panel-wide {
  margin-left: auto;
  margin-right: auto;
  max-width: 880px;
}

.photo-panel-wide img.pooja-photo-full {
  aspect-ratio: auto;
  max-height: 620px;
  object-fit: contain;
  object-position: center top;
}

.learning-page .learning-image-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  text-align: center;
}

.learning-page .learning-portrait-panel img {
  aspect-ratio: auto;
  max-height: 320px;
  object-fit: contain;
  object-position: center top;
  width: auto;
}

.learning-page .learning-medicine-panel img {
  aspect-ratio: 4 / 3;
  max-height: 300px;
  object-fit: contain;
  width: 100%;
}

.learning-page .learning-glance-list {
  columns: 2;
  column-gap: 2rem;
}

.learning-page .learning-tabs-panel {
  overflow: hidden;
  padding: 0;
}

.learning-page .learning-tabs-layout {
  display: grid;
  grid-template-columns: minmax(170px, 230px) 1fr;
  min-height: 520px;
}

.learning-page .learning-tab-list {
  align-content: start;
  background: #eef3f7;
  border-right: 1px solid #d6e1eb;
  display: grid;
}

.learning-page .learning-tab {
  background: #f7fafc;
  border: 0;
  border-bottom: 1px solid #d8e3ec;
  color: #536273;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  min-height: 78px;
  padding: 1rem 1.25rem;
  position: relative;
  text-align: left;
}

.learning-page .learning-tab:hover,
.learning-page .learning-tab:focus {
  background: #ffffff;
  color: var(--blue);
}

.learning-page .learning-tab.active {
  background: #1f2933;
  color: #ffffff;
}

.learning-page .learning-tab.active::after {
  border-bottom: 39px solid transparent;
  border-left: 30px solid #1f2933;
  border-top: 39px solid transparent;
  content: "";
  position: absolute;
  right: -30px;
  top: 0;
  z-index: 2;
}

.learning-page .learning-tab-content {
  background: #ffffff;
  padding: clamp(1.1rem, 3vw, 2rem);
}

.learning-page .learning-tab-pane-grid {
  align-items: center;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(180px, 320px) 1fr;
}

@media (max-width: 767.98px) {
  .learning-page .learning-tabs-layout {
    grid-template-columns: 1fr;
  }

  .learning-page .learning-tab-list {
    border-bottom: 1px solid #d6e1eb;
    border-right: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .learning-page .learning-tab {
    min-height: 56px;
    padding: 0.85rem 0.6rem;
    text-align: center;
  }

  .learning-page .learning-tab.active::after {
    display: none;
  }

  .learning-page .learning-tab-pane-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .learning-page .learning-tab-list {
    grid-template-columns: 1fr;
  }

  .learning-page .learning-tab {
    min-height: 42px;
    text-align: left;
  }

  .learning-page .learning-glance-list {
    columns: 1;
  }
}

.training-photo-stack {
  display: flex;
}

.training-photo-stack .photo-panel {
  width: 100%;
}

.training-photo-stack img {
  aspect-ratio: 4 / 3;
}

.homoeopathy-intro-grid {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
}

.homoeopathy-service-photo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.homoeopathy-service-photo img {
  aspect-ratio: 16 / 9;
  max-height: 330px;
  object-fit: cover;
  object-position: center;
}

.training-detail-list {
  box-shadow: none;
  padding: 0.85rem;
}

.training-detail-list h5 {
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
}

.training-detail-list ul {
  font-size: 0.92rem;
  line-height: 1.55;
}

.photo-panel figcaption {
  color: #596b7a;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-top: 0.55rem;
  text-align: center;
}

.info-panel-grid,
.service-panel-grid,
.book-panel-grid,
.timeline-grid,
.mastery-grid,
.fact-grid,
.purpose-grid,
.topic-grid,
.book-detail-grid {
  display: grid;
  gap: 1rem;
}

.info-panel-grid,
.service-panel-grid,
.book-panel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mastery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.purpose-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.topic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.book-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-panel,
.service-panel,
.book-panel,
.timeline-panel,
.mastery-panel,
.fact-panel,
.purpose-panel,
.topic-panel,
.book-detail-panel {
  background: #ffffff;
  border: 1px solid #dde8e1;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(21, 62, 117, 0.08);
  height: 100%;
  padding: 1rem;
}

.readable-panel,
.detail-list {
  background: #ffffff;
  border: 1px solid #dde8e1;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(21, 62, 117, 0.08);
  padding: 1rem;
}

.info-panel span {
  align-items: center;
  background: #e8f4ee;
  border-radius: 50%;
  color: #426FA8;
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  margin-bottom: 0.75rem;
  width: 34px;
}

.info-panel h5,
.service-panel h5,
.book-panel h5 {
  color: #153e75;
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.info-panel p,
.service-panel p,
.timeline-panel p {
  color: #596b7a;
  font-size: 0.94rem;
  line-height: 1.55;
  margin-bottom: 0;
}

.mastery-panel {
  align-items: center;
  color: #153e75;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 82px;
  text-align: center;
}

.timeline-panel {
  border-left: 0;
  border-right: 3px solid #426FA8;
  min-height: 132px;
  padding: 0.8rem;
  position: relative;
}

.timeline-panel::after {
  background: #d97706;
  bottom: 0.8rem;
  content: "";
  position: absolute;
  right: -3px;
  width: 3px;
  height: 28px;
}

.timeline-panel span {
  align-items: center;
  background: #e8f4ee;
  border-radius: 50%;
  color: #426FA8;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  margin-bottom: 0.8rem;
  width: 32px;
}

.timeline-panel strong {
  color: #153e75;
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.timeline-panel p {
  font-size: 0.86rem;
  line-height: 1.42;
}

.book-panel {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #fff4dc);
  display: flex;
  justify-content: center;
  min-height: 112px;
  text-align: center;
}

.book-panel h5 {
  margin-bottom: 0;
}

.fact-panel small {
  color: #596b7a;
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.fact-panel strong {
  color: #153e75;
  display: block;
  line-height: 1.35;
}

.purpose-panel,
.topic-panel {
  align-items: center;
  color: #153e75;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 68px;
  text-align: center;
}

.topic-panel {
  background: linear-gradient(135deg, #ffffff, #e7f0fb);
}

.readable-panel p {
  color: #334155;
  line-height: 1.75;
  margin-bottom: 0.8rem;
}

.readable-panel p:last-child {
  margin-bottom: 0;
}

.detail-list h5,
.book-detail-panel h5 {
  color: #153e75;
  margin-bottom: 0.75rem;
}

.detail-list ul {
  color: #334155;
  line-height: 1.7;
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.book-detail-panel {
  border-left: 5px solid #d97706;
}

.book-detail-panel p {
  color: #596b7a;
  line-height: 1.6;
  margin-bottom: 0;
}

.wtt-panel {
  background:
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(255, 244, 220, 0.96), rgba(255, 255, 255, 0.97));
  border-left: 5px solid #d97706;
}

.wtt-intro {
  align-items: center;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) 190px;
}

.wtt-intro-copy {
  max-width: 850px;
}

.wtt-logo-panel {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(21, 62, 117, 0.1);
  display: flex;
  justify-content: center;
  min-height: 150px;
  padding: 1rem;
}

.wtt-logo {
  height: auto;
  max-width: 126px;
  width: 100%;
}

.wtt-panel .purpose-grid {
  gap: 0.75rem;
}

.wtt-panel .purpose-panel {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 244, 238, 0.92));
  border: 1px solid rgba(66,111,168, 0.18);
  border-top: 4px solid #426FA8;
  box-shadow: 0 8px 18px rgba(21, 62, 117, 0.08);
  color: #153e75;
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  min-height: 96px;
  padding: 0.8rem 0.55rem;
}

.wtt-panel .purpose-panel i {
  align-items: center;
  background: #fff4dc;
  border-radius: 50%;
  color: #d97706;
  display: inline-flex;
  font-size: 1rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.wtt-panel .purpose-panel span {
  line-height: 1.25;
}

.wtt-closing-note {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 8px;
  color: #334155;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.65;
  padding: 0.9rem 1rem;
  text-align: center;
}

.legacy-panel {
  background: linear-gradient(135deg, rgba(21, 62, 117, 0.96), rgba(66,111,168, 0.9));
  color: #ffffff;
}

.legacy-panel h2 {
  color: #ffffff;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.legacy-panel p {
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.7;
  margin-left: auto;
  margin-right: auto;
  max-width: 820px;
}

.legacy-panel blockquote {
  color: #fff4dc;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-style: italic;
  font-weight: 700;
  margin: 1rem 0 0;
}

.legacy-image-panel {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  margin: 1rem auto 0;
  max-width: 360px;
  padding: 0.45rem;
}

.legacy-image-panel img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  display: block;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.legacy-image-panel figcaption {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 0.45rem;
}

.legacy-pillar-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.15rem auto 0;
  max-width: 900px;
}

.legacy-pillar-grid article {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.9rem;
}

.legacy-pillar-grid i {
  align-items: center;
  background: rgba(255, 244, 220, 0.16);
  border-radius: 50%;
  color: #fff4dc;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  margin-bottom: 0.55rem;
  width: 36px;
}

.legacy-pillar-grid h5 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.legacy-pillar-grid p,
.legacy-panel .legacy-soft-line {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.legacy-panel .legacy-soft-line {
  font-style: italic;
  margin-top: 1rem;
}

@media (max-width: 991.98px) {
  .info-panel-grid,
  .service-panel-grid,
  .book-panel-grid,
  .timeline-grid,
  .mastery-grid,
  .fact-grid,
  .purpose-grid,
  .topic-grid,
  .book-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wtt-intro {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .wtt-intro-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .wtt-logo-panel {
    margin-left: auto;
    margin-right: auto;
    max-width: 220px;
    min-height: 132px;
    width: 100%;
  }

  .homoeopathy-intro-grid {
    grid-template-columns: 1fr;
  }

  .legacy-pillar-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .master-ek-panels {
    gap: 1rem;
  }

  .master-panel,
  .master-quote-panel {
    padding: 1rem;
  }

  .info-panel-grid,
  .service-panel-grid,
  .book-panel-grid,
  .timeline-grid,
  .mastery-grid,
  .fact-grid,
  .purpose-grid,
  .topic-grid,
  .book-detail-grid {
    grid-template-columns: 1fr;
  }

  .master-hero-img {
    max-height: 300px;
    width: min(100%, 240px);
  }

  .photo-panel-wide img,
  .training-photo-stack img {
    aspect-ratio: 4 / 3;
  }
}

/* Compact mastery cards and single-row service milestones */
.mastery-grid {
  counter-reset: mastery-item;
  gap: 0.7rem;
}

.mastery-panel {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #f7fbf8);
  border-left: 3px solid #b46a18;
  counter-increment: mastery-item;
  gap: 0.65rem;
  justify-content: flex-start;
  min-height: 64px;
  padding: 0.7rem 0.8rem;
  text-align: left;
}

.mastery-panel::before {
  align-items: center;
  background: #eef6f1;
  border-radius: 50%;
  color: #234F86;
  content: counter(mastery-item, decimal-leading-zero);
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 0.7rem;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

@media (min-width: 992px) {
  .sastry-page .timeline-grid {
    gap: 0.65rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .sastry-page .timeline-panel {
    padding: 0.75rem;
  }

  .sastry-page .timeline-panel p {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .hahnemann-page .timeline-grid {
    gap: 0.55rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .hahnemann-page .timeline-panel {
    padding: 0.68rem;
  }

  .hahnemann-page .timeline-panel p {
    font-size: 0.78rem;
    line-height: 1.42;
  }
}

/* Learning center Hahnemann image polish 2026-07-09 */
.learning-page .learning-tab-pane-grid {
  align-items: center;
}

.learning-attribution {
  color: #8a2f3e;
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 800;
  margin: 0.8rem 0 0;
}

.learning-attribution-end {
  margin-top: 1.25rem;
  text-align: right;
}

.learning-definition-grid,
.learning-book-grid,
.learning-process-grid {
  display: grid;
  gap: 1rem;
}

.learning-definition-grid,
.learning-book-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.learning-process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.learning-concept-card,
.learning-book-grid article,
.learning-process-grid article {
  background: #ffffff;
  border: 1px solid rgba(21, 62, 117, 0.14);
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(21, 62, 117, 0.07);
  padding: 1.15rem;
}

.learning-concept-card h3,
.learning-book-grid h4,
.learning-process-grid h4,
.learning-law-panel h3 {
  color: #153e75;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.learning-concept-card p,
.learning-book-grid p,
.learning-process-grid p {
  margin-bottom: 0;
}

.learning-law-panel {
  background: linear-gradient(135deg, #6f2148, #9b3f42 58%, #c2762c);
  border-radius: 8px;
  color: #fffaf0;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  text-align: center;
}

.learning-law-panel .panel-kicker { color: #ffe0a3; }
.learning-law-panel h3 { color: #fffaf0; font-size: clamp(1.45rem, 3vw, 2rem); }
.learning-law-panel p:last-child { margin-bottom: 0; }
.learning-law-meaning { color: #ffe0a3; font-size: 1.08rem; font-weight: 800; }

.learning-book-icon {
  align-items: center;
  background: #eaf1f8;
  border-radius: 50%;
  color: #153e75;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  margin-bottom: 0.7rem;
  width: 44px;
}

.learning-process-panel,
.learning-similar-disease {
  background: #f5f9f7;
  border: 1px solid rgba(35,79,134, 0.2);
  border-radius: 8px;
  padding: clamp(1.15rem, 3vw, 1.7rem);
}

.learning-process-grid article > strong {
  color: #b46a18;
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.learning-principle-note {
  background: #153e75;
  border-radius: 8px;
  color: #ffffff;
  padding: 1.2rem;
}

.learning-principle-note strong { color: #ffe0a3; display: block; margin-bottom: 0.45rem; }
.learning-principle-note p { margin-bottom: 0; }

@media (max-width: 991.98px) {
  .learning-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .learning-definition-grid,
  .learning-book-grid,
  .learning-process-grid { grid-template-columns: 1fr; }
}

.learning-page .learning-image-panel {
  align-self: center;
  justify-self: center;
}

.learning-page .learning-portrait-panel {
  align-items: center;
  display: flex;
  justify-content: center;
  max-width: 300px;
  width: 100%;
}

.learning-page .learning-portrait-panel img {
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(21, 62, 117, 0.16);
  display: block;
  max-height: 340px;
  object-fit: cover;
  object-position: center;
  width: min(100%, 260px);
}
