/* Lord Ram detail pages: Brahma-reference layout adapter. */
body.ram-temple-detail-page .temple-section {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  scroll-margin-top: 120px;
}

body.ram-temple-detail-page .temple-section + .temple-section {
  margin-top: clamp(18px, 2.4vw, 28px) !important;
}

/* Keep the requested adjacent-section gap above shared detail-page resets. */
html body.ram-temple-detail-page .event.event-single.temple-detail-page > .container > .section__wrapper > .temple-section + .temple-section {
  margin-block-start: clamp(18px, 2.4vw, 28px) !important;
  margin-top: clamp(18px, 2.4vw, 28px) !important;
}

body.ram-temple-detail-page [data-layout-section="hero"] .ram-hero-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

body.ram-temple-detail-page [data-layout-section="hero"] :is(.temple-keyinfo-card .temple-info-row span, .temple-location-row span) {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  word-break: normal;
  overflow-wrap: normal;
}

body.ram-temple-detail-page [data-layout-section="hero"] :is(.temple-keyinfo-card .temple-info-row, .temple-location-row) {
  display: grid;
  grid-template-columns: minmax(112px, 132px) minmax(0, 1fr);
  align-items: start;
  gap: 8px 14px;
}

body.ram-temple-detail-page [data-layout-section="hero"] :is(.temple-keyinfo-card .temple-info-row strong, .temple-location-row strong) {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  text-align: left;
}

body.ram-temple-detail-page [data-layout-section="hero"] .temple-keyinfo-card .temple-info-row strong {
  justify-self: start;
}

body.ram-temple-detail-page [data-layout-section="hero"] .temple-live-strip {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

body.ram-temple-detail-page [data-layout-section="hero"] .temple-side-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

body.ram-temple-detail-page [data-layout-section="hero"] .temple-side-actions .temple-btn {
  width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: normal;
  text-align: center;
}

body.ram-temple-detail-page [data-layout-section="hero"] .temple-map-head {
  align-items: start;
  gap: 10px 12px;
  flex-wrap: wrap;
}

body.ram-temple-detail-page [data-layout-section="hero"] .temple-map-head > div {
  flex: 1 1 180px;
  min-width: 0;
}

body.ram-temple-detail-page [data-layout-section="hero"] .temple-map-link {
  flex: 0 0 auto;
  max-width: 100%;
  line-height: 1.35;
  white-space: normal;
}

.ram-temple-detail-page .brahma-surface {
  background: #fffdf8;
  border: 1px solid rgba(145, 97, 34, .18);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 40px);
  box-shadow: 0 12px 32px rgba(80, 49, 16, .06);
}

.ram-temple-detail-page .brahma-grid,
.ram-temple-detail-page .brahma-nearby-grid,
.ram-temple-detail-page .brahma-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ram-temple-detail-page .brahma-card,
.ram-temple-detail-page .brahma-mantra-card,
.ram-temple-detail-page .brahma-reach-card,
.ram-temple-detail-page .brahma-related-card {
  min-width: 0;
  height: 100%;
  padding: 22px;
  border: 1px solid rgba(145, 97, 34, .2);
  border-radius: 14px;
  background: #fff;
  overflow-wrap: anywhere;
}

.ram-temple-detail-page :is(.brahma-card, .brahma-mantra-card, .brahma-reach-card, .brahma-related-card) h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.ram-temple-detail-page .brahma-facts,
.ram-temple-detail-page .brahma-safety {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ram-temple-detail-page :is(.brahma-facts, .brahma-safety) li {
  display: grid;
  grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(145, 97, 34, .13);
}

.ram-temple-detail-page :is(.brahma-facts, .brahma-safety) li:last-child {
  border-bottom: 0;
}

.ram-temple-detail-page :is(.brahma-facts, .brahma-safety) strong {
  color: #6d4318;
}

.ram-temple-detail-page .brahma-mantra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.ram-temple-detail-page .brahma-mantra-text {
  margin: 14px 0;
  padding: 16px;
  border-left: 4px solid #b87a24;
  background: #fff8ea;
  color: #432b16;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ram-temple-detail-page .brahma-route {
  counter-reset: route;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ram-temple-detail-page .brahma-route li {
  counter-increment: route;
  position: relative;
  min-width: 0;
  padding: 22px 18px 18px 58px;
  border: 1px solid rgba(145, 97, 34, .2);
  border-radius: 14px;
  background: #fff;
}

.ram-temple-detail-page .brahma-route li::before {
  content: counter(route);
  position: absolute;
  top: 18px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #8a541c;
  color: #fff;
  font-weight: 700;
}

.ram-temple-detail-page .brahma-hub-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.ram-temple-detail-page .brahma-hub-grid .temple-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 58px;
  height: 100%;
  padding: 13px 18px;
  border: 2px solid #b87a24;
  border-radius: 10px;
  background: #fff9ed;
  color: #4b2e13;
  text-align: center;
  white-space: normal;
  line-height: 1.35;
}

.ram-temple-detail-page .brahma-hub-grid .temple-btn:is(:hover, :focus-visible) {
  background: #8a541c;
  color: #fff;
}

.ram-temple-detail-page .brahma-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 4px solid #b87a24;
  background: #fff8ea;
  color: #4d351f;
}

.ram-temple-detail-page .brahma-map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 700;
}

body.ram-temple-detail-page .temple-detail__process-timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.ram-temple-detail-page .temple-detail__process-timeline .temple-detail__timeline-step:nth-child(4n)::after {
  display: none;
}

@media (max-width: 1199.98px) {
  .ram-temple-detail-page :is(.brahma-grid, .brahma-nearby-grid, .brahma-reference-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ram-temple-detail-page .brahma-hub-grid,
  body.ram-temple-detail-page .temple-detail__process-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ram-temple-detail-page .temple-detail__process-timeline .temple-detail__timeline-step:nth-child(2n)::after {
    display: none;
  }
}

@media (max-width: 991.98px) {
  body.ram-temple-detail-page [data-layout-section="hero"] .temple-map-head > div {
    flex: 0 1 auto;
  }
}

@media (max-width: 767.98px) {
  body.ram-temple-detail-page .temple-section + .temple-section {
    margin-top: 22px !important;
  }

  html body.ram-temple-detail-page .event.event-single.temple-detail-page > .container > .section__wrapper > .temple-section + .temple-section {
    margin-block-start: 22px !important;
    margin-top: 22px !important;
  }

  .ram-temple-detail-page :is(.brahma-grid, .brahma-nearby-grid, .brahma-reference-grid, .brahma-mantra-grid, .brahma-route, .brahma-hub-grid),
  body.ram-temple-detail-page .temple-detail__process-timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  body.ram-temple-detail-page .temple-detail__process-timeline .temple-detail__timeline-step::after {
    display: none;
  }

  .ram-temple-detail-page :is(.brahma-facts, .brahma-safety) li,
  body.ram-temple-detail-page [data-layout-section="hero"] :is(.temple-keyinfo-card .temple-info-row, .temple-location-row) {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .ram-temple-detail-page .temple-page-jumpnav {
    overflow-x: auto;
  }
}
