/* ==========================================================================
   AVV Institutions — public site theme
   Design tokens mirror the reference build (oklch palette, Montserrat/Poppins).
   ========================================================================== */

:root {
  --primary:            oklch(37.1% 0.153 265);
  --primary-deep:       oklch(27% 0.12 265);
  --primary-soft:       oklch(93% 0.035 262);
  --primary-foreground: oklch(99% 0.005 250);

  --gold:            oklch(73.5% 0.146 82);
  --gold-soft:       oklch(95% 0.05 88);
  --gold-foreground: oklch(24% 0.06 80);

  --accent:            oklch(95% 0.05 88);
  --accent-foreground: oklch(32% 0.09 80);

  --background:      oklch(100% 0 0);
  --foreground:      oklch(22% 0.03 264);
  --surface:         oklch(97.5% 0.004 250);
  --muted:           oklch(97.2% 0.005 250);
  --muted-foreground: oklch(52% 0.03 258);
  --border:          oklch(91.8% 0.012 255);
  --secondary:       oklch(96.8% 0.006 250);

  --gradient-royal: linear-gradient(135deg, oklch(27% 0.12 265), oklch(44% 0.17 264));
  --gradient-gold:  linear-gradient(135deg, oklch(73.5% 0.146 82), oklch(84.5% 0.13 92));

  --shadow-soft: 0 4px 20px -6px oklch(37.1% 0.153 265 / 0.18);
  --shadow-card: 0 12px 40px -18px oklch(37.1% 0.153 265 / 0.35);
  --shadow-gold: 0 10px 30px -12px oklch(73.5% 0.146 82 / 0.5);

  --radius: 0.625rem;
  --font-display: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Poppins", ui-sans-serif, system-ui, sans-serif;
  --font-telugu: "Noto Sans Telugu", "Poppins", sans-serif;

  --container: 1200px;
  --header-h: 132px;

  /* Branding tokens — overridden per-site from the admin Branding tab.
     Defaults below keep the design intact if a value is ever missing. */
  --red:               #c4241c;
  --heading:           var(--primary-deep);
  --header-bg:         #ffffff;
  --header-fg:         var(--foreground);
  --header-link-hover: var(--primary);
  --nav-accent:        var(--gold);
  --topbar-bg:         var(--primary-deep);
  --topbar-fg:         #ffffff;
  --btn-primary-bg:    var(--primary);
  --btn-primary-fg:    #ffffff;
  --btn-cta-bg:        var(--gold);
  --btn-cta-fg:        var(--gold-foreground);
  --link:              var(--primary);
  --link-hover:        var(--primary-deep);
  --footer-bg:         var(--primary-deep);
  --footer-heading:    var(--gold);
  --footer-fg:         rgb(255 255 255 / 0.76);
  --footer-link-hover: var(--gold);
}

