/* DPS Shimla — clean rebuild */

:root {
  --green-900: #062818;
  --green-800: #073621;
  --green-700: #0a4a2c;
  --green-600: #0d5c37;
  --gold: #f7c911;
  --gold-soft: #ffe566;
  --cream: #f6f1ec;
  --bg: #f4f6f9;
  --white: #ffffff;
  --text: #09442d;
  --text-muted: #3d5c4c;
  --ticker-blue: #2096cd;
  --shadow: 0 10px 30px rgba(6, 40, 24, 0.08);
  --radius: 14px;
  --max: 1180px;
  --header-h: 84px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green-700);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--green-800), var(--green-900));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-inner {
  width: min(100% - 1.25rem, 1280px);
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gold);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: var(--gold-soft);
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--gold);
}

.brand-tagline {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 42px;
  height: 42px;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--white);
  border-radius: 2px;
  transition: 0.2s ease;
}

.main-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 0.85rem;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
}

.nav-item.is-active > .nav-link,
.nav-link:hover {
  color: var(--gold);
}

.caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.8;
}

.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 240px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.18s ease;
  z-index: 20;
}

.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--green-800);
  font-weight: 500;
  font-size: 0.92rem;
}

.dropdown a:hover,
.dropdown a.is-active {
  background: var(--cream);
  color: var(--green-700);
}

/* Hero slider — always full viewport width */
.hero-slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  background: var(--green-900);
  overflow: hidden;
}

.slider-track {
  position: relative;
  width: 100%;
  height: clamp(280px, 52vw, 620px);
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slide.is-active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  backdrop-filter: blur(2px);
}

.slider-btn:hover {
  background: rgba(7, 54, 33, 0.85);
}

.slider-btn.prev { left: 1rem; }
.slider-btn.next { right: 1rem; }

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 0.9rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.4rem;
}

.slider-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
}

.slider-dots button.is-active {
  background: var(--gold);
}

.slider-counter {
  position: absolute;
  left: 1rem;
  bottom: 0.85rem;
  z-index: 3;
  background: rgba(0, 0, 0, 0.65);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

/* News ticker */
.news-ticker {
  display: flex;
  align-items: stretch;
  background: var(--white);
  border-bottom: 2px solid var(--ticker-blue);
}

.ticker-label {
  flex: 0 0 auto;
  background: var(--ticker-blue);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.1rem;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  padding-right: 1.6rem;
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

.ticker-track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  animation: ticker 28s linear infinite;
}

.news-ticker:hover .ticker-track,
.ticker-viewport:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-track a {
  color: var(--green-800);
  font-weight: 600;
}

.ticker-track a:hover {
  color: var(--ticker-blue);
  text-decoration: underline;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Home — feature cards (live-style) */
.home-features {
  background: var(--cream);
  padding: 2.25rem 0 2.75rem;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: transparent;
  box-shadow: none;
}

.feature-media {
  position: relative;
  display: block;
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 340px;
}

.feature-media > img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.feature-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.1rem 1.15rem 1.2rem;
  background: linear-gradient(180deg, transparent, rgba(6, 40, 24, 0.88));
  color: #fff;
}

.feature-overlay p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.feature-overlay a,
.hm-excerpt a {
  color: var(--gold);
  font-weight: 700;
}

.feature-title {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--green-800);
  font-weight: 700;
}

.feature-title a {
  color: inherit;
}

/* Headmistress card */
.feature-media--hm {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem 1.15rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(247, 201, 17, 0.2), transparent 55%),
    linear-gradient(180deg, #fbf8f3, #fff);
  min-height: 340px;
}

.hm-portrait-wrap {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--gold), #fff3a8, var(--green-700));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  margin-bottom: 1rem;
}

.hm-portrait {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
}

.hm-banner {
  width: calc(100% + 2rem);
  margin: 0 -1rem 0.9rem;
  background: linear-gradient(90deg, var(--green-800), var(--green-700));
  color: var(--gold);
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  box-shadow: 0 4px 0 rgba(247, 201, 17, 0.35);
}

.hm-excerpt {
  padding: 0 0.35rem;
}

.hm-excerpt p {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.feature-prospectus .feature-media > img {
  object-fit: contain;
  background: #f7f3ee;
  padding: 0.75rem;
}

/* Dark green Registration / Admission / Fixture strip */
.home-actions {
  position: relative;
  background: var(--green-800);
  color: #fff;
  padding: 3.5rem 0 2.75rem;
  margin-top: -0.5rem;
}

.actions-wave {
  position: absolute;
  left: 0;
  right: 0;
  top: -28px;
  height: 40px;
  background: url("../images/white-decor.png") center top / 100% 40px no-repeat;
  pointer-events: none;
}

.actions-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.action-item {
  color: #fff;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 0.5rem;
  transition: transform 0.2s ease;
}

.action-item:hover {
  color: var(--gold);
  transform: translateY(-3px);
}

.action-icon {
  color: #fff;
  margin-bottom: 0.25rem;
}

.action-item:hover .action-icon {
  color: var(--gold);
}

.action-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
}

