:root {
  /* Saffron & Cream Palette */
  --bg-color: #fffaf2;
  /* Background: Cream */
  --primary-color: #e67e22;
  /* Primary: Saffron */
  --text-color: #4a2c1a;
  /* Text: Dark Brown */

  /* Semantic Mappings */
  --maroon-95: var(--text-color);
  /* Mapped for existing classes */
  --maroon-90: var(--bg-color);
  /* Mapped for existing classes (bg) */
  --maroon-80: #fdf3e5;
  /* Slightly darker cream for cards/sections */
  --maroon: var(--primary-color);

  --gold: var(--primary-color);
  --gold-90: #d35400;
  /* Darker saffron for text contrast */
  --gold-80: #e67e22;
  /* Saffron */
  --gold-70: #d35400;
  --gold-30: rgba(230, 126, 34, 0.3);
  /* Saffron border */

  --white: #fff;
  --dark-overlay: rgba(74, 44, 26, 0.7);
  /* Brown overlay */
}

html,
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  background-color: var(--bg-color);
  background-image: url('../img/astrology-pattern.svg');
  background-attachment: fixed;
  background-size: 800px;
  color: var(--text-color);
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: 'Playfair Display', serif;
  color: var(--text-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

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

/* Navbar */
.navbar {
  background: rgba(255, 250, 242, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--gold-30) !important;
  box-shadow: 0 2px 20px rgba(230, 126, 34, 0.08);
  transition: all 0.3s ease;
}

.navbar-brand {
  color: var(--primary-color) !important;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  font-weight: 700;
}

.navbar-brand:hover {
  transform: translateY(-2px);
  color: var(--gold-90) !important;
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: rotate(180deg);
}

.navbar .nav-link {
  color: var(--text-color) !important;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1rem !important;
  margin: 0 0.2rem;
  border-radius: 8px;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.navbar .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--gold-90));
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar .nav-link:hover {
  color: var(--primary-color) !important;
  background: rgba(230, 126, 34, 0.08);
  transform: translateY(-2px);
}

.navbar .nav-link:hover::before {
  width: 80%;
}

.navbar .nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary-color), var(--gold-90));
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.navbar .nav-link.active::before {
  display: none;
}

.navbar-toggler {
  border: 2px solid var(--primary-color);
  padding: 0.5rem 0.75rem;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background: rgba(230, 126, 34, 0.1);
  transform: scale(1.05);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
}

/* Mobile menu enhancements */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(255, 250, 242, 0.98);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 12px;
    border: 1px solid var(--gold-30);
    box-shadow: 0 4px 20px rgba(230, 126, 34, 0.1);
  }

  .navbar .nav-link {
    margin: 0.25rem 0;
  }
}

/* Utilities Redefined */
.bg-maroon-80 {
  background: var(--maroon-80) !important;
}

.bg-maroon-90 {
  background: var(--bg-color) !important;
}

.bg-maroon-95 {
  background: var(--maroon-80) !important;
}

/* Alternate section bg */
.border-gold-30 {
  border-color: var(--gold-30) !important;
}

.text-gold {
  color: var(--primary-color) !important;
}

.text-gold-90 {
  color: var(--text-color) !important;
}

.text-gold-80 {
  color: var(--text-color) !important;
}

.text-gold-70 {
  color: var(--text-color) !important;
}

.footer-link {
  color: var(--text-color);
  opacity: 0.8;
}

.footer-link:hover {
  color: var(--primary-color);
  opacity: 1;
}

/* Hero Sections */
.page-hero {
  position: relative;
  background: radial-gradient(circle at 20% -20%, rgba(230, 126, 34, 0.1), transparent),
    radial-gradient(circle at 80% 0%, rgba(230, 126, 34, 0.05), transparent);
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--gold-30);
}

.page-hero.small {
  padding: 4rem 0 2rem;
}

.hero {
  position: relative;
  min-height: 85vh;
  /* Ideally replace bg-temple.jpg or ensure it works with light overlay, currently using color overlay */
  background: url('../img/bg-temple.jpg') center/cover no-repeat fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 250, 242, 0.8), rgba(255, 250, 242, 0.95));
  /* Cream overlay */
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1,
.hero p {
  color: var(--text-color);
}

.hero-portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.2);
}

.hero-portrait-lg {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--primary-color);
  box-shadow: 0 10px 40px rgba(230, 126, 34, 0.3);
  padding: 10px;
  background: white;
}

/* Icons & Lists */
.icon-list {
  list-style: none;
  padding-left: 0;
}

.icon-list li {
  margin: 0.4rem 0;
}

.icon-list i {
  color: var(--primary-color);
  margin-right: .5rem;
}

/* Buttons */
.btn-gold {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.btn-gold:hover {
  background: #d35400;
  color: #fff;
}

.btn-outline-light {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-light:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Cards */
.stat-card {
  background: #fff;
  border: 1px solid var(--gold-30);
  border-radius: 16px;
  padding: 1.4rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(74, 44, 26, 0.05);
}

.stat-card .stat {
  font-size: 1.8rem;
  color: var(--primary-color);
  font-weight: bold;
}

.stat-card p {
  color: var(--text-color);
  margin-bottom: 0;
}

.feature-card,
.feature-card-lg {
  background: #fff;
  border: 1px solid var(--gold-30);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(74, 44, 26, 0.05);
  height: 100%;
}

.feature-card i {
  font-size: 1.4rem;
  margin-bottom: .4rem;
  color: var(--primary-color);
}

.feature-card-lg h5 {
  color: var(--primary-color);
  margin-top: 1rem;
}

/* Pills */
.pill {
  background: rgba(230, 126, 34, 0.1);
  border: 1px solid var(--gold-30);
  border-radius: 999px;
  padding: .55rem .9rem;
  font-size: .92rem;
  display: inline-block;
  color: var(--text-color);
}

/* Timeline */
.timeline {
  position: relative;
  margin-left: 1rem;
}

.timeline:before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--gold-30), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: 6px;
  top: .3rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.15);
}

.timeline-content {
  background: #fff;
  border: 1px solid var(--gold-30);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Award & Gallery */
.award-card {
  background: #fff;
  border: 1px solid var(--gold-30);
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.award-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.award-card .p-3 {
  padding: 1rem;
}

.border-y {
  border-top: 1px solid var(--gold-30);
  border-bottom: 1px solid var(--gold-30);
}

.gallery-grid .card {
  background: transparent;
  border: none;
}

.gallery-grid img {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

.contact-card {
  background: #fff;
  border: 1px solid var(--gold-30);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(74, 44, 26, 0.05);
}

/* Footer */
footer {
  background: #f8f1e5 !important;
  /* Slightly darker cream */
  color: var(--text-color) !important;
}

footer h5 {
  color: var(--primary-color) !important;
}

footer .small {
  color: var(--text-color);
  opacity: 0.8;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  border-radius: 999px;
  border: none;
  background: var(--primary-color);
  color: #fff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: .25s transform, .25s opacity;
  box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 6rem 0 4rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .timeline {
    margin-left: 0.5rem;
  }

  .timeline-item {
    padding-left: 2.5rem;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }
}