/* ============================================
   Vazhuthanapallil Homoeo Clinic — Custom CSS
   Sacred Legacy Design System
   ============================================ */

/* Google Fonts are loaded in head.ejs */

:root {
  --green: #1B4332;
  --green-light: #2D6A4F;
  --gold: #D4AF37;
  --gold-light: #E8C84A;
  --cream: #FAFAF5;
  --parchment: #F0EDE4;
  --text: #1C1917;
  --muted: #5C5546;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ── */
.font-display { font-family: 'Playfair Display', serif; }
.font-accent  { font-family: 'Cormorant Garamond', serif; }

h1, h2, h3 { font-family: 'Playfair Display', serif; }

/* ── BOTANICAL HERO PATTERN ── */
.hero-section {
  position: relative;
  background: var(--green);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='0.5' opacity='0.15'%3E%3Cpath d='M40 10 C30 20 20 30 10 40 C20 30 30 20 40 10Z'/%3E%3Cpath d='M40 10 C50 20 60 30 70 40 C60 30 50 20 40 10Z'/%3E%3Cpath d='M20 60 C25 50 30 40 40 30 C30 40 25 50 20 60Z'/%3E%3Cpath d='M60 60 C55 50 50 40 40 30 C50 40 55 50 60 60Z'/%3E%3Ccircle cx='40' cy='40' r='3' fill='%23D4AF37' opacity='0.3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
  opacity: 0.12;
  pointer-events: none;
}

/* ── GOLD DIVIDER ── */
.gold-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 0 auto;
  width: 70%;
}

.gold-divider-left {
  border: none;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
  width: 60px;
  display: inline-block;
}

/* ── NAVIGATION ── */
#main-nav {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#main-nav.nav-scrolled {
  background: rgba(250, 250, 245, 0.97) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-link {
  position: relative;
  color: var(--white);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-scrolled .nav-link { color: var(--text); }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.nav-link:hover { color: var(--gold); }
.nav-scrolled .nav-link:hover { color: var(--green); }

/* ── HELPLINE BANNER ── */
.helpline-banner {
  background: var(--gold);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 6px 16px;
}

/* ── STAT COUNTERS ── */
.stat-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.stat-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}

@media (max-width: 768px) {
  .stat-number { font-size: 2.5rem; }
}

/* ── FOUNDER PHOTO FRAME ── */
.founder-frame {
  position: relative;
  display: inline-block;
}

.founder-frame::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: 8px;
  bottom: 8px;
  border: 2px solid var(--gold);
  border-radius: 4px;
  z-index: 0;
}

.founder-frame img {
  position: relative;
  z-index: 1;
  border-radius: 4px;
  display: block;
}

/* ── TREATMENT CARDS ── */
.treatment-card {
  background: var(--white);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.treatment-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(27, 67, 50, 0.12);
  border-color: var(--gold);
  border-left: 3px solid var(--gold);
}

/* ── TESTIMONIAL CARDS ── */
.testimonial-card {
  background: var(--green);
  border-radius: 12px;
  padding: 2rem;
  color: var(--white);
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: var(--gold);
  position: absolute;
  top: -10px;
  left: 20px;
  line-height: 1;
  opacity: 0.6;
}

.testimonial-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}

.star-rating {
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 2px;
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold) 0%, var(--green) 100%);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 3rem;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 3rem;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--gold);
  border: 3px solid var(--white);
  border-radius: 50%;
  top: 6px;
  box-shadow: 0 0 0 2px var(--gold);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -7px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -7px;
}

@media (max-width: 768px) {
  .timeline::before { left: 20px; }
  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding-left: 3.5rem;
    padding-right: 0;
    text-align: left;
  }
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 13px;
    right: auto;
  }
}

/* ── WHATSAPP FLOAT ── */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: #25D366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  text-decoration: none;
  animation: pulse-whatsapp 2.5s infinite;
  transition: transform 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  animation: none;
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.7);
}

@keyframes pulse-whatsapp {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
  50%       { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8), 0 0 0 8px rgba(37, 211, 102, 0.15); }
}

/* ── BLOG READING PROGRESS ── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gold);
  z-index: 10000;
  width: 0%;
  transition: width 0.1s linear;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--gold);
  color: var(--text);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s ease, transform 0.15s ease;
  border: none;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-outline {
  border: 2px solid var(--white);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--green);
}

.btn-outline-green {
  border: 2px solid var(--green);
  color: var(--green);
  padding: 0.75rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-outline-green:hover {
  background: var(--green);
  color: var(--white);
}

/* ── SECTION LABELS ── */
.section-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ── DOCTOR CARD ── */
.doctor-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(27, 67, 50, 0.15);
}

.doctor-avatar {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  color: var(--gold);
  font-weight: 700;
}

.doctor-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
}

/* ── LANGUAGE BADGES ── */
.lang-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 600;
  margin: 2px;
  letter-spacing: 0.05em;
}

/* ── FAQ ACCORDION ── */
details {
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

details summary {
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 600;
  color: var(--green);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 300;
  transition: transform 0.2s;
}

details[open] summary::after {
  content: '−';
}

details p {
  padding: 0 0 1rem 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ── BRANCH CARDS ── */
.branch-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.branch-card iframe {
  width: 100%;
  height: 250px;
  display: block;
  border: none;
}

/* ── CONTACT FORM ── */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(92, 85, 70, 0.25);
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.08);
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

/* ── MOBILE NAV ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--green);
  z-index: 9000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--gold); }

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: none;
}

@media (max-width: 1024px) {
  .hamburger { display: block; }
  .desktop-nav { display: none !important; }
}

/* ── HERO HEIGHT ── */
.hero-full { min-height: 100vh; }

@media (max-width: 768px) {
  .hero-full { min-height: 85vh; }
}

/* ── BLOG CARD ── */
.blog-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(27, 67, 50, 0.12);
}

/* ── CATEGORY BADGE ── */
.cat-badge {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(27, 67, 50, 0.1);
  border-radius: 20px;
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ── ADMIN PANEL ── */
.admin-sidebar {
  background: var(--green);
  min-height: 100vh;
  width: 240px;
  flex-shrink: 0;
}

.admin-nav-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border-left-color: var(--gold);
}

.admin-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--gold);
  color: var(--text);
  margin-left: 6px;
}

/* ── PAGE HERO STRIP ── */
.page-hero {
  background: var(--green);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='0.4' opacity='0.1'%3E%3Cpath d='M30 5 C22 15 12 22 5 30 C12 22 22 15 30 5Z'/%3E%3Cpath d='M30 5 C38 15 48 22 55 30 C48 22 38 15 30 5Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
  opacity: 0.08;
}

/* ── FOOTER ── */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.75);
}

footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--gold); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-light); }

/* ── UTILITY ── */
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.bg-green { background: var(--green); }
.bg-parchment { background: var(--parchment); }
.border-gold { border-color: var(--gold); }

.shadow-green {
  box-shadow: 0 8px 32px rgba(27, 67, 50, 0.15);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.7s ease forwards; }
.fade-up-delay-1 { animation: fadeUp 0.7s ease 0.1s forwards; opacity: 0; }
.fade-up-delay-2 { animation: fadeUp 0.7s ease 0.2s forwards; opacity: 0; }
.fade-up-delay-3 { animation: fadeUp 0.7s ease 0.35s forwards; opacity: 0; }
.fade-up-delay-4 { animation: fadeUp 0.7s ease 0.5s forwards; opacity: 0; }