.action-sub {
  font-size: 0.95rem;
  opacity: 0.92;
}

/* App Login / Campus Tour / Event Calendar */
.home-quickbar {
  background: var(--cream);
  padding: 1.75rem 0 2rem;
}

.quickbar-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: center;
}

.quickbar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: var(--green-800);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  padding: 0.5rem;
}

.quickbar-item img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.quickbar-item:hover {
  color: var(--green-600);
}

/* Floating side CTAs */
.side-floats {
  position: fixed;
  right: 12px;
  bottom: 110px;
  z-index: 90;
  display: grid;
  gap: 0.65rem;
}

.side-float {
  display: block;
  width: 150px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s ease;
}

.side-float:hover {
  transform: translateX(-4px);
}

.side-float img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Members / Team page (live-style photo cards) */
.members-page {
  background: #fff;
  padding: 2.5rem 0 3.5rem;
}

.members-wrap {
  max-width: 1100px;
}

.members-heading {
  margin: 0 0 2rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  color: var(--green-800);
  font-weight: 700;
}

.members-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2rem;
  padding: 1.75rem 0 2rem;
}

.members-row.has-divider {
  border-top: 1px dashed #cfd6d2;
}

.member-card {
  text-align: center;
}

.member-photo {
  background: #e9eceb;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(6, 40, 24, 0.1);
}

.member-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.member-role {
  margin: 0;
  padding: 0.55rem 0.6rem;
  background: #fff;
  color: #8a8a8a;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.35;
  border-top: 1px solid #ececec;
}

.member-name {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--green-800);
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .members-row {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.25rem;
  }
}

@media (max-width: 560px) {
  .members-row {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
  }
}

/* Inner pages */
.page-hero {
  background:
    linear-gradient(120deg, rgba(7, 54, 33, 0.92), rgba(6, 40, 24, 0.85)),
    url("../images/about_school.jpg") center/cover;
  color: var(--white);
  padding: 2.75rem 0;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--gold);
}

.content-block {
  background: var(--white);
  margin: -1.5rem auto 2.5rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.content-block h2,
.content-block h3 {
  font-family: var(--font-display);
  color: var(--green-800);
}

.content-block p {
  color: var(--text-muted);
}

.content-block ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-muted);
  margin: 0.75rem 0 1.25rem;
}

.content-block li {
  margin-bottom: 0.4rem;
}

.placeholder-note {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.15rem;
  border-radius: 0 10px 10px 0;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, var(--green-800), var(--green-900));
  color: rgba(255, 255, 255, 0.88);
  margin-top: auto;
}

.footer-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 0 1.5rem;
  align-items: start;
}

.footer-logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.footer-heading {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
  font-weight: 700;
}

.footer-address,
.footer-phone {
  margin: 0 0 0.5rem;
  white-space: pre-line;
  font-size: 0.95rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-accent-link {
  color: var(--gold) !important;
  font-weight: 700;
}

.social-list,
.footer-links {
  display: grid;
  gap: 0.45rem;
}

.social-list--icons {
  display: flex;
  gap: 0.65rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff !important;
}

.social-facebook { background: #1877f2; }
.social-instagram { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.social-youtube { background: #ff0000; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--gold);
}

.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 50;
  box-shadow: var(--shadow);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--gold);
  color: var(--green-900);
}

/* Responsive */
@media (max-width: 980px) {
  .feature-cards,
  .actions-inner,
  .quickbar-inner,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-logo {
    margin-inline: auto;
  }

  .side-floats {
    display: none;
  }

  .brand-tagline {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--green-900);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.is-open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .main-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 1rem;
  }

  .nav-link {
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    border-radius: 0;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 0;
    min-width: 0;
  }

  .nav-item.is-open > .dropdown {
    display: block;
  }

  .dropdown a {
    color: rgba(255, 255, 255, 0.9);
    padding-left: 1.75rem;
  }

  .dropdown a:hover,
  .dropdown a.is-active {
    background: rgba(247, 201, 17, 0.12);
    color: var(--gold);
  }

  .slider-track {
    height: clamp(240px, 58vw, 420px);
  }
}

@media (max-width: 600px) {
  .header-inner {
    min-height: 72px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-name {
    font-size: 0.92rem;
  }

  .ticker-label {
    font-size: 0.78rem;
    padding: 0.55rem 1rem 0.55rem 0.75rem;
  }

  .feature-media,
  .feature-media > img,
  .feature-media--hm {
    min-height: 300px;
    height: auto;
  }

  .feature-media > img {
    height: 260px;
  }
}
