/* ══════════════════════════════════════════════════
   BHARATHI CHAPTER — UNIFIED THEME v2.0
   Teal + Gold · Playfair Display + Inter · Est. 2020

   Usage: Add this to any page:
   <link rel="stylesheet" href="theme.css">
══════════════════════════════════════════════════ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ══════════════════════════════
   DESIGN TOKENS
══════════════════════════════ */
:root {
  /* ── PRIMARY (Teal) ── */
  --color-primary:       #085041;
  --color-primary-dark:  #063d30;
  --color-primary-light: #F0FAF8;
  --color-primary-mid:   #0d7a5f;
  --color-primary-bright:#2FA4A4;
  --color-footer:        #063d30;

  /* ── ACCENT (Gold) ── */
  --color-accent:        #C8960C;
  --color-accent-light:  #FDF3DC;
  --color-accent-dark:   #a87a0a;
  --color-accent-hover:  #d4a012;
  --color-accent-lt:     #f5e0a0;

  /* ── TEXT ── */
  --color-ink:           #1A1A1A;
  --color-body:          #4B5563;
  --color-muted:         #6B7280;
  --color-faint:         #9CA3AF;

  /* ── NEUTRAL ── */
  --color-white:         #FFFFFF;
  --color-border:        #E5E7EB;
  --color-bg:            #F9FAFB;
  --color-bg-dark:       #F3F4F6;

  /* ── STATUS ── */
  --color-success:       #16a34a;
  --color-success-light: #D1FAE5;
  --color-error:         #dc2626;
  --color-error-light:   #FEE2E2;
  --color-warning:       #d97706;
  --color-warning-light: #FFFBEB;
  --color-info:          #2563EB;
  --color-info-light:    #DBEAFE;

  /* ── LEGACY ALIASES (backward compatibility) ── */
  --teal:        var(--color-primary);
  --teal-dark:   var(--color-primary-dark);
  --teal-darker: var(--color-footer);
  --teal-light:  var(--color-primary-light);
  --teal-border: var(--color-primary-mid);
  --ink:         var(--color-ink);
  --body:        var(--color-body);
  --muted:       var(--color-muted);
  --faint:       var(--color-faint);
  --border:      var(--color-border);
  --white:       var(--color-white);
  --orange:      var(--color-accent);
  --gold:        var(--color-accent);

  /* ── OLD NAMING CONVENTION (events page compatibility) ── */
  --primary:     var(--color-primary);
  --dark:        var(--color-primary-dark);
  --darker:      var(--color-footer);
  --accent:      var(--color-accent);
  --text:        var(--color-ink);
  --surface:     var(--color-bg);
  --shadow:      0 4px 24px rgba(0,0,0,.08);

  /* ── TYPOGRAPHY ── */
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-size:   15px;
  --line-height: 1.6;

  /* ── FLUID TYPE SCALE (clamp: min, preferred, max) ── */
  --text-xs:     clamp(10px, 1.5vw, 11px);
  --text-sm:     clamp(12px, 1.8vw, 13px);
  --text-base:   clamp(14px, 2vw, 15px);
  --text-md:     clamp(15px, 2.2vw, 16px);
  --text-lg:     clamp(18px, 2.8vw, 22px);
  --text-xl:     clamp(22px, 3.5vw, 28px);
  --text-2xl:    clamp(26px, 4vw, 32px);
  --text-3xl:    clamp(28px, 5vw, 38px);
  --text-4xl:    clamp(32px, 6vw, 48px);

  /* ── BOTTOM NAV ── */
  --bottom-nav-h: 60px;

  /* ── LAYOUT ── */
  --max:         1200px;
  --radius:      16px;
  --radius-sm:   10px;
  --radius-lg:   20px;
  --radius-pill: 24px;

  /* ── SHADOWS ── */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl:   0 16px 48px rgba(0,0,0,0.16);
  --shadow-gold: 0 4px 16px rgba(212,175,55,0.25);

  /* ── TRANSITIONS ── */
  --transition:  0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-smooth: 0.25s ease;
  --transition-slow: 0.3s ease;
}

