/* ============================================================
   Akshara Sree Girls Hostel — Styles
   ============================================================ */

:root {
  --primary: #9e2b4f;          /* deep rose */
  --primary-dark: #7c1f3e;
  --primary-deep: #5c1630;
  --accent: #e3a34b;           /* warm gold */
  --accent-soft: #f6e6cd;
  --ink: #2e2231;              /* text dark */
  --muted: #6f6372;            /* secondary text */
  --cream: #fbf6f0;            /* page background */
  --white: #ffffff;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;
  --radius: 18px;
  --shadow-sm: 0 6px 18px rgba(46, 34, 49, 0.08);
  --shadow-lg: 0 24px 60px rgba(46, 34, 49, 0.16);
  --font-head: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(158, 43, 79, 0.35);
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(158, 43, 79, 0.42);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
}

.btn--ghost:hover {
  background: var(--white);
  color: var(--primary-deep);
  transform: translateY(-3px);
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35);
}

.btn--whatsapp:hover {
  background: var(--whatsapp-dark);
  transform: translateY(-3px);
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13.5px;
  padding: 8px 0;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar a {
  font-weight: 600;
}

.topbar a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .topbar__address {
    display: none;
  }
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 246, 240, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.header.is-scrolled {
  box-shadow: 0 10px 30px rgba(46, 34, 49, 0.14);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 8px 18px rgba(158, 43, 79, 0.35);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__text strong {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-deep);
}

.brand__text small {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav__link {
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2.5px;
  border-radius: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--primary);
}

.nav__cta {
  padding: 11px 22px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--primary-deep);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    padding: 96px 24px 32px;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    background: var(--cream);
    box-shadow: var(--shadow-lg);
    transform: translateY(-110%);
    transition: transform 0.35s ease;
    z-index: -1;
  }

  .nav.is-open {
    transform: translateY(0);
  }

  .nav__link {
    font-size: 17px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(46, 34, 49, 0.08);
  }

  .nav__cta {
    margin-top: 8px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(120deg, rgba(46, 22, 32, 0.9) 0%, rgba(92, 22, 48, 0.75) 45%, rgba(158, 43, 79, 0.55) 100%),
    url("images/hero.jpg") center / cover no-repeat;
  padding: 120px 0 90px;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(227, 163, 75, 0.18), transparent 45%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  color: var(--white);
}

.hero__tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(227, 163, 75, 0.14);
  border: 1px solid rgba(227, 163, 75, 0.45);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.hero__title span {
  color: var(--accent);
}

.hero__subtitle {
  font-family: var(--font-head);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 600;
  margin-bottom: 18px;
}

.hero__subtitle em {
  font-style: normal;
  color: var(--accent);
}

.hero__desc {
  font-size: 17px;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 34px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  z-index: 2;
}

.hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 5px;
  height: 10px;
  margin-left: -2.5px;
  border-radius: 4px;
  background: var(--accent);
  animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
  0%   { opacity: 0; transform: translateY(0); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Section scaffolding ---------- */
.section {
  padding: 90px 0;
}

.section--tinted {
  background: #f4ebe1;
}

.section__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}

.section__eyebrow {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

.section__title {
  font-family: var(--font-head);
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--primary-deep);
  margin-bottom: 12px;
}

.section__tagline {
  font-size: 16.5px;
  color: var(--muted);
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about__media {
  position: relative;
}

.about__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  width: 100%;
}

.about__badge {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 14px;
  padding: 14px 22px;
  box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--accent);
}

.about__badge strong {
  font-family: var(--font-head);
  font-size: 15px;
  color: var(--primary-deep);
}

.about__badge span {
  font-size: 12.5px;
  color: var(--muted);
}

.about__text p {
  font-size: 16.5px;
  color: #4a3f4d;
  margin-bottom: 18px;
}

.about__address {
  background: var(--accent-soft);
  border: 1px solid rgba(227, 163, 75, 0.5);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 24px 0;
}

.about__address h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 6px;
}

.about__address p {
  font-size: 15px;
  color: #4a3f4d;
  margin: 0;
}

.about__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.about__card {
  background: var(--white);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about__card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.about__card-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.about__card strong {
  font-family: var(--font-head);
  font-size: 15.5px;
  color: var(--primary-deep);
}

.about__card p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 880px) {
  .about {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .about__media img {
    aspect-ratio: 16 / 10;
  }
}

/* ---------- Facilities ---------- */
.facilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.facility {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid transparent;
}

.facility:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--accent);
}

.facility__icon {
  display: inline-grid;
  place-items: center;
  width: 74px;
  height: 74px;
  font-size: 34px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent-soft), #fbf0df);
  margin-bottom: 20px;
}

.facility h3 {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 10px;
}

.facility p {
  font-size: 15px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .facilities {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .facilities {
    grid-template-columns: 1fr;
  }
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery__item:hover img {
  transform: scale(1.08);
}

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(46, 22, 32, 0.75), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery__item:hover::after {
  opacity: 1;
}

.gallery__item figcaption {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 2;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery__item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: stretch;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact__card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.contact__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.contact__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  font-size: 26px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
}

.contact__card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 4px;
}

.contact__card p {
  font-size: 15px;
  color: var(--muted);
}

.contact__note {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  padding: 4px 10px 0;
}

.contact__map {
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
  filter: saturate(0.92);
}

@media (max-width: 900px) {
  .contact {
    grid-template-columns: 1fr;
  }
  .contact__map {
    min-height: 360px;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.85);
  padding: 30px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__brand .brand__mark {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}

.footer__brand strong {
  display: block;
  font-family: var(--font-head);
  color: var(--white);
  font-size: 16px;
}

.footer__brand small {
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.footer__text {
  font-size: 13.5px;
  text-align: center;
}

.footer__credit {
  font-size: 12px;
  opacity: 0.7;
}

.footer__quick {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.footer__quick a {
  transition: color 0.25s ease;
}

.footer__quick a:hover {
  color: var(--accent);
}

@media (max-width: 720px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: var(--primary);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(158, 43, 79, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 90;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--primary-dark);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}