/* =============================================
   DIVYA MANGALAM – Global Stylesheet
   Calm, Devotional Design
   ============================================= */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --saffron:   #FF6F00;
  --gold:      #D4A017;
  --deep-red:  #8B0000;
  --cream:     #FFF8EF;
  --light-bg:  #FFF3E0;
  --text-dark: #2C1A0E;
  --text-mid:  #5C3D1E;
  --white:     #FFFFFF;
  --shadow:    rgba(44, 26, 14, 0.15);
  --radius:    12px;
  --transition: 0.3s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---- Om symbol spinner ---- */
#page-loader {
  position: fixed; inset: 0;
  background: var(--deep-red);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
#page-loader .om {
  font-size: 5rem; color: var(--gold);
  animation: spin-om 2s linear infinite;
}
@keyframes spin-om {
  0%   { transform: scale(1) rotate(0deg); }
  50%  { transform: scale(1.2) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

/* ==================  NAVBAR  ================== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--deep-red);
  box-shadow: 0 2px 12px var(--shadow);
}
.nav-inner {
  max-width: 1100px; margin: auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
}
.nav-brand .brand-om { font-size: 1.8rem; color: var(--gold); }
.nav-brand .brand-name {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 1.3rem;
  letter-spacing: 1px;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--cream);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--gold);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }

/* ==================  HERO  ================== */
.hero {
  position: relative; overflow: hidden;
  min-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(139,0,0,0.82) 0%, rgba(212,160,23,0.55) 100%),
    url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1400&q=80') center/cover no-repeat;
  color: var(--white);
  padding: 4rem 1.5rem;
}
.hero-content { max-width: 800px; }
.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid var(--gold);
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--gold);
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--text-dark);
}
.btn-primary:hover { background: var(--saffron); color: var(--white); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--deep-red); transform: translateY(-2px); }

/* ==================  SECTIONS  ================== */
section { padding: 5rem 1.5rem; }
.section-inner { max-width: 1100px; margin: auto; }
.section-label {
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--saffron);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--deep-red);
  margin-bottom: 1rem;
}
.section-subtitle {
  color: var(--text-mid);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 3rem;
}
.divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--saffron));
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

/* ==================  VIRTUAL DARSHAN  ================== */
.darshan-section { background: var(--white); }
.darshan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.darshan-viewer {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow);
  aspect-ratio: 4/5;
  background: linear-gradient(180deg, #1a0000 0%, #3d0000 100%);
  cursor: pointer;
}
.darshan-viewer img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.darshan-viewer:hover img { transform: scale(1.04); }
.darshan-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(139,0,0,0.6) 0%, transparent 60%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding: 2rem;
  color: var(--white);
}
.darshan-overlay h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.darshan-overlay p { font-size: 0.9rem; opacity: 0.85; }
.darshan-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(212,160,23,0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow-pulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.3); }
}
.darshan-info { }
.darshan-info .section-label { margin-bottom: 0.5rem; }
.timing-list { display: flex; flex-direction: column; gap: 1rem; margin: 2rem 0; }
.timing-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--light-bg);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--gold);
}
.timing-item .time { font-weight: 700; color: var(--deep-red); min-width: 100px; }
.timing-item .puja { color: var(--text-mid); font-size: 0.95rem; }

/* ==================  ARCHANA FORM  ================== */
.archana-section { background: var(--light-bg); }
.archana-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 10px 50px var(--shadow);
  overflow: hidden;
  max-width: 850px;
  margin: 0 auto;
}
.archana-header {
  background: linear-gradient(135deg, var(--deep-red), #5c0000);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--white);
}
.archana-header .om-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.archana-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
}
.archana-header p { opacity: 0.85; font-size: 0.95rem; margin-top: 0.5rem; }
.archana-body { padding: 2.5rem 2rem; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.5px;
}
.form-group label span { color: var(--saffron); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid #e0cbb5;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--cream);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.2);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.checkbox-group {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin-top: 0.3rem;
}
.checkbox-group label {
  display: flex; align-items: center; gap: 6px;
  font-weight: 400; font-size: 0.9rem;
  cursor: pointer; color: var(--text-dark);
}
.checkbox-group input[type=checkbox] { accent-color: var(--deep-red); width: 16px; height: 16px; }
.form-submit {
  display: flex; justify-content: center;
  margin-top: 2rem;
}
.btn-submit {
  background: linear-gradient(135deg, var(--deep-red), var(--saffron));
  color: var(--white);
  padding: 1rem 3rem;
  font-size: 1.05rem;
  border-radius: 50px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  border: none;
  box-shadow: 0 6px 25px rgba(139,0,0,0.35);
  transition: var(--transition);
}
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 10px 35px rgba(139,0,0,0.45); }
.btn-submit:active { transform: translateY(0); }

