/* ============================================================
   Adi Sarguru Dharma Ashram — Theme
   Palette: White / Gold / Light Green / Earth tones
   ============================================================ */

:root {
  --asda-white: #fffdf8;
  --asda-cream: #faf6ec;
  --asda-gold: #c8952c;
  --asda-gold-light: #e8c574;
  --asda-green: #7a9b6e;
  --asda-green-light: #e4ede0;
  --asda-earth: #8a6d4b;
  --asda-text: #33301f;
  --asda-muted: #746f5e;
  --asda-border: rgba(200, 149, 44, 0.25);
  --asda-shadow: 0 10px 30px rgba(120, 100, 40, 0.10);
  --radius-lg: 22px;
  --radius-md: 14px;
}

[data-theme="dark"] {
  --asda-white: #14140f;
  --asda-cream: #1b1b14;
  --asda-text: #ede8d9;
  --asda-muted: #b6b09b;
  --asda-green-light: #23291f;
  --asda-border: rgba(232, 197, 116, 0.18);
  --asda-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--asda-cream);
  color: var(--asda-text);
  transition: background .3s ease, color .3s ease;
}

h1, h2, h3, h4, .brand-mark, .footer-brand {
  font-family: 'Cormorant Garamond', serif;
}

.brand-mark { color: var(--asda-gold); font-weight: 700; }

a { color: var(--asda-earth); text-decoration: none; }
a:hover { color: var(--asda-gold); }

/* ---------- Navbar ---------- */
.asda-navbar {
  background: rgba(255, 253, 248, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--asda-border);
}
[data-theme="dark"] .asda-navbar { background: rgba(20, 20, 15, 0.85); }
.asda-navbar .navbar-brand { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 700; color: var(--asda-text); white-space: nowrap; }
.asda-navbar .nav-link { color: var(--asda-text); font-weight: 500; white-space: nowrap; padding-left: 0.5rem; padding-right: 0.5rem; }
.asda-navbar .nav-link:hover { color: var(--asda-gold); }
.asda-navbar .navbar-nav .btn { white-space: nowrap; }
.account-dropdown-toggle { max-width: 160px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }

@media (min-width: 992px) and (max-width: 1400px) {
  .asda-navbar .nav-link { padding-left: 0.15rem; padding-right: 0.15rem; font-size: 0.86rem; }
  .asda-navbar .navbar-nav { gap: 0 !important; }
  .account-dropdown-toggle { max-width: 90px; }
  .asda-navbar .navbar-nav .btn-gold { padding: 0.3rem 0.7rem; font-size: 0.82rem; }
  .asda-navbar .navbar-brand { font-size: 1.3rem; }
}

.btn-gold {
  background: linear-gradient(135deg, var(--asda-gold-light), var(--asda-gold));
  color: #2b2107;
  border: none;
  font-weight: 600;
  border-radius: 30px;
  padding: 0.5rem 1.4rem;
}
.btn-gold:hover { filter: brightness(1.05); color: #2b2107; }

.btn-outline-green {
  border: 1px solid var(--asda-green);
  color: var(--asda-green);
  border-radius: 30px;
  font-weight: 500;
  background: transparent;
}
.btn-outline-green:hover { background: var(--asda-green); color: #fff; }

/* ---------- Glassmorphism card ---------- */
.glass-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--asda-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--asda-shadow);
}
[data-theme="dark"] .glass-card { background: rgba(30, 30, 22, 0.55); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 7rem 0 6rem;
  text-align: center;
  background: radial-gradient(circle at top, var(--asda-green-light) 0%, var(--asda-cream) 65%);
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--asda-text);
}
.hero p.lead { color: var(--asda-muted); max-width: 640px; margin: 0 auto 2rem; }
.hero .btn { margin: 0.3rem; }

