/* ==========================================================================
   Magadh Hospital — Stylesheet
   Theme derived from hospital logo: green (primary), red (accent/cross),
   gold (highlight), white background.
   ========================================================================== */

:root {
  --green-900: #0d4d21;
  --green-800: #0f6b2c;
  --green-700: #157a33;
  --green-600: #1f9142;
  --green-500: #2e7d32;
  --green-100: #e6f4ea;
  --green-50:  #f2faf4;

  --red-600: #e2231a;
  --red-500: #ef2f24;
  --red-100: #fde8e7;

  --gold-500: #f7b500;
  --gold-400: #ffc933;

  --ink-900: #16241a;
  --ink-700: #3a4a3f;
  --ink-500: #647268;
  --ink-300: #9caa9f;

  --bg: #ffffff;
  --bg-alt: #f7faf7;
  --border: #e3ece4;

  --shadow-sm: 0 2px 8px rgba(15, 60, 25, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 60, 25, 0.12);
  --shadow-lg: 0 20px 48px rgba(15, 60, 25, 0.18);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --container: 1180px;
  --header-h: 84px;
  --topbar-h: 40px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--topbar-h) + 10px);
}

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.2;
  color: var(--green-900);
  font-weight: 700;
}

.eyebrow {
  display: inline-block;
  color: var(--red-600);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--outline {
  border-color: var(--green-700);
  color: var(--green-800);
  background: transparent;
}
.btn--outline:hover {
  background: var(--green-800);
  color: #fff;
  transform: translateY(-2px);
}
.btn--block { width: 100%; }

/* ============================= Topbar ============================= */
.topbar {
  background: var(--green-900);
  color: #eafbee;
  font-size: 0.82rem;
  height: var(--topbar-h);
}
.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__item { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar__right { display: flex; align-items: center; gap: 12px; }
.topbar a:hover { color: var(--gold-400); }
.topbar .divider {
  width: 1px; height: 14px; background: rgba(255,255,255,0.25);
}
.topbar__inner .topbar__item:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================= Header ============================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand__logo { height: 52px; width: auto; }
.brand__text { display: flex; flex-direction: column; }
.brand__name {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--green-800);
  letter-spacing: 0.01em;
}
.brand__tagline {
  font-size: 0.72rem;
  color: var(--ink-500);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__link {
  position: relative;
  font-weight: 500;
  color: var(--ink-700);
  padding: 6px 2px;
  transition: color 0.2s var(--ease);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  height: 2px; width: 0;
  background: var(--red-600);
  transition: width 0.25s var(--ease);
}
.nav__link:hover, .nav__link.active { color: var(--green-800); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

.header__cta { flex-shrink: 0; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-900);
  margin: 0 auto;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================= Hero ============================= */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 77, 33, 0.88) 0%, rgba(13, 60, 30, 0.85) 45%, rgba(10, 40, 20, 0.94) 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding-top: 60px;
  padding-bottom: 80px;
}
.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
  backdrop-filter: blur(4px);
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 20px;
}
.hero__desc {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin-bottom: 34px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn--outline { border-color: rgba(255,255,255,0.6); color: #fff; }
.hero .btn--outline:hover { background: #fff; color: var(--green-800); }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.85);
  font-size: 1.4rem;
  animation: bob 2s infinite ease-in-out;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ============================= Trust strip ============================= */
.trust-strip {
  background: var(--green-800);
  padding: 40px 0;
}
.trust-strip__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.trust-item {
  color: #fff;
}
.trust-item__num, .trust-item__suffix {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--gold-400);
}
.trust-item p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
}

/* ============================= About ============================= */
.about { padding: 110px 0; background: var(--bg); }
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about__media { position: relative; }
.about__img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.about__logo-card {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 150px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--bg);
}
.about__content h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 18px; }
.about__content p { color: var(--ink-500); margin-bottom: 24px; }

.check-list { margin-bottom: 30px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  font-weight: 500;
  color: var(--ink-700);
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  background: var(--green-100);
  color: var(--green-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* ============================= Services ============================= */
.services { padding: 110px 0; background: var(--bg-alt); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 60px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 14px; }
.section-head p { color: var(--ink-500); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 30px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service-card__icon {
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  background: var(--green-100);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-card p { color: var(--ink-500); font-size: 0.94rem; margin: 0; }

/* ============================= Visit banner ============================= */
.visit {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
}
.visit__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.visit__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 77, 33, 0.82) 0%, rgba(10, 40, 20, 0.9) 100%);
}
.visit__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 24px;
}
.visit__logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 22px;
}
.visit h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.visit p { color: rgba(255,255,255,0.85); margin-bottom: 28px; max-width: 480px; }

/* ============================= Contact ============================= */
.contact { padding: 110px 0; background: var(--green-900); color: #fff; }
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
}
.contact .eyebrow { color: var(--gold-400); }
.contact h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 16px; }
.contact__info > p { color: rgba(255,255,255,0.75); margin-bottom: 36px; }

.contact-detail {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
}
.contact-detail__icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.contact-detail h4 { color: #fff; font-size: 0.95rem; margin-bottom: 4px; }
.contact-detail p { color: rgba(255,255,255,0.75); margin: 0; font-size: 0.92rem; }
.contact-detail a:hover { color: var(--gold-400); }

.contact__form {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.contact__form h3 { margin-bottom: 22px; font-size: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 8px;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--ink-900);
  background: var(--bg-alt);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px var(--green-100);
}
.form-note {
  margin: 14px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green-700);
  min-height: 1.2em;
}

/* ============================= Footer ============================= */
.footer { background: #08341a; color: rgba(255,255,255,0.7); padding: 70px 0 0; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__logo { height: 60px; margin-bottom: 16px; border-radius: 8px; background: #fff; padding: 6px; }
.footer__brand p { font-size: 0.88rem; line-height: 1.7; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links a:hover, .footer__contact a:hover { color: var(--gold-400); }
.footer__contact p { font-size: 0.9rem; margin: 0 0 12px; }
.footer__bottom {
  text-align: center;
  padding: 22px 0;
  font-size: 0.85rem;
}

/* ============================= Back to top ============================= */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--green-800);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
  z-index: 400;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--red-600); }

/* ============================= Reveal animation ============================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ============================= Responsive ============================= */
@media (max-width: 1024px) {
  .about__inner, .contact__inner { grid-template-columns: 1fr; }
  .about__media { margin-bottom: 20px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .topbar__item:first-child { display: none; }
  .topbar__inner { justify-content: center; }

  .nav {
    position: fixed;
    top: calc(var(--header-h) + var(--topbar-h));
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 24px 20px;
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
  }
  .nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__link { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .header__cta { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 640px) {
  .brand__tagline { display: none; }
  .trust-strip__inner { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .services__grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact__form { padding: 26px; }
  .footer__inner { grid-template-columns: 1fr; gap: 34px; }
  .about__logo-card { width: 110px; right: -14px; bottom: -20px; }
  .visit__logo { width: 68px; height: 68px; }
}