/* Fallback for browsers without oklch support. */
@supports not (color: oklch(50% 0.1 250)) {
  :root {
    --primary: #2b3a80;
    --primary-deep: #1e2a63;
    --primary-soft: #dfe4f7;
    --gold: #d8a13a;
    --gold-soft: #fbf3e2;
    --accent: #fbf3e2;
    --accent-foreground: #6b4b12;
    --foreground: #22262f;
    --surface: #f7f8fa;
    --muted: #f5f6f9;
    --muted-foreground: #6d7385;
    --border: #e4e7ef;
    --secondary: #f4f5f9;
    --gradient-royal: linear-gradient(135deg, #1e2a63, #3d51ad);
    --gradient-gold: linear-gradient(135deg, #d8a13a, #eec25e);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--heading);
}

h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.75rem); }
h2 { font-size: clamp(1.65rem, 1.1rem + 2.1vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); }
h4 { font-size: 1.125rem; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.te { font-family: var(--font-telugu); }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- layout primitives ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding: clamp(18px, 2.3vw, 36px) 0; }
.section--tight { padding: clamp(12px, 1.5vw, 24px) 0; }
.section--surface { background: var(--surface); }
.section--soft { background: var(--primary-soft); }
.section--royal { background: var(--gradient-royal); color: #fff; }
.section--royal h2, .section--royal h3 { color: #fff; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-foreground);
  background: var(--gold-soft);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}

.eyebrow--plain { background: none; padding: 0; color: var(--gold); }
.section--royal .eyebrow { background: rgb(255 255 255 / 0.14); color: var(--gold); }

.section-head { max-width: 760px; margin-bottom: clamp(16px, 1.9vw, 26px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted-foreground); font-size: 1.05rem; margin: 0; }

.lead { font-size: 1.075rem; color: var(--muted-foreground); }

.grid { display: grid; gap: clamp(14px, 1.7vw, 22px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  padding: 13px 26px;
  border-radius: calc(var(--radius) - 2px);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--gold { background: var(--btn-cta-bg); color: var(--btn-cta-fg); box-shadow: var(--shadow-gold); }
.btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); box-shadow: var(--shadow-soft); }
.btn--gold:hover,
.btn--primary:hover { filter: brightness(0.96); }
.btn--outline { border-color: var(--border); background: #fff; color: var(--primary); }
.btn--outline:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn--ghost-light { border-color: rgb(255 255 255 / 0.55); color: #fff; background: rgb(255 255 255 / 0.08); backdrop-filter: blur(6px); }
.btn--ghost-light:hover { background: rgb(255 255 255 / 0.2); }
.btn--sm { padding: 9px 18px; font-size: 0.85rem; }
.btn--block { width: 100%; }

/* ---------- top bar + header ---------- */

.topbar {
  background: var(--topbar-bg);
  color: var(--topbar-fg);
  font-size: 0.8rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 40px;
  flex-wrap: wrap;
}

.topbar a { display: inline-flex; align-items: center; gap: 7px; }
.topbar a:hover { color: var(--gold); }
.topbar__group { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar .icon { width: 15px; height: 15px; color: var(--gold); }

.announce {
  background: var(--gradient-gold);
  color: var(--gold-foreground);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 8px 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--header-bg) 96%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

/* Older browsers without color-mix keep a solid header. */
@supports not (background: color-mix(in srgb, white, black)) {
  .site-header { background: var(--header-bg); }
}

.site-header.is-stuck { box-shadow: var(--shadow-soft); }

/* Single row: brand on the left, navigation inline beside it, button on the right. */
.header__bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
}

.brand { display: flex; flex-direction: column; gap: 3px; flex: none; }
.brand__row { display: flex; align-items: center; gap: 12px; }
.brand__text { display: flex; flex-direction: column; gap: 1px; }
.brand__logo {
  width: 60px; height: 60px;
  border-radius: 6px;
  object-fit: contain;
  background: transparent;
  flex: none;
  /* Crisp rendering for the detailed crest at small sizes. */
  image-rendering: -webkit-optimize-contrast;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.12;
  color: var(--heading);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand__tag {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  color: var(--gold-foreground);
  text-transform: uppercase;
  line-height: 1.3;
}
/* Tagline sitting under the whole lockup rather than under the name alone. */
.brand__tag--wide { padding-left: 2px; }

.header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  color: var(--primary);
}

/* main navigation — inline, sharing the header row with the brand */

.nav { flex: 1; min-width: 0; display: flex; justify-content: center; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav__item { position: relative; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 10px 11px;
  border-radius: 8px;
  color: var(--header-fg);
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.nav__link:hover,
.nav__item:focus-within > .nav__link,
.nav__link.is-active {
  color: var(--header-link-hover);
  border-bottom-color: var(--nav-accent);
}

.nav__link .icon { width: 14px; height: 14px; transition: transform 0.18s ease; }
.nav__item:hover .nav__link .icon { transform: rotate(180deg); }

.nav__drop {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 330px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 8px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 70;
}

.nav__item:hover > .nav__drop,
.nav__item:focus-within > .nav__drop { opacity: 1; visibility: visible; transform: translateY(0); }

.nav__drop a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  transition: background 0.16s ease;
}
.nav__drop a:hover { background: var(--primary-soft); }
.nav__drop .icon { width: 20px; height: 20px; color: var(--gold); margin-top: 2px; }
.nav__drop strong { display: block; font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; color: var(--primary-deep); }
.nav__drop span { display: block; font-size: 0.78rem; color: var(--muted-foreground); line-height: 1.45; }

/* ---------- hero ---------- */

.hero { position: relative; min-height: clamp(300px, 62vh, 460px); display: grid; }

.hero__slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.hero__slide.is-active { opacity: 1; pointer-events: auto; }

.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, oklch(20% 0.09 265 / 0.92) 0%, oklch(24% 0.11 265 / 0.78) 45%, oklch(30% 0.12 265 / 0.5) 100%);
}

.hero__inner { position: relative; z-index: 2; padding: clamp(26px, 4vw, 56px) 0; max-width: 780px; }
.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgb(255 255 255 / 0.28);
  background: rgb(255 255 255 / 0.1);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 22px;
}
.hero h1 { color: #fff; margin-bottom: 18px; text-shadow: 0 2px 24px rgb(0 0 0 / 0.28); }
.hero__sub { color: rgb(255 255 255 / 0.9); font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem); max-width: 620px; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__dots {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 10px;
  z-index: 3;
}
.hero__dot {
  width: 34px; height: 4px;
  border: 0; padding: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.35);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.hero__dot.is-active { background: var(--gold); width: 52px; }

/* page hero (interior pages) */

.page-hero { position: relative; padding: clamp(38px, 4.4vw, 64px) 0; color: #fff; overflow: hidden; }
.page-hero__bg { position: absolute; inset: 0; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.page-hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, oklch(21% 0.1 265 / 0.94), oklch(28% 0.12 265 / 0.8));
}
.page-hero__inner { position: relative; z-index: 2; max-width: 820px; }
.page-hero h1 { color: #fff; margin-bottom: 14px; }
.page-hero p { color: rgb(255 255 255 / 0.88); font-size: 1.06rem; max-width: 700px; }
.crumb {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 16px;
}
.page-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ---------- stats ---------- */

.stats { background: var(--gradient-royal); color: #fff; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  padding: clamp(30px, 3.5vw, 48px) 0;
}
.stat { text-align: center; padding: 12px 10px; position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 1px; background: rgb(255 255 255 / 0.18);
}
.stat__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.75rem);
  line-height: 1;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.78);
  margin-top: 10px;
}

/* ---------- split blocks ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vw, 46px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__body p { color: var(--muted-foreground); }
.split__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 26px; }

.media-frame { position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow-card); }
.media-frame img { width: 100%; aspect-ratio: 4 / 3; }
.media-frame--portrait img { aspect-ratio: 3 / 4; }

.badge-float {
  position: absolute;
  right: -14px; bottom: -14px;
  background: var(--gradient-gold);
  color: var(--gold-foreground);
  border-radius: var(--radius);
  padding: 16px 22px;
  text-align: center;
  box-shadow: var(--shadow-gold);
}
.badge-float strong { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; line-height: 1; }
.badge-float span { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

.phone-link { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--link); }
.phone-link:hover { color: var(--link-hover); }
.phone-link .icon { color: var(--gold); }

/* ---------- cards ---------- */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: var(--primary-soft); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--muted); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__kicker { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-foreground); }
.card__title { font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; color: var(--primary-deep); margin: 0; }
.card__text { color: var(--muted-foreground); font-size: 0.94rem; margin: 0; }
.card__foot { margin-top: auto; padding-top: 8px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.88rem;
  color: var(--link);
}
.link-arrow:hover { color: var(--link-hover); }
.link-arrow .icon { width: 16px; height: 16px; transition: transform 0.2s ease; }
.link-arrow:hover .icon { transform: translateX(4px); }

