/* Shared site palette — locked in per design review.
   Primary: headings, links, nav/footer text.
   Accent: buttons, hover/active states, highlights.
   Background: page + chrome surface (header/nav/footer share the page bg,
   set off by a thin accent rule rather than a solid color band).
   Text: body copy. Muted: secondary/caption text. */
:root {
  --clr-primary: #1d425c;
  --clr-accent: #c87900;
  --clr-bg: #fff8ee;
  --clr-text: #2c2c2c;
  --clr-muted: #5a6a7a;
  --clr-highlight: #c0392b;
}

body {
  font-family: 'Noto Sans Telugu', 'Noto Sans', sans-serif;
}

/* Accessibility: skip-to-content link, visible only on keyboard focus */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--clr-primary);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 0 0 6px 0;
  text-decoration: none;
  font-weight: bold;
}
.skip-link:focus {
  left: 0;
}

/* Responsive video embeds (YouTube/etc.) — replaces fixed 560x315 iframes */
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding-bottom: 56.25%; /* 16:9, scaled from max-width */
  height: 0;
  margin: 0 auto 15px;
}
.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Section loading state shown briefly in #main while a page fragment fetches */
.section-loading {
  text-align: center;
  padding: 40px 0;
  color: var(--clr-muted);
  font-size: 16px;
}
.section-loading .spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #e2d9c8;
  border-top-color: var(--clr-primary);
  border-radius: 50%;
  animation: site-spin 0.8s linear infinite;
  margin-bottom: 8px;
}
@keyframes site-spin {
  to { transform: rotate(360deg); }
}

/* Accordion panels (guruparampara, sannivesham) reskinned to match palette */
.panel-group .panel-default {
  border-color: var(--clr-accent);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}
.panel-group .panel-default > .panel-heading {
  background-color: var(--clr-bg);
  border-color: var(--clr-accent);
}
.panel-group .panel-title > a {
  color: var(--clr-primary);
  font-weight: bold;
  text-decoration: none;
  display: block;
}
.panel-group .panel-title > a:hover,
.panel-group .panel-title > a:focus {
  color: var(--clr-accent);
  text-decoration: none;
}
.panel-group .panel-body {
  background-color: #fffdf8;
}

/* Guruparampara quick-navigation timeline */
.lineage-timeline {
  margin: 10px 0 24px;
  padding: 16px;
  border: 1px solid var(--clr-accent);
  border-radius: 6px;
  background: var(--clr-bg);
  text-align: left;
}
.lineage-timeline h4 {
  color: var(--clr-primary);
  margin-top: 0;
}
.lineage-timeline ol {
  list-style: none;
  margin: 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--clr-accent);
}
.lineage-timeline li {
  position: relative;
  padding: 4px 0 4px 16px;
}
.lineage-timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clr-accent);
}
.lineage-timeline a {
  color: var(--clr-primary);
  font-weight: bold;
  text-decoration: none;
}
.lineage-timeline a:hover,
.lineage-timeline a:focus {
  text-decoration: underline;
}

/* Homepage news carousel */
.news-carousel {
  max-width: 700px;
  margin: 16px auto 0;
}
.news-carousel .carousel-inner {
  border: 1px solid var(--clr-accent);
  border-radius: 6px;
  background: var(--clr-bg);
}
.news-carousel-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
}
.news-carousel-link:hover,
.news-carousel-link:focus {
  text-decoration: none;
  background: rgba(200,121,0,0.08);
}
.news-carousel-badge {
  flex: 0 0 auto;
  background: var(--clr-primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 12px;
}
.news-carousel-text {
  color: var(--clr-primary);
  font-weight: bold;
  font-size: 16px;
}
.news-carousel .carousel-indicators {
  bottom: -22px;
}
.news-carousel .carousel-indicators li {
  background-color: var(--clr-accent);
  opacity: 0.4;
}
.news-carousel .carousel-indicators .active {
  background-color: var(--clr-accent);
  opacity: 1;
}

/* Homepage hero */
.hero-banner {
  margin: 20px auto;
  max-width: 500px;
}
.hero-banner img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.btn-cta {
  display: inline-block;
  background-color: var(--clr-primary);
  color: #ffffff;
  font-weight: bold;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}
.btn-cta:hover,
.btn-cta:focus {
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 0 0 3px var(--clr-accent);
}
.audio-label {
  color: var(--clr-primary);
  font-weight: bold;
  margin-bottom: 6px;
}

/* Upapeta (branch list) state cards */
.state-card {
  border: 1px solid var(--clr-accent);
  border-radius: 6px;
  margin-bottom: 20px;
  overflow: hidden;
  text-align: left;
}
.state-card-header {
  background: var(--clr-bg);
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--clr-accent);
}
.state-card-header img {
  max-width: 220px;
  width: 100%;
  height: auto;
}
.state-card-header h4 {
  margin: 8px 0 0;
  color: var(--clr-primary);
  font-weight: bold;
}
.state-card-header .branch-count {
  display: block;
  font-size: 13px;
  font-weight: normal;
  color: var(--clr-muted);
  margin-top: 2px;
}
.state-card-branches {
  padding: 12px 12px 12px 32px;
  margin: 0;
}
.state-card-branches li {
  margin-bottom: 6px;
}
.state-card-branches a {
  color: var(--clr-primary);
}
@media (min-width: 768px) {
  .state-card {
    display: flex;
    align-items: stretch;
  }
  .state-card-header {
    flex: 0 0 240px;
    border-bottom: 0;
    border-right: 1px solid var(--clr-accent);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .state-card-branches {
    flex: 1;
    padding-top: 12px;
  }
}

/* Branch (upapeta) pages */
.branch-title {
  color: var(--clr-primary);
  margin: 0 0 12px;
}
.coming-soon {
  color: var(--clr-muted);
  font-style: italic;
}

/* Footer contact strip */
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-top: 6px;
  font-weight: normal;
  font-size: 13px;
}
.footer-contact a {
  color: var(--clr-primary);
  text-decoration: underline;
}
