/* ===================== DESIGN TOKENS ===================== */
:root {
  --kaavi: #7b1b1b;
  --kaavi-dark: #4e0e0e;
  --kaavi-light: #a83232;
  --gold: #c9a84c;
  --gold-light: #e8d08a;
  --cream: #fdf6e3;
  --cream-dark: #f2e8cc;
  --ink: #1c1008;
  --ink-mid: #3d2b1a;
  --shadow: rgba(28, 16, 8, 0.18);
  --white: #ffffff;

  --font-head: "Cinzel", serif;
  --font-deva: "Tiro Devanagari Marathi", serif;
  --font-body: "EB Garamond", serif;

  --transition: 0.35s ease;
  --radius: 6px;
}

/* ===================== RESET ===================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ===================== LANGUAGE SWITCH ===================== */
body.lang-mr .en {
  display: none !important;
}
body.lang-en .mr {
  display: none !important;
}
body.lang-mr .mr {
  display: revert !important;
}
body.lang-en .en {
  display: revert !important;
}

/* ===================== DECORATIVE BORDER STRIP ===================== */
.border-strip {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--kaavi) 0px,
    var(--kaavi) 18px,
    var(--gold) 18px,
    var(--gold) 24px
  );
}

/* ===================== NAVBAR ===================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--kaavi-dark);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  height: 62px;
  gap: 12px;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
}

.nav-logo .logo-en {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.nav-logo .logo-mr {
  font-family: var(--font-deva);
  font-size: 1.4rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
  flex-wrap: wrap;
}

/* changed later*/
.nav-links li a .mr {
  font-size: 1.3rem;
}

.mobile-nav,
.open,
.mr {
  font-size: 1.2rem;
}
/*-----*/
.nav-links li a {
  display: block;
  padding: 6px 13px;
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--cream);
  text-decoration: none;
  border-radius: 3px;
  transition:
    background var(--transition),
    color var(--transition);
  text-transform: uppercase;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: var(--gold);
  color: var(--kaavi-dark);
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 3px;
  gap: 2px;
  border: 1px solid rgba(201, 168, 76, 0.4);
  flex-shrink: 0;
}

.lang-toggle button {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  padding: 5px 13px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
  background: transparent;
  color: var(--cream-dark);
}

.lang-toggle button.active-lang {
  background: var(--gold);
  color: var(--kaavi-dark);
  font-weight: 700;
}
/*changed later*/
#btn-mr {
  font-size: 0.9rem;
}
/*------------------*/
/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--kaavi-dark);
  padding: 12px 4% 18px;
  border-top: 1px solid rgba(201, 168, 76, 0.2);
}

.mobile-nav a {
  font-family: var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: #ffffff !important;
  text-decoration: none;
  padding: 13px 8px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.18);
  text-transform: uppercase;
  display: block;
  background: var(--kaavi-light);
  width: 100vw;
  text-align: center;
}

.mobile-nav a:hover {
  color: var(--gold-light) !important;
  background: rgba(255, 255, 255, 0.05);
  padding-left: 16px;
  transition: all 0.2s ease;
}

.mobile-nav a:last-child {
  border-bottom: none;
}
.mobile-nav.open {
  display: flex;
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  height: 92vh;
  min-height: 520px;
  overflow: hidden;
  background-color: var(--kaavi-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("temple.webp");
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.04);
  animation: heroZoom 18s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.1) translateX(-1%);
  }
}

/* Gradient overlays */
.hero-overlay-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 4, 2, 0.1) 0%,
    rgba(10, 4, 2, 0.05) 40%,
    rgba(10, 4, 2, 0.65) 78%,
    rgba(10, 4, 2, 0.9) 100%
  );
}

.hero-overlay-right {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 0%,
    transparent 38%,
    rgba(78, 14, 14, 0.72) 68%,
    rgba(78, 14, 14, 0.92) 100%
  );
}

/* Deity name block — RIGHT side */
.hero-deity {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  text-align: right;
  max-width: 340px;
  animation: fadeSlideLeft 1.2s 0.3s both ease;
}