/* feature tiles */

.tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--gold); }
.tile__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--gold-foreground);
  margin-bottom: 16px;
}
.tile__icon .icon { width: 22px; height: 22px; }
.tile h3 { font-size: 1.02rem; margin: 0 0 7px; }
.tile p { font-size: 0.9rem; color: var(--muted-foreground); margin: 0; }

.tile--numbered { display: flex; gap: 18px; align-items: flex-start; }
.tile__num {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gradient-royal);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
}

/* ---------- timeline ---------- */

.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(180deg, var(--gold), var(--primary-soft));
}
.timeline__item { position: relative; padding-bottom: 26px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -30px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gold);
}
.timeline__item--highlight::before { background: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.timeline__year {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  color: var(--primary); line-height: 1.2;
}
.timeline__title { color: var(--muted-foreground); font-size: 0.96rem; }

.timeline--columns { columns: 2; column-gap: 48px; padding-left: 0; }
.timeline--columns::before { display: none; }
.timeline--columns .timeline__item {
  break-inside: avoid;
  padding-left: 30px;
  border-left: 2px solid var(--primary-soft);
  margin-bottom: 4px;
}
.timeline--columns .timeline__item::before { left: -7px; }

/* ---------- gallery ---------- */

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.gallery-cell {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 4 / 3; background: var(--muted); cursor: zoom-in;
}
.gallery-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-cell:hover img { transform: scale(1.08); }
.gallery-cell figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, transparent, oklch(20% 0.08 265 / 0.85));
  color: #fff; font-size: 0.82rem;
  opacity: 0; transition: opacity 0.25s ease;
}
.gallery-cell:hover figcaption { opacity: 1; }