/* ---------- Hero slider ---------- */
.hero-slider {
  min-height: 640px;
  display: flex;
  align-items: center;
  padding: 6rem 0;
  background: var(--asda-text);
}
.hero-slides, .hero-slide {
  position: absolute;
  inset: 0;
}
.hero-slide {
  background-size: cover;
  background-position: center;
  background-color: var(--asda-green-light);
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide-svg {
  background-size: auto 60%;
  background-repeat: no-repeat;
  background-position: 92% 100%;
  opacity: 1;
}
.hero-slide-svg.active { opacity: 0.9; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 18, 10, 0.25) 0%, rgba(20, 18, 10, 0.55) 100%);
}
.hero-slider .hero-content {
  position: relative;
  z-index: 2;
}
.hero-slider .hero-content h1,
.hero-slider .hero-content p.lead { color: #fff; }
.hero-slider .btn-outline-green { border-color: #fff; color: #fff; }
.hero-slider .btn-outline-green:hover { background: #fff; color: var(--asda-text); }

.hero-dots {
  position: absolute;
  z-index: 2;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.hero-dot.active { background: #fff; }

@media (max-width: 768px) {
  .hero-slider { min-height: 520px; padding: 4rem 0; }
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2.2rem; font-weight: 600; }
.section-title p { color: var(--asda-muted); }
.section-title-with-action { position: relative; }
.section-title-action { position: absolute; top: 0; right: 0; }
@media (max-width: 576px) {
  .section-title-action { position: static; display: inline-block; margin-bottom: 1rem; }
}

/* ---------- Course Cards ---------- */
.course-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--asda-white);
  border: 1px solid var(--asda-border);
  box-shadow: var(--asda-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.course-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(120,100,40,0.18); }
.course-card .thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--asda-green-light), var(--asda-gold-light));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--asda-earth);
  overflow: hidden;
}
.course-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-card .body { padding: 1.25rem; }
.course-card .badge-level {
  display: inline-block; font-size: .7rem; padding: .25rem .6rem; border-radius: 20px;
  background: var(--asda-green-light); color: var(--asda-green); text-transform: capitalize;
}

/* ---------- Fade / scroll animation ---------- */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Dashboard ---------- */
.dash-stat { border-radius: var(--radius-md); padding: 1.5rem; background: var(--asda-white); border: 1px solid var(--asda-border); box-shadow: var(--asda-shadow); }
.dash-stat h3 { color: var(--asda-gold); font-size: 2rem; margin-bottom: 0; }
.progress-thin { height: 8px; border-radius: 10px; background: var(--asda-green-light); }
.progress-thin .progress-bar { background: var(--asda-gold); }

/* ---------- Auth ---------- */
.auth-body { min-height: 100vh; display: flex; align-items: center; background: radial-gradient(circle at top, var(--asda-green-light), var(--asda-cream)); }
.auth-wrapper { width: 100%; max-width: 440px; margin: 2rem auto; }
.auth-card { padding: 2.5rem; }
.form-control, .form-select {
  border-radius: 10px; border: 1px solid var(--asda-border); background: rgba(255,255,255,0.7);
}
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background: rgba(255,255,255,0.06); color: var(--asda-text); }

/* ---------- Admin shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; background: var(--asda-text); color: #f4efe0; padding: 1.5rem 1rem; flex-shrink: 0;
}
.admin-brand { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; margin-bottom: 2rem; }
.admin-nav { display: flex; flex-direction: column; gap: .4rem; }
.admin-nav a { color: #d9d2b8; padding: .6rem .8rem; border-radius: 8px; }
.admin-nav a:hover { background: rgba(255,255,255,0.08); color: var(--asda-gold-light); }
.admin-main { flex: 1; background: var(--asda-cream); }
.admin-topbar { padding: 1.2rem 2rem; border-bottom: 1px solid var(--asda-border); background: var(--asda-white); }
.admin-content { padding: 2rem; }
.admin-table { background: var(--asda-white); border-radius: var(--radius-md); overflow: hidden; }

/* ---------- Footer ---------- */
.asda-footer { background: var(--asda-white); border-top: 1px solid var(--asda-border); margin-top: 4rem; }
.footer-links a { color: var(--asda-muted); display: block; margin-bottom: .4rem; }

/* ---------- AI Chat ---------- */
.ai-chat-window { height: 60vh; overflow-y: auto; padding: 1rem; border-radius: var(--radius-md); background: var(--asda-white); border: 1px solid var(--asda-border); }
.ai-bubble { max-width: 75%; padding: .7rem 1rem; border-radius: 16px; margin-bottom: .7rem; }
.ai-bubble.user { background: var(--asda-gold-light); margin-left: auto; }
.ai-bubble.ai { background: var(--asda-green-light); }

@media (max-width: 768px) {
  .admin-sidebar { position: fixed; left: -240px; z-index: 1000; height: 100%; transition: left .3s; }
  .admin-sidebar.open { left: 0; }
}
