/* ============================================================
   PUJA VIDHI WEBSITE — STYLE.CSS
   Palette: Sandalwood cream, earthy terracotta, antique gold
   ============================================================ */

/* ---- Google Fonts Fallback ---- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Devanagari:wght@400;500;600;700&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
  --cream:          #f5ead8;
  --parchment:      #ede0c4;
  --parchment-dark: #d9c9a3;
  --gold:           #b8860b;
  --gold-light:     #d4a827;
  --gold-bright:    #e8c44a;
  --terracotta:     #a0432c;
  --terracotta-dk:  #7a2e18;
  --terracotta-lt:  #c4614a;
  --brown:          #5c3a1e;
  --brown-lt:       #7d5233;
  --text-main:      #3b2410;
  --text-muted:     #6b4c2a;
  --text-gold:      #8b6914;
  --border-gold:    #c9a227;
  --shadow-warm:    rgba(90, 40, 10, 0.18);
  --font-devanagari: 'Noto Serif Devanagari', 'Tiro Devanagari Hindi', serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-devanagari);
  background-color: var(--cream);
  color: var(--text-main);
  line-height: 1.8;
  font-size: 17px;
  background-image:
    radial-gradient(ellipse at top, rgba(184,134,11,0.06) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23b8860b' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Sacred Banner (top strip) ---- */
.sacred-banner {
  background: linear-gradient(90deg, var(--terracotta-dk), var(--terracotta), var(--terracotta-dk));
  color: var(--gold-bright);
  text-align: center;
  padding: 7px 20px;
  font-size: 15px;
  letter-spacing: 0.08em;
  font-weight: 600;
  border-bottom: 2px solid var(--gold);
}

.sanskrit-mantra {
  display: inline-block;
  animation: shimmer 4s ease-in-out infinite alternate;
}

@keyframes shimmer {
  from { color: var(--gold-bright); }
  to   { color: #fff8e1; }
}

/* ---- Site Header ---- */
.site-header {
  background: linear-gradient(180deg, var(--terracotta-dk) 0%, var(--terracotta) 50%, var(--brown) 100%);
  padding: 36px 20px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4a827' fill-opacity='0.06'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.om-image {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  box-shadow: 0 0 20px rgba(212,168,39,0.4);
  transition: box-shadow 0.3s ease;
}

.om-image:hover {
  box-shadow: 0 0 32px rgba(212,168,39,0.7);
}

.header-om-right {
  opacity: 0.85;
}

.header-text {
  flex: 1;
  max-width: 500px;
}

.site-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 20px rgba(212,168,39,0.3);
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.site-subtitle {
  color: var(--parchment);
  font-size: 1rem;
  letter-spacing: 0.05em;
  font-style: italic;
  opacity: 0.9;
}

.header-divider {
  margin-top: 24px;
}

.divider-img {
  width: 100%;
  height: 55px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.divider-flip {
  transform: scaleY(-1);
}

/* ---- Navigation ---- */
.puja-nav {
  background: var(--parchment-dark);
  border-bottom: 2px solid var(--border-gold);
  border-top: 2px solid var(--border-gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px var(--shadow-warm);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  padding: 0;
  margin: 0;
}

.nav-item {
  padding: 14px 28px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown);
  transition: background 0.25s, color 0.25s;
  position: relative;
  border-right: 1px solid rgba(184,134,11,0.25);
  letter-spacing: 0.02em;
}

.nav-item:last-child {
  border-right: none;
}

.nav-item .nav-icon {
  color: var(--gold);
  font-size: 0.85em;
  margin: 0 4px;
}

.nav-item:hover {
  background: rgba(184,134,11,0.12);
  color: var(--terracotta);
}

.nav-item.active {
  background: linear-gradient(180deg, rgba(160,67,44,0.12), rgba(184,134,11,0.08));
  color: var(--terracotta);
  border-bottom: 3px solid var(--terracotta);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--terracotta);
}

/* ---- Main Content ---- */
.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* ---- Puja Page ---- */
.puja-page {
  display: none;
  animation: fadeIn 0.4s ease;
}

.puja-page.active {
  display: block;
}

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

/* ---- Puja Page Header ---- */
.puja-page-header {
  text-align: center;
  margin-bottom: 36px;
  padding: 28px 24px 20px;
  background: linear-gradient(135deg, rgba(160,67,44,0.08), rgba(184,134,11,0.06));
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  position: relative;
}

.puja-page-header::before,
.puja-page-header::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.2rem;
  opacity: 0.5;
}

.puja-page-header::before { left: 16px; }
.puja-page-header::after  { right: 16px; }

.puja-page-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--terracotta);
  line-height: 1.25;
  margin-bottom: 8px;
}

.puja-page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
}