/* video cells in the gallery */
.gallery-cell--video { cursor: pointer; }
.gallery-cell--video a { display: block; width: 100%; height: 100%; }
.gallery-cell__vph { display: grid; place-items: center; width: 100%; height: 100%; background: var(--primary-deep); color: #fff; }
.gallery-cell__vph .icon { width: 46px; height: 46px; }
.gallery-cell__play {
  position: absolute; inset: 0; margin: auto;
  width: 58px; height: 58px; display: grid; place-items: center;
  color: #fff; background: rgb(0 0 0 / 0.45); border-radius: 50%;
  pointer-events: none; transition: transform 0.2s ease, background 0.2s ease;
}
.gallery-cell--video:hover .gallery-cell__play { transform: scale(1.08); background: var(--primary); }
.gallery-cell__play .icon { width: 30px; height: 30px; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: oklch(15% 0.04 265 / 0.92);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 86vh; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.lightbox__close {
  position: absolute; top: 20px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.3);
  background: rgb(255 255 255 / 0.12); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}

/* ---------- testimonials ---------- */

.quote-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow-soft);
}
.quote-card blockquote { margin: 0; font-size: 1rem; color: var(--foreground); line-height: 1.75; }
.quote-card__who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.quote-card__name { font-family: var(--font-display); font-weight: 700; color: var(--primary-deep); font-size: 0.95rem; }
.quote-card__role { font-size: 0.8rem; color: var(--muted-foreground); }
.stars { display: flex; gap: 2px; color: var(--gold); }
.stars .icon { width: 15px; height: 15px; fill: currentColor; }

/* ---------- accordion (FAQ) ---------- */

.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.accordion__item + .accordion__item { border-top: 1px solid var(--border); }
.accordion__btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  color: var(--primary-deep); text-align: left;
  transition: background 0.16s ease;
}
.accordion__btn:hover { background: var(--surface); }
.accordion__btn .icon { color: var(--gold); transition: transform 0.24s ease; }
.accordion__btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.accordion__panel { display: none; padding: 0 22px 20px; color: var(--muted-foreground); font-size: 0.96rem; }
.accordion__btn[aria-expanded="true"] + .accordion__panel { display: block; }

/* ---------- lists ---------- */

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.check-list li { display: flex; align-items: flex-start; gap: 11px; color: var(--muted-foreground); font-size: 0.96rem; }
.check-list .icon { width: 19px; height: 19px; color: var(--gold); margin-top: 3px; flex: none; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.05em;
  padding: 6px 13px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
}
.pill--gold { background: var(--gold-soft); color: var(--gold-foreground); }

.glance {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.glance h3 { font-size: 1.05rem; margin-bottom: 14px; }

/* ---------- forms ---------- */

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-card);
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem; font-weight: 600;
  color: var(--primary-deep);
  margin-bottom: 7px;
}
.field .req { color: #c53030; }
.input, .select, .textarea {
  width: 100%;
  font: inherit; font-size: 0.95rem;
  color: var(--foreground);
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.textarea { min-height: 120px; resize: vertical; }
.field__error { color: #c53030; font-size: 0.82rem; margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border-radius: var(--radius);
  padding: 13px 17px;
  font-size: 0.92rem;
  margin-bottom: 18px;
  border: 1px solid transparent;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert--success { background: oklch(96% 0.05 150); border-color: oklch(80% 0.12 150); color: oklch(35% 0.11 150); }
.alert--error { background: oklch(96% 0.04 25); border-color: oklch(80% 0.13 25); color: oklch(43% 0.17 25); }
.alert--info { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-deep); }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  background: var(--gradient-royal);
  color: #fff;
  text-align: center;
  overflow: hidden;
  border-block: 1px solid rgb(255 255 255 / 0.08);
}
/* Soft gold glow for a more premium, less flat CTA. */
.cta-band::before {
  content: "";
  position: absolute;
  inset: -40% 30% auto 30%;
  height: 340px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--gold) 55%, transparent), transparent 70%);
  opacity: 0.28;
  pointer-events: none;
}
.cta-band > .container { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); }
.cta-band p { color: rgb(255 255 255 / 0.86); max-width: 720px; margin-inline: auto; font-size: 1.05rem; }
.cta-band .btn { margin-top: 24px; }