@keyframes fadeSlideLeft {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.hero-deity .om {
  font-family: var(--font-deva);
  font-size: 2.6rem;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
  text-shadow: 0 0 20px rgba(201, 168, 76, 0.7);
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    text-shadow: 0 0 18px rgba(201, 168, 76, 0.6);
  }
  50% {
    text-shadow:
      0 0 36px rgba(201, 168, 76, 1),
      0 0 60px rgba(201, 168, 76, 0.4);
  }
}

.hero-deity h1.en {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 5.8vw, 2.9rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.hero-deity h1.mr {
  font-family: var(--font-deva);
  font-size: clamp(1.8rem, 4.8vw, 3.1rem);
  color: var(--white);
  line-height: 1.2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.hero-deity .hero-sub {
  display: block;
  margin-top: 10px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  text-transform: uppercase;
  opacity: 0.9;
}

.hero-deity .hero-sub.mr {
  font-family: var(--font-deva);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: none;
}

.hero-deity .divider-gold {
  height: 2px;
  width: 80px;
  background: linear-gradient(to left, transparent, var(--gold));
  margin: 14px 0 14px auto;
}

.hero-deity .timings {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  text-align: right;
}

.hero-deity .timings .mr {
  font-family: var(--font-deva);
  font-size: 0.85rem;
}

/* Bottom hero strip */
.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 22px 5%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-bottom .scroll-cue {
  font-family: var(--font-head);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.scroll-cue::after {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

/* ===================== SECTION WRAPPERS ===================== */
.section-wrap {
  padding: 72px 7%;
}

.section-wrap:nth-child(even) {
  background: var(--white);
}

/* Decorative top rule for sections */
.section-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.section-rule::before,
.section-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light));
}

.section-rule::after {
  background: linear-gradient(to left, transparent, var(--gold-light));
}

.section-rule span {
  font-family: var(--font-deva);
  font-size: 1.4rem;
  color: var(--gold);
}

/* Section heading style */
.sec-title {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--kaavi);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  line-height: 1.2;
}

.sec-title.mr {
  font-family: var(--font-deva);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.sec-subtitle {
  font-size: 0.88rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  font-family: var(--font-head);
  margin-bottom: 28px;
  display: block;
}

.sec-subtitle.mr {
  font-family: var(--font-deva);
  text-transform: none;
  letter-spacing: 0.05em;
}

.kaavi-bar {
  width: 52px;
  height: 3px;
  background: var(--kaavi);
  margin-bottom: 32px;
  border-radius: 2px;
}

/* ===================== ABOUT / WELCOME ===================== */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.welcome-text p {
  margin-bottom: 16px;
  font-size: 1.06rem;
  color: var(--ink-mid);
}

.welcome-text p.mr {
  font-family: var(--font-deva);
  font-size: 1.1rem;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pill {
  background: var(--cream-dark);
  border: 1px solid var(--gold-light);
  border-radius: 30px;
  padding: 6px 16px;
  font-size: 0.83rem;
  color: var(--kaavi-dark);
  font-family: var(--font-head);
  letter-spacing: 0.04em;
}

.pill.mr {
  font-family: var(--font-deva);
  font-size: 0.9rem;
}

.welcome-img-block {
  position: relative;
}

.welcome-img-block img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.welcome-img-block::before {
  content: "";
  position: absolute;
  inset: -10px -10px 10px 10px;
  border: 2px solid var(--gold-light);
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0.6;
}

/* ===================== HISTORY ===================== */
.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 20px;
  padding-bottom: 36px;
  position: relative;
}

.timeline-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 4px;
}

.timeline-dot .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--kaavi);
  flex-shrink: 0;
}

.timeline-dot .line {
  flex: 1;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold-light), transparent);
  min-height: 40px;
}

.timeline-item:last-child .timeline-dot .line {
  display: none;
}

.timeline-content h3.en {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--kaavi);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.timeline-content h3.mr {
  font-family: var(--font-deva);
  font-size: 1.1rem;
  color: var(--kaavi);
  margin-bottom: 8px;
}

.timeline-content p {
  color: var(--ink-mid);
  font-size: 1rem;
}

.timeline-content p.mr {
  font-family: var(--font-deva);
  font-size: 1.05rem;
}

/* ===================== FESTIVALS ===================== */
.festival-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 12px;
}

.festival-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 22px var(--shadow);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
  border-top: 4px solid var(--kaavi);
}

.festival-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px var(--shadow);
}