/* ---- Gold Separator ---- */
.gold-sep {
  text-align: center;
  margin: 20px 0;
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.3em;
  user-select: none;
}

.gold-sep::before,
.gold-sep::after {
  content: '─────';
  color: var(--parchment-dark);
  font-size: 0.9em;
  margin: 0 8px;
}

/* ---- Samagri Box ---- */
.samagri-box {
  background: linear-gradient(135deg, rgba(237,224,196,0.7), rgba(213,191,145,0.5));
  border: 1px solid var(--border-gold);
  border-left: 5px solid var(--gold);
  border-radius: 4px;
  padding: 22px 26px;
  margin-bottom: 32px;
}

.samagri-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-gold);
}

.samagri-list {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 24px;
}

.samagri-list li {
  padding: 3px 0 3px 20px;
  position: relative;
  color: var(--text-main);
  font-size: 0.95rem;
  break-inside: avoid;
}

.samagri-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.6em;
  top: 7px;
}

/* ---- Section Block ---- */
.puja-section {
  margin-bottom: 36px;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--terracotta-dk);
  margin-bottom: 12px;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(160,67,44,0.12), transparent);
  border-left: 4px solid var(--terracotta);
  border-radius: 0 4px 4px 0;
}

.section-number {
  display: inline-block;
  width: 30px;
  height: 30px;
  background: var(--terracotta);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  font-size: 0.85rem;
  margin-right: 10px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ---- Mantra Block ---- */
.mantra-block {
  background: linear-gradient(135deg, rgba(92,58,30,0.06), rgba(184,134,11,0.05));
  border: 1px solid var(--border-gold);
  border-top: 3px solid var(--gold);
  border-radius: 4px;
  padding: 18px 24px;
  margin: 14px 0;
  position: relative;
}

.mantra-block::before {
  content: '||';
  position: absolute;
  top: -1px;
  left: 16px;
  background: var(--cream);
  padding: 0 6px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  transform: translateY(-50%);
}

.mantra-text {
  font-size: 1.05rem;
  color: var(--brown);
  line-height: 2;
  font-weight: 500;
}

.mantra-meaning {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--parchment-dark);
}

/* ---- Instruction Block ---- */
.instruction {
  background: var(--parchment);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 10px 0;
  color: var(--text-main);
  border-left: 3px solid var(--parchment-dark);
  font-size: 0.97rem;
  line-height: 1.85;
}

.instruction.highlight {
  background: rgba(160,67,44,0.07);
  border-left-color: var(--terracotta-lt);
}

/* ---- Upchara (Ritual Step) Cards ---- */
.upchara-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.upchara-card {
  background: var(--parchment);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 16px;
  position: relative;
  transition: box-shadow 0.25s, transform 0.25s;
}

.upchara-card:hover {
  box-shadow: 0 4px 16px var(--shadow-warm);
  transform: translateY(-2px);
}

.upchara-num {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(184,134,11,0.18);
  line-height: 1;
  user-select: none;
}

.upchara-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 6px;
}

.upchara-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.upchara-mantra {
  font-size: 0.88rem;
  color: var(--brown-lt);
  font-style: italic;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--parchment-dark);
}

/* ---- Prose paragraph ---- */
.puja-para {
  margin: 10px 0;
  color: var(--text-main);
  line-height: 1.95;
  font-size: 0.97rem;
}

/* ---- Inline note ---- */
.note {
  display: block;
  background: rgba(184,134,11,0.08);
  border: 1px dashed var(--border-gold);
  border-radius: 4px;
  padding: 10px 16px;
  margin: 12px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---- Footer ---- */
.site-footer {
  background: linear-gradient(0deg, var(--terracotta-dk) 0%, var(--terracotta) 40%, var(--brown) 100%);
  color: var(--parchment);
  text-align: center;
  padding: 0 20px 32px;
}

.footer-divider {
  margin-bottom: 24px;
}

.footer-mandala {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-mandala-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  opacity: 0.85;
  box-shadow: 0 0 24px rgba(212,168,39,0.35);
}

.footer-text {
  font-size: 1rem;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(237,224,196,0.6);
  letter-spacing: 0.04em;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }

  .om-image {
    width: 65px;
    height: 65px;
  }

  .header-om-right {
    display: none;
  }

  .samagri-list {
    columns: 1;
  }

  .nav-item {
    padding: 12px 16px;
    font-size: 0.92rem;
  }

  .upchara-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .puja-page-header::before,
  .puja-page-header::after { display: none; }
}

/* ================================================================
   GURUJI NOTE — warm, authoritative instructional voice
   ================================================================ */