/* ---------- footer ---------- */

.site-footer { background: var(--footer-bg); color: var(--footer-fg); font-size: 0.92rem; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: clamp(24px, 3vw, 48px);
  padding: clamp(44px, 5vw, 68px) 0 36px;
}
.footer__brand { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.footer__brand img { width: 52px; height: 52px; border-radius: 11px; object-fit: contain; background: transparent; }
.footer__brand strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: #fff; }
.footer__brand span { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--footer-heading); }
.footer h4 {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--footer-heading); margin-bottom: 16px;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__list a:hover { color: var(--footer-link-hover); }
.footer__contact { display: grid; gap: 11px; }
.footer__contact li { display: flex; align-items: flex-start; gap: 10px; list-style: none; }
.footer__contact .icon { width: 17px; height: 17px; color: var(--footer-heading); margin-top: 3px; flex: none; }
.footer__contact ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.footer__bottom {
  border-top: 1px solid rgb(255 255 255 / 0.12);
  padding: 18px 0 26px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px 18px; flex-wrap: wrap;
  font-size: 0.85rem;
}
.footer__motto { color: var(--footer-heading); font-family: var(--font-telugu); flex: 1; text-align: center; }
.footer__credit { color: rgb(255 255 255 / 0.6); font-size: 0.82rem; margin-left: auto; }
.footer__credit a {
  color: var(--footer-heading);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.16s ease;
}
.footer__credit a:hover { border-bottom-color: var(--footer-link-hover); }

@media (max-width: 760px) {
  .footer__bottom { flex-direction: column; text-align: center; }
  .footer__motto, .footer__credit { margin-left: 0; text-align: center; }
}

