/* =====================================================
   DR. K. S. SASTRY PAGE
===================================================== */

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

.sastry-page .sastry-hero-img {
  aspect-ratio: 3 / 4;
  max-height: 390px;
  object-position: center top;
  width: min(100%, 285px);
}

.sastry-page .master-quote-panel {
  background: linear-gradient(135deg, rgba(66,111,168, 0.96), rgba(21, 62, 117, 0.94));
}

.sastry-page .service-panel h5,
.sastry-page .book-detail-panel h5 {
  color: #426FA8;
}

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

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

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

.sastry-page .sastry-intro-gallery .photo-panel:first-child img {
  object-position: center center;
}

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

.sastry-page .book-detail-covers {
  align-items: center;
  background: linear-gradient(145deg, #f4f7f5, #fff8eb);
  border-bottom: 1px solid #dbe4ea;
  border-radius: 6px 6px 0 0;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: -0.8rem -0.8rem 0.75rem;
  min-height: 250px;
  padding: 1rem;
}

.sastry-page .book-detail-covers.single-cover {
  grid-template-columns: 1fr;
}

.sastry-page .book-detail-covers.four-covers {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sastry-page .book-detail-covers img {
  height: 220px;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.sastry-page .book-detail-covers.four-covers img {
  height: 175px;
}

.sastry-page .book-detail-covers.other-books-cover img {
  height: 220px;
  object-fit: contain;
}

.sastry-page .sastry-books-grid .book-detail-panel {
  padding: 1rem;
}

.sastry-page .sastry-books-grid .book-detail-panel h5 {
  font-size: 1.05rem;
  line-height: 1.35;
}

.sastry-page .sastry-books-grid .book-detail-panel p {
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (min-width: 992px) {
  .sastry-page .book-detail-grid.sastry-books-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sastry-page .sastry-books-grid .book-detail-covers {
    min-height: 205px;
  }

  .sastry-page .sastry-books-grid .book-detail-covers img,
  .sastry-page .sastry-books-grid .book-detail-covers.other-books-cover img {
    height: 175px;
  }

  .sastry-page .sastry-books-grid .book-detail-covers.four-covers img {
    height: 130px;
  }
}

.sastry-page .honor-highlight-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sastry-page .honor-highlight-panel {
  background:
    linear-gradient(135deg, rgba(255, 244, 220, 0.98), rgba(255, 255, 255, 0.98));
  border: 1px solid #d9c48a;
  border-top: 4px solid #d97706;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(21, 62, 117, 0.09);
  min-height: 150px;
  padding: 0.8rem;
}

.sastry-page .honor-highlight-panel span {
  color: #d97706;
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.sastry-page .honor-highlight-panel h5 {
  color: #153e75;
  font-size: 0.98rem;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.sastry-page .honor-highlight-panel p {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.sastry-page .timeline-panel {
  border-right-color: #426FA8;
}

.sastry-page .timeline-panel strong {
  color: #153e75;
}

.sastry-page .legacy-panel {
  background: linear-gradient(135deg, rgba(66,111,168, 0.96), rgba(21, 62, 117, 0.92));
}

.sastry-page .legacy-panel blockquote {
  color: #fff4dc;
}

.sastry-page .village-service-photo {
  aspect-ratio: auto;
  max-height: 460px;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.sastry-page .photo-panel:not(.sastry-master-ek-photos):not(.homoeo-training-photo) > img {
  max-height: 420px;
  object-fit: contain;
  object-position: center;
}

/* Keep the paired Introduction photographs visually equal. */
.sastry-page #introduction .sastry-intro-gallery .photo-panel > img {
  aspect-ratio: auto;
  flex: 0 0 270px;
  height: 270px;
  max-height: 270px;
  min-height: 270px;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.sastry-page #introduction .sastry-intro-gallery .photo-panel.biography-family-photo > img {
  object-position: center top;
}

@media (min-width: 992px) {
  .sastry-page .biography-glance-layout .photo-panel.biography-family-photo {
    padding: 0;
  }

  .sastry-page .biography-glance-layout .photo-panel.biography-family-photo > img {
    height: 0;
    max-height: none;
    object-fit: cover;
    object-position: center center;
  }

  .sastry-page .biography-glance-layout .photo-panel.biography-family-photo > figcaption {
    margin-top: 0;
    padding: 10px 12px;
  }
}

.sastry-page .sastry-master-ek-photos {
  padding: 0.75rem;
}

.sastry-page .sastry-master-ek-photos img {
  aspect-ratio: 4 / 3;
  max-height: 320px;
  object-fit: cover;
  object-position: center top;
}

.sastry-page .sastry-two-photo-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sastry-page .homoeo-training-photo img {
  aspect-ratio: 16 / 9;
  max-height: none;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.sastry-page .sastry-training-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sastry-page .sastry-training-gallery .homoeo-training-photo {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
}

.sastry-page .teaching-awareness-row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.sastry-page .teaching-awareness-row .readable-panel,
.sastry-page .teaching-awareness-row .detail-list {
  flex: 1 1 auto;
}

.sastry-page .homoeo-training-photo {
  clear: both;
  margin-top: 1.5rem !important;
}

.sastry-page .sastry-collage {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sastry-page .sastry-collage:empty {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #e7f0fb);
  border-radius: 6px;
  color: #596b7a;
  display: flex;
  justify-content: center;
  min-height: 160px;
}

.sastry-page .sastry-collage:empty::before {
  content: "Homoeopathy service photos can be added as hd1.jpg through hd5.jpg.";
}

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

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

  .sastry-page .sastry-training-gallery {
    grid-template-columns: 1fr;
  }

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

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

  .sastry-page .book-detail-covers.four-covers img {
    height: 135px;
  }

  .sastry-page .sastry-hero-img {
    max-height: 310px;
    width: min(100%, 230px);
  }

  .sastry-page .honor-highlight-grid {
    grid-template-columns: 1fr;
  }

  .sastry-page .sastry-collage {
    grid-template-columns: 1fr 1fr;
  }

  .sastry-page .sastry-two-photo-grid {
    grid-template-columns: 1fr;
  }
}