.guruji-note {
  background: linear-gradient(135deg, rgba(160,67,44,0.07), rgba(184,134,11,0.06));
  border: 1px solid rgba(184,134,11,0.3);
  border-left: 5px solid var(--terracotta-lt);
  border-radius: 0 6px 6px 0;
  padding: 14px 18px 14px 14px;
  margin: 12px 0;
  color: var(--brown);
  font-size: 0.96rem;
  line-height: 1.85;
  position: relative;
  font-style: italic;
}

.guruji-note--sm {
  padding: 10px 14px 10px 12px;
  margin: 8px 0;
  font-size: 0.88rem;
}

.guruji-icon {
  color: var(--terracotta);
  font-weight: 700;
  font-style: normal;
  margin-right: 6px;
  font-size: 0.9em;
}

/* ================================================================
   SUB-HEADING
   ================================================================ */
.sub-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--terracotta-dk);
  margin: 20px 0 8px;
  padding-left: 10px;
  border-left: 2px solid var(--gold);
  font-style: normal;
}

/* ================================================================
   ORDERED STEPS LIST
   ================================================================ */
.steps-list {
  padding-left: 0;
  list-style: none;
  counter-reset: steps;
  margin: 12px 0;
}

.steps-list li {
  counter-increment: steps;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--parchment-dark);
  color: var(--text-main);
  font-size: 0.96rem;
  line-height: 1.8;
}

.steps-list li:last-child {
  border-bottom: none;
}

.steps-list li::before {
  content: counter(steps);
  min-width: 28px;
  height: 28px;
  background: var(--terracotta);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
  font-style: normal;
}

/* ================================================================
   UPCHARA — FULL-WIDTH SEQUENTIAL CARDS
   ================================================================ */
.upchara-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.upchara-card-full {
  background: var(--parchment);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.upchara-card-full:hover {
  box-shadow: 0 4px 20px var(--shadow-warm);
}

.upchara-card-header {
  background: linear-gradient(90deg, var(--terracotta-dk), var(--terracotta));
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.upchara-num-badge {
  background: rgba(255,255,255,0.2);
  color: var(--gold-bright);
  font-size: 1rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  min-width: 40px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.upchara-name-label {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.upchara-card-full .guruji-note {
  margin: 12px 16px 0;
  border-radius: 4px;
}

.upchara-card-full .mantra-block {
  margin: 10px 16px;
}

.upchara-action {
  background: rgba(184,134,11,0.08);
  border-top: 1px dashed var(--parchment-dark);
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-arrow {
  color: var(--terracotta-lt);
  font-size: 0.75rem;
}

/* ================================================================
   PATRI (21 LEAVES) GRID
   ================================================================ */
.patri-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 12px;
}

.patri-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr;
  align-items: center;
  gap: 0;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(184,134,11,0.15);
  transition: background 0.2s;
}

.patri-row:last-child {
  border-bottom: none;
}

.patri-row:nth-child(odd) {
  background: var(--parchment);
}

.patri-row:nth-child(even) {
  background: rgba(237,224,196,0.4);
}

.patri-row:hover {
  background: rgba(160,67,44,0.07);
}

.patri-num {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.95rem;
  text-align: center;
}

.patri-name {
  font-weight: 600;
  color: var(--terracotta-dk);
  font-size: 0.95rem;
  padding: 0 8px;
}

.patri-leaf {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-style: italic;
}

/* ================================================================
   AARTI BLOCK
   ================================================================ */
.aarti-block {
  background: linear-gradient(135deg, rgba(92,58,30,0.05), rgba(184,134,11,0.04));
  border: 1px solid var(--border-gold);
  border-top: 4px solid var(--gold);
  border-radius: 6px;
  padding: 24px;
  margin: 12px 0;
}

.aarti-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--terracotta);
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--parchment-dark);
  letter-spacing: 0.04em;
}

.aarti-dhrupad {
  background: linear-gradient(90deg, rgba(160,67,44,0.12), rgba(184,134,11,0.10), rgba(160,67,44,0.12));
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 12px 18px;
  text-align: center;
  font-weight: 700;
  color: var(--terracotta-dk);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.aarti-verse {
  padding: 12px 0;
  line-height: 2;
  color: var(--brown);
  font-size: 0.97rem;
  border-bottom: 1px dashed var(--parchment-dark);
}

.aarti-verse:last-of-type {
  border-bottom: none;
}

.aarti-dhrupad-ref {
  text-align: center;
  color: var(--gold);
  font-size: 0.82rem;
  font-style: italic;
  padding: 4px 0 10px;
  letter-spacing: 0.05em;
}

/* ================================================================
   RESPONSIVE ADDITIONS
   ================================================================ */
@media (max-width: 600px) {
  .patri-row {
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
  }

  .patri-leaf {
    grid-column: 2;
    font-size: 0.82rem;
    padding-top: 2px;
  }

  .upchara-card-header {
    flex-wrap: wrap;
  }
}