/* floating quick-contact buttons (WhatsApp + call), stacked bottom-right */
.floaties {
  position: fixed; right: 20px; bottom: 22px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px;
}
.float-btn {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.float-btn:hover { transform: scale(1.08); }
.float-btn .icon { width: 26px; height: 26px; }
.float-btn--wa   { background: #25d366; box-shadow: 0 8px 24px rgb(37 211 102 / 0.42); }
.float-btn--call { background: var(--primary); box-shadow: 0 8px 24px rgb(0 0 0 / 0.28); }

/* legacy single-button class, kept for safety */
.wa-float {
  position: fixed; right: 20px; bottom: 22px; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  box-shadow: 0 8px 24px rgb(37 211 102 / 0.42);
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float .icon { width: 27px; height: 27px; }

/* footer social row */
.footer__social { display: flex; gap: 10px; margin-top: 16px; }
.footer__social a {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--footer-heading);
  border: 1px solid rgb(255 255 255 / 0.16);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.footer__social a:hover {
  background: var(--footer-heading);
  color: var(--footer-bg);
  border-color: var(--footer-heading);
  transform: translateY(-2px);
}
.footer__social .icon { width: 19px; height: 19px; }

/* ---------- embeds (Google Forms / maps / video) ---------- */
.embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Forms are tall and portrait — let them grow instead of cropping. */
.embed-frame:has(iframe[src*="docs.google.com/forms"]),
.embed-frame:has(iframe[src*="forms.gle"]) { aspect-ratio: auto; height: clamp(640px, 90vh, 1400px); }

/* ---------- notifications & updates ---------- */
.updates { display: grid; gap: 14px; max-width: 960px; margin-inline: auto; }
.update-item {
  display: grid;
  grid-template-columns: 116px 1fr auto;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-soft);
}
.update-item__tag {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.update-item__body h3 { font-size: 1.05rem; margin: 0 0 4px; }
.update-item__body h3 a { color: inherit; transition: color 0.15s ease; }
.update-item__body h3 a:hover { color: var(--primary); }
.update-item__links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.update-item__body p { margin: 0 0 6px; color: var(--muted-foreground); font-size: 0.92rem; }
.update-item__date { font-size: 0.78rem; color: var(--muted-foreground); white-space: nowrap; }
.update-pin { color: var(--gold); }
.update-pin .icon { width: 15px; height: 15px; }
.update-item--urgent { border-left-color: var(--red); }
.update-item--urgent .update-item__tag { color: var(--red); }
.update-item--event { border-left-color: var(--gold); }
.update-item--event .update-item__tag { color: var(--gold-foreground); }
@media (max-width: 640px) {
  .update-item { grid-template-columns: 1fr; gap: 6px; }
  .update-item__date { order: -1; }
}

/* ---------- content tables (page builder) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
.content-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: #fff; }
.content-table th, .content-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.content-table thead th { background: var(--primary); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em; }
.content-table tbody tr:nth-child(even) { background: var(--surface); }
.content-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- post photo gallery ---------- */

.post-gallery { margin: 34px 0 8px; }
.post-gallery__title { font-size: 1.15rem; margin: 0 0 14px; }
.post-gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.post-gallery__item { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); aspect-ratio: 4 / 3; }
.post-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.post-gallery__item:hover img { transform: scale(1.05); }
@media (max-width: 560px) {
  .post-gallery__grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
}

/* ---------- post video ---------- */

.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 26px 0; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- justified, full-width article body ---------- */

.article-justify, .prose.article-justify { max-width: none; width: 100%; }
.article-justify, .article-justify p, .article-justify li { text-align: justify; text-justify: inter-word; }

/* ---------- fully clickable cards ---------- */

.card--link { position: relative; }
.card--link:hover { border-color: var(--primary); box-shadow: var(--shadow-md, 0 10px 30px rgba(0,0,0,.08)); }
.card__link-overlay { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card--link .card__body, .card--link .card__media { position: relative; }
.card--link .card__foot, .card--link .card__foot a { position: relative; z-index: 2; }
.card__video-flag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600;
  background: rgba(0,0,0,.68); color: #fff;
}
.card__video-flag .icon { width: 14px; height: 14px; }

/* ---------- contact: per-institution email + phone ---------- */

.branch-contacts { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.branch { padding-top: 12px; border-top: 1px solid var(--border); }
.branch__name { font-family: var(--font-display); font-size: .74rem; font-weight: 600; letter-spacing: .08em; color: var(--muted-foreground); margin-bottom: 6px; }
.branch__lines { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.branch__item { display: inline-flex; align-items: center; gap: 8px; color: var(--foreground); font-size: .92rem; }
.branch__item:hover { color: var(--primary); }
.branch__item .icon { width: 16px; height: 16px; color: var(--primary); flex: none; }
.admission-block { margin-top: 22px; }
.admission-block .branch:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 480px) {
  .branch__lines { flex-direction: column; gap: 6px; }
}

/* ---------- misc ---------- */

.prose { max-width: 78ch; }
.prose p { color: var(--muted-foreground); }
.prose h3 { margin-top: 1.6em; font-size: 1.25rem; }
.prose ul, .prose ol { color: var(--muted-foreground); padding-left: 1.25em; }
.prose li { margin-bottom: 0.5em; }
.prose strong { color: var(--foreground); }

.note-band {
  background: var(--gold-soft);
  border: 1px solid oklch(88% 0.08 88);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--gold-foreground);
}

.error-page { text-align: center; padding: clamp(70px, 10vw, 140px) 0; }
.error-page .code { font-family: var(--font-display); font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; color: var(--primary-soft); line-height: 1; }

/* ---------- entrance animations (driven by the Animations settings tab) ---------- */

:root {
  --anim-duration: 600ms;
  --anim-distance: 22px;
}

/* No animation at all unless the document opts in. */
.reveal { opacity: 1; transform: none; }

[data-anim="1"] .reveal {
  opacity: 0;
  transition: opacity var(--anim-duration) ease, transform var(--anim-duration) ease;
  will-change: opacity, transform;
}
[data-anim="1"] .reveal.is-visible { opacity: 1; transform: none; }

[data-anim="1"][data-anim-style="fade-up"]     .reveal { transform: translateY(var(--anim-distance)); }
[data-anim="1"][data-anim-style="fade"]        .reveal { transform: none; }
[data-anim="1"][data-anim-style="zoom"]        .reveal { transform: scale(0.94); }
[data-anim="1"][data-anim-style="slide-left"]  .reveal { transform: translateX(calc(var(--anim-distance) * -1.6)); }
[data-anim="1"][data-anim-style="slide-right"] .reveal { transform: translateX(calc(var(--anim-distance) * 1.6)); }
[data-anim="1"][data-anim-style="none"]        .reveal { opacity: 1; transform: none; transition: none; }

/* Hover lift is opt-out, so the setting can calm the whole site down. */
[data-hover-lift="0"] .card:hover,
[data-hover-lift="0"] .tile:hover,
[data-hover-lift="0"] .btn:hover { transform: none; }

[data-smooth-scroll="0"] { scroll-behavior: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal, [data-anim="1"] .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .timeline--columns { columns: 1; }
}

/* The inline nav needs a lower breakpoint than the old two-row header. */
@media (max-width: 1180px) {
  .nav__link { padding: 9px 8px; font-size: 0.82rem; }
  .brand__name { font-size: 1.05rem; }
  .brand__logo { width: 46px !important; height: 46px !important; }
}

@media (max-width: 1040px) {
  /* The header's backdrop-filter makes it a containing block for fixed
     children, which was clipping the slide-in menu to the header's height
     (only the first item showed). Drop it on mobile so the drawer is sized
     to the viewport, and give the drawer an explicit viewport height too. */
  /* Raise the header (and therefore the drawer inside it) above the scrim,
     otherwise the body-level scrim paints over the menu and eats every tap. */
  .site-header { backdrop-filter: none; z-index: 80; }

  /* Hide the floating call/WhatsApp buttons while the menu is open. */
  .nav-open .floaties,
  .nav-open .wa-float { opacity: 0; visibility: hidden; pointer-events: none; }

  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    top: 0; right: 0; left: auto;
    height: 100vh;
    height: 100dvh;
    width: min(340px, 88vw);
    background: #fff;
    display: block;
    border-top: 0;
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 40px rgb(0 0 0 / 0.12);
    padding: 84px 16px 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 80;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; gap: 2px; }
  .nav__link { padding: 13px 14px; border-bottom: 0; border-radius: 8px; width: 100%; justify-content: space-between; }
  .nav__link.is-active { background: var(--primary-soft); }
  .nav__drop {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--primary-soft);
    border-radius: 0; margin-left: 14px; padding: 2px 0 6px 8px; min-width: 0;
    display: none;
  }
  .nav__item.is-open > .nav__drop { display: block; }
  .nav__item:hover > .nav__drop { opacity: 1; visibility: visible; }
  .nav-scrim {
    position: fixed; inset: 0; background: rgb(15 18 34 / 0.45);
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease; z-index: 75;
  }
  .nav-scrim.is-open { opacity: 1; visibility: visible; }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .header__actions .btn--sm { padding: 9px 14px; font-size: 0.8rem; }
}