/* ==================  SUCCESS BANNER  ================== */
#archana-success {
  display: none;
  background: linear-gradient(135deg, var(--deep-red), #5c0000);
  color: var(--white);
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 850px;
  margin: 0 auto;
  box-shadow: 0 10px 50px var(--shadow);
}
#archana-success .success-om { font-size: 4rem; animation: glow-pulse 3s ease-in-out infinite; }
#archana-success h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin: 1rem 0 0.5rem;
  color: var(--gold);
}
#archana-success p { opacity: 0.9; font-size: 1rem; line-height: 1.7; }
#archana-success .devotee-name { font-size: 1.5rem; font-weight: 700; color: var(--gold); margin: 1rem 0; }
#archana-success .shloka {
  font-style: italic;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1.5rem;
  opacity: 0.85;
}

/* ==================  VIRTUAL DARSHAN MODAL  ================== */
.darshan-modal {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.92);
  align-items: center; justify-content: center;
  padding: 1.5rem;
}
.darshan-modal.open { display: flex; }
.modal-inner {
  background: #1a0000;
  border-radius: 20px;
  max-width: 700px; width: 100%;
  overflow: hidden;
  animation: modal-in 0.4s ease;
  border: 1px solid var(--gold);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-top {
  background: linear-gradient(135deg, var(--deep-red), #3d0000);
  padding: 1.2rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--white);
}
.modal-top h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; }
.modal-close {
  background: rgba(255,255,255,0.15);
  border: none; color: var(--white);
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--white); color: var(--deep-red); }
.modal-darshan-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.modal-mantra {
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--cream);
}
.modal-mantra .mantra-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.modal-mantra p { font-size: 0.9rem; opacity: 0.75; }
.mantra-ticker {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  margin-top: 1rem;
}
.lamp-anim {
  font-size: 2rem;
  animation: lamp 1.5s ease-in-out infinite alternate;
  display: inline-block;
}
@keyframes lamp { from { opacity: 0.6; } to { opacity: 1; transform: scale(1.15); } }

/* ==================  FEATURES / SERVICES  ================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
  transition: var(--transition);
  border-top: 3px solid transparent;
}
.service-card:hover {
  transform: translateY(-6px);
  border-top-color: var(--gold);
  box-shadow: 0 12px 40px var(--shadow);
}
.service-icon { font-size: 2.8rem; margin-bottom: 1rem; }
.service-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--deep-red);
  margin-bottom: 0.5rem;
}
.service-card p { font-size: 0.9rem; color: var(--text-mid); line-height: 1.6; }

/* ==================  GALLERY / DARSHAN SLIDER  ================== */
.gallery-section { background: var(--white); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--shadow);
  transition: var(--transition);
}
.gallery-item:hover { transform: scale(1.03); }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ==================  TICKER  ================== */
.ticker-bar {
  background: var(--deep-red);
  color: var(--white);
  padding: 0.7rem 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-bar .ticker-inner {
  display: inline-block;
  animation: ticker 35s linear infinite;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}
@keyframes ticker {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

/* ==================  FOOTER  ================== */
footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.75);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1100px; margin: auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .brand-om { font-size: 2.5rem; color: var(--gold); }
.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 1.3rem;
  margin: 0.5rem 0;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 {
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a { font-size: 0.9rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  max-width: 1100px; margin: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  font-size: 0.85rem;
}
.footer-bottom .om-footer { color: var(--gold); font-size: 1.2rem; }

/* ==================  ABOUT PAGE  ================== */
.page-hero {
  background: linear-gradient(160deg, var(--deep-red) 0%, #5c1a00 100%);
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.75rem;
}
.page-hero p { font-size: 1.1rem; opacity: 0.85; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow);
}
.about-img-wrap img { width: 100%; height: 400px; object-fit: cover; }
.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.value-card {
  background: var(--light-bg);
  border-radius: 10px;
  padding: 1.2rem;
  border-left: 3px solid var(--gold);
}
.value-card h4 { color: var(--deep-red); margin-bottom: 0.3rem; }
.value-card p { font-size: 0.88rem; color: var(--text-mid); }

/* ==================  CONTACT PAGE  ================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}
.contact-info { }
.contact-item {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-item .icon {
  width: 44px; height: 44px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-item .info h4 { color: var(--deep-red); margin-bottom: 0.2rem; }
.contact-item .info p { font-size: 0.9rem; color: var(--text-mid); }
.contact-form-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 50px var(--shadow);
}
.contact-form .form-group + .form-group { margin-top: 1.2rem; }

/* ==================  RESPONSIVE  ================== */
@media (max-width: 900px) {
  .darshan-grid, .about-grid, .contact-grid, .footer-inner { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--deep-red); padding: 1.5rem; gap: 1rem; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
}
