:root {
  --primary: #0e2a4d;
  --primary-dark: #081a30;
  --primary-light: #f6ecd4;
  --gold: #c8992f;
  --gold-dark: #a97c1f;
  --accent: #25d366;
  --bg: #faf6ec;
  --text: #23201a;
  --muted: #6f6653;
  --border: #ead9b0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(30, 20, 5, 0.10);
  --font-head: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

* { 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.6;
  -webkit-font-smoothing: antialiased;
  animation: pageEnter 0.45s ease both;
}

h1, h2, h3, .brand, .footer-title { font-family: var(--font-head); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--primary); }

/* Whole-page enter/leave transition. Enter runs automatically on every
   load (no JS needed); leave is triggered by main.js right before an
   internal link navigates, so full page loads feel like soft cross-fades
   instead of hard cuts. */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
body.page-leave {
  animation: pageLeave 0.22s ease both;
}
@keyframes pageLeave {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

.fade-up { animation: fadeUp 0.7s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered reveal for headings/cards further down the page. */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.cards .card.reveal:nth-child(1) { transition-delay: 0s; }
.cards .card.reveal:nth-child(2) { transition-delay: 0.09s; }
.cards .card.reveal:nth-child(3) { transition-delay: 0.18s; }
.cards .card.reveal:nth-child(4) { transition-delay: 0.27s; }
.cards .card.reveal:nth-child(5) { transition-delay: 0.36s; }
.cards .card.reveal:nth-child(6) { transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  body, .fade-up, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  position: sticky;
  top: 0;
  z-index: 30;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(8, 80, 94, 0.08); border-color: var(--border); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 16px;
}
.brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.main-nav { display: flex; gap: 28px; }
.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-link.active, .nav-link:hover { color: var(--primary); border-color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 0 auto; background: var(--primary-dark); transition: transform 0.2s ease, opacity 0.2s ease; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #fdf0d6 0%, #faf6ec 55%, #f7ecd1 100%);
  padding: 72px 0;
}
.hero-shapes {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 15%, rgba(14, 42, 77, 0.16) 0%, transparent 50%),
    radial-gradient(circle at 6% 95%, rgba(200, 153, 47, 0.28) 0%, transparent 48%),
    radial-gradient(circle at 50% 50%, rgba(200, 153, 47, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.decor-eye {
  position: absolute;
  width: 380px;
  height: auto;
  pointer-events: none;
  z-index: 0;
}
.decor-eye-gold { top: -60px; right: -70px; color: var(--gold); opacity: 0.22; transform: rotate(-6deg); }
.decor-eye-navy { bottom: -70px; left: -90px; width: 300px; color: var(--primary); opacity: 0.14; transform: rotate(8deg) scaleX(-1); }
@media (max-width: 780px) {
  .decor-eye-gold { width: 220px; top: -30px; right: -60px; }
  .decor-eye-navy { width: 180px; bottom: -30px; left: -60px; }
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-inner > div:first-child { flex: 1 1 340px; }
.eyebrow {
  display: inline-block;
  color: var(--primary-dark);
  background: var(--primary-light);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { font-size: 2.5rem; margin: 0 0 10px; color: var(--primary-dark); line-height: 1.15; letter-spacing: -0.01em; }
.tagline { font-size: 1.15rem; color: var(--muted); margin: 0 0 6px; }
.hero-doctor { font-weight: 600; margin-bottom: 26px; color: var(--text); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-photo { flex-shrink: 0; }
.hero-photo img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 50%;
  border: 8px solid #fff;
  box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--gold); color: #23201a; box-shadow: 0 8px 20px rgba(200, 153, 47, 0.35); }
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-1px); }
.btn-secondary { background: #fff; color: var(--primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary-dark); }

/* Sections & cards */
.section { padding: 56px 0; }
.section-title { color: var(--primary-dark); font-size: 1.5rem; }
.section > h1 { color: var(--primary-dark); font-size: 2rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; margin-top: 24px; }
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon { width: 30px; height: 30px; color: var(--primary); margin-bottom: 12px; }
.card h3 { margin-top: 0; margin-bottom: 10px; color: var(--primary-dark); font-size: 1.05rem; }
.card ul { margin: 0; padding-left: 18px; }
.card li { margin-bottom: 6px; }
.quick-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 24px; background: var(--primary-light); padding: 14px 18px; border-radius: 10px; }
.more-link { margin-top: 20px; }
.more-link a { font-weight: 600; text-decoration: none; }

/* About page */
.about-grid { display: flex; gap: 36px; flex-wrap: wrap; align-items: flex-start; }
.about-photo { width: 210px; height: 210px; object-fit: cover; border-radius: 50%; border: 6px solid #fff; box-shadow: var(--shadow); }
.timelines { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 36px; margin-top: 36px; }
.timeline { list-style: none; padding: 0; border-left: 3px solid var(--gold); margin-top: 16px; }
.timeline li { padding: 0 0 18px 20px; position: relative; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 4px;
  width: 13px;
  height: 13px;
  background: var(--gold);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--gold);
  border-radius: 50%;
}
.timeline .years { display: block; font-weight: 700; color: var(--primary-dark); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 26px; align-items: stretch; margin-top: 12px; }
.map-wrap iframe { width: 100%; height: 100%; min-height: 340px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--primary-dark); color: #ecdfc0; padding: 40px 0; margin-top: 48px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-title { font-weight: 700; font-size: 1.1rem; color: var(--gold); margin-bottom: 6px; }
.site-footer p { margin: 4px 0; opacity: 0.9; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: #ecdfc0; text-decoration: none; opacity: 0.9; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; color: var(--gold); }

/* WhatsApp float button */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 13px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0,0,0,0.22);
  z-index: 40;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: translateY(-2px) scale(1.03); }

/* Mobile nav */
@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 20px rgba(8,80,94,0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 260px; }
  .nav-link { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .hero h1 { font-size: 2rem; }
  .hero-photo img { width: 190px; height: 190px; }
}

/* Admin */
.admin-body { background: #eef2f4; }
.admin-container { max-width: 760px; padding: 40px 20px; }
.admin-login {
  max-width: 360px;
  margin: 80px auto;
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.admin-header { display: flex; justify-content: space-between; align-items: center; }
.admin-form fieldset {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.admin-form legend { font-weight: 700; color: var(--primary-dark); padding: 0 8px; }
.admin-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 0.92rem; }
.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: normal;
}
.admin-form small, .hint { color: var(--muted); font-weight: normal; display: block; margin-top: 4px; }
.password-form { margin-top: 24px; }
.error { color: #b3261e; font-weight: 600; }
.success { color: #146c2e; font-weight: 600; }