.festival-card-img {
  width: 100%;
  height: 210px;
  object-fit: fill;
  display: block;
}

.festival-card-body {
  padding: 24px;
}

.festival-card-body h3.en {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--kaavi);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.festival-card-body h3.mr {
  font-family: var(--font-deva);
  font-size: 1.2rem;
  color: var(--kaavi);
  margin-bottom: 10px;
}

.festival-card-body p {
  font-size: 0.96rem;
  color: var(--ink-mid);
  line-height: 1.7;
}

.festival-card-body p.mr {
  font-family: var(--font-deva);
  font-size: 1rem;
}

/* ===================== GALLERY ===================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 220px 220px;
  gap: 10px;
}

.gallery-grid figure {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
  cursor: pointer;
  background: var(--kaavi-dark);
}

.gallery-grid figure:nth-child(1) {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.gallery-grid figure:nth-child(5) {
  grid-column: 3 / 5;
}

.gallery-grid figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
  filter: brightness(0.92) saturate(0.95);
}

.gallery-grid figure:hover img {
  transform: scale(1.07);
  filter: brightness(1) saturate(1.1);
}

.gallery-grid figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
  color: var(--cream);
  padding: 22px 12px 10px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  font-family: var(--font-head);
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-grid figure:hover figcaption {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2.2rem;
  color: var(--cream);
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  background: none;
  border: none;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ===================== COMMITTEE ===================== */
.committee-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: 0 4px 22px var(--shadow);
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  min-width: 360px;
}

table.admin-table thead tr {
  background: var(--kaavi);
  color: var(--white);
}

table.admin-table th {
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 20px;
  text-align: left;
}

table.admin-table th.mr {
  font-family: var(--font-deva);
  text-transform: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

table.admin-table td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--cream-dark);
  color: var(--ink-mid);
}

table.admin-table td.mr {
  font-family: var(--font-deva);
  font-size: 1.05rem;
}

table.admin-table tbody tr:hover {
  background: var(--cream);
}

table.admin-table tbody tr:last-child td {
  border-bottom: none;
}

/* ===================== CONTACT ===================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 36px;
  align-items: start;
}

.contact-info-card {
  background: var(--kaavi);
  border-radius: var(--radius);
  padding: 34px;
  color: var(--cream);
}

.contact-info-card h3.en {
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
}

.contact-info-card h3.mr {
  font-family: var(--font-deva);
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 18px;
}

.contact-detail {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.85;
}

.contact-detail p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.contact-detail p.mr {
  font-family: var(--font-deva);
  font-size: 1rem;
}

.contact-detail .label {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  display: block;
  margin-bottom: 3px;
}

.contact-detail .label.mr {
  font-family: var(--font-deva);
  text-transform: none;
  font-size: 0.8rem;
}

.map-wrap iframe {
  width: 100%;
  height: 370px;
  border-radius: var(--radius);
  border: 0;
  display: block;
  box-shadow: 0 4px 22px var(--shadow);
}

/* ===================== FOOTER ===================== */
footer {
  background: var(--kaavi-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 36px 7% 24px;
  text-align: center;
}

footer .footer-name.en {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--gold-light);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

footer .footer-name.mr {
  font-family: var(--font-deva);
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

footer .footer-loc {
  font-size: 0.85rem;
  margin-bottom: 20px;
}

footer .footer-divider {
  height: 1px;
  background: rgba(201, 168, 76, 0.2);
  margin: 20px auto;
  max-width: 320px;
}

footer .footer-copy {
  font-size: 0.78rem;
  opacity: 0.5;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .welcome-grid,
  .festival-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px 200px 200px;
  }

  .gallery-grid figure:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
  }

  .gallery-grid figure:nth-child(5) {
    grid-column: auto;
  }

  .welcome-img-block {
    order: -1;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }

  .hero {
    height: 80vh;
  }

  .hero-overlay-right {
    background: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(78, 14, 14, 0.72) 55%,
      rgba(78, 14, 14, 0.9) 100%
    );
  }

  .hero-deity {
    top: auto;
    bottom: 80px;
    right: 5%;
    transform: none;
    max-width: 88%;
    animation: fadeSlideUp 1s 0.3s both ease;
  }

  @keyframes fadeSlideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .section-wrap {
    padding: 52px 5%;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}