@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .topbar__inner { justify-content: center; font-size: 0.74rem; gap: 12px; }
  .topbar__group { gap: 14px; }
  .brand__logo { width: 44px; height: 44px; }
  .brand__name { font-size: 1.08rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .stat + .stat::before { display: none; }
  .badge-float { right: 10px; bottom: -10px; padding: 12px 16px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Hero — shorter and readable on phones */
  .hero { min-height: 56vh; }
  .hero__inner { padding: 22px 0; }
  .hero h1 { font-size: clamp(1.55rem, 1.1rem + 3.4vw, 2.1rem); }
  .hero__sub { font-size: 0.96rem; margin-bottom: 20px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }

  .page-hero { padding: 28px 0; }
  .page-hero p { font-size: 0.98rem; }
  .section-head p { font-size: 0.98rem; }

  /* Comfortable tap targets */
  .btn { padding: 12px 20px; }
  .btn--sm { padding: 10px 16px; }
  .float-btn, .wa-float { width: 50px; height: 50px; }
  .floaties { right: 14px; bottom: 16px; }
}

@media (max-width: 460px) {
  /* Drop the address chip in the utility bar to keep phone + email tidy */
  .topbar__group:first-child { display: none; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .grid--4 { grid-template-columns: 1fr 1fr; }
  /* Reclaim header space on very small phones */
  .header__actions .btn { display: none; }
}