/* ══════════════════════════════
   BASE STYLES
══════════════════════════════ */
body {
  font-family: var(--font);
  color: var(--color-ink);
  background: var(--color-white);
  font-size: var(--font-size);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Lazy loading — content-visibility for off-screen elements */
img[loading="lazy"] { content-visibility: auto; }

/* ══════════════════════════════
   NAVBAR
══════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 0 24px;
}
.navbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-logo-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-ink);
}
.nav-logo-sub {
  font-size: 9px;
  color: var(--color-muted);
  letter-spacing: 1px;
  display: block;
  margin-top: 1px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  cursor: pointer;
  transition: color var(--transition);
  text-decoration: none;
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
  font-weight: 600;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}
.nav-cta {
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--color-primary-dark); }

/* ── Hamburger (hidden on desktop) ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 12px;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: all 0.25s;
}
.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); }

/* ── Mobile drawer ── */
.nav-drawer {
  display: none;
  position: fixed;
  top: 65px;
  left: 0; right: 0; bottom: 0;
  background: var(--color-white);
  z-index: 99;
  padding: 24px;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--color-border);
  overflow-y: auto;
}
.nav-drawer.open { display: flex; }
.drawer-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
}
.drawer-link:hover, .drawer-link.active { color: var(--color-primary); }
.drawer-cta {
  margin-top: 20px;
  background: var(--color-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  text-align: center;
}

/* ══════════════════════════════
   HERO (Standard — 300px compact)
══════════════════════════════ */
.hero {
  background: var(--color-primary-light);
  padding: 64px 24px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--color-ink);
  margin-bottom: 16px;
}
.hero-title span { color: var(--color-primary); }
.hero-title em { font-style: italic; color: var(--color-primary); }
.hero-desc {
  font-size: var(--text-md);
  color: var(--color-body);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 28px;
}
.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-white {
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition-normal);
  white-space: nowrap;
}
.btn-white:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--color-body);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}
.btn-ghost:hover { background: var(--color-bg); color: var(--color-ink); border-color: var(--color-muted); }

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 12px 28px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { background: var(--color-accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 11px 24px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-primary);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.btn-accent {
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 12px 28px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-accent:hover { background: var(--color-primary-dark); }

/* ══════════════════════════════
   SECTION LAYOUT
══════════════════════════════ */
.section {
  padding: 72px 24px;
}
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.section-sub {
  font-size: 15px;
  color: var(--color-muted);
  margin-top: 6px;
  line-height: 1.6;
}
.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

/* ══════════════════════════════
   CARDS
══════════════════════════════ */
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 28px;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
}
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card:hover::after {
  opacity: 1;
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.footer {
  background: var(--color-footer);
  padding: 56px 24px 28px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.4); line-height: 1.7; margin-bottom: 12px; }
.footer-col-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-link {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--color-accent); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}
.footer-copy { font-size: 12px; }
.footer-domain { color: var(--color-accent); font-weight: 500; }

/* ══════════════════════════════
   FORM ELEMENTS
══════════════════════════════ */
input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--color-ink);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--color-white);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
input::placeholder { color: var(--color-faint); }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
label .req { color: var(--color-error); }

/* ══════════════════════════════
   BADGES & TAGS
══════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
}
.badge-primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.badge-accent {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

/* ══════════════════════════════
   UTILITY CLASSES
══════════════════════════════ */
.text-primary { color: var(--color-primary); }
.text-accent  { color: var(--color-accent); }
.text-ink     { color: var(--color-ink); }
.text-body    { color: var(--color-body); }
.text-muted   { color: var(--color-muted); }
.text-faint   { color: var(--color-faint); }
.text-white   { color: #fff; }

.bg-primary   { background: var(--color-primary); }
.bg-light     { background: var(--color-primary-light); }
.bg-surface   { background: var(--color-bg); }
.bg-white     { background: var(--color-white); }
.bg-footer    { background: var(--color-footer); }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.text-center { text-align: center; }
.text-left   { text-align: left; }

.font-display { font-family: var(--font-display); }

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes popupIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════════════════════════════
   WHATSAPP FLOATING WIDGET
══════════════════════════════ */
.wa-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wa-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
  transition: transform var(--transition);
}
.wa-btn:hover { transform: scale(1.08); }
.wa-btn svg { width: 26px; height: 26px; fill: #fff; }

/* ══════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════ */
@media (max-width: 900px) {
  .section { padding: 48px 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 639px) {
  .navbar { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 40px 16px 48px; min-height: auto; }
  .section { padding: 36px 16px; }
  .section-header { margin-bottom: 20px; }
  .footer { padding: 40px 16px 88px; } /* extra bottom padding for bottom nav */
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .wa-widget { bottom: 76px; right: 18px; } /* above bottom nav */
  /* Cards: tighter padding on mobile */
  .card { padding: 20px 16px; }
}

/* ══════════════════════════════
   BOTTOM NAVIGATION BAR (mobile only)
══════════════════════════════ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  z-index: 98;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-inner {
  display: flex;
  height: 100%;
  align-items: stretch;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color var(--transition);
  border: none;
  background: none;
  font-family: var(--font);
  padding: 6px 4px;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.bottom-nav-item.active {
  color: var(--color-primary);
}
.bottom-nav-item.active svg {
  stroke: var(--color-primary);
}
.bottom-nav-item:active {
  background: var(--color-primary-light);
  border-radius: 8px;
}

@media (max-width: 639px) {
  .bottom-nav { display: block; }
  body { padding-bottom: var(--bottom-nav-h); }
}

/* ══════════════════════════════
   PWA INSTALL PROMPT BANNER
══════════════════════════════ */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  animation: slideUp 0.3s ease;
}
.pwa-install-banner.visible { display: flex; }
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.pwa-install-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.pwa-install-text strong { display: block; font-size: 14px; font-weight: 700; }
.pwa-install-btn {
  background: var(--color-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 20px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  flex-shrink: 0;
}
.pwa-install-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}
