/* Modern Glassmorphic Stylesheet for SSMM Public Portal */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=Noto+Serif+Devanagari:wght@600;700;900&family=Yatra+One&family=Rozha+One&family=Tiro+Devanagari+Hindi&display=swap');

:root {
  --primary-saffron: #FF9933;
  --secondary-blue: #003366;
  --accent-gold: #FFD700;
  --maroon-primary: #800020;   /* Royal Deep Maroon */
  --gold-primary: #d4af37;     /* Antique Gold */
  --bg-cream: #faf7f2;         /* Heritage Ivory/Cream */
  --glass-bg: rgba(253, 251, 247, 0.25);
  --glass-border: rgba(255, 255, 255, 0.35);
  --text-dark: #2c2c2c;
  --text-muted: #566573;
  --soft-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
  --inset-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  padding-bottom: 60px;
  background-color: #fdfbf7;
}

h1, h2, h3, h4, .serif-font {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: var(--secondary-blue);
}

/* Glassmorphism Container Utility */
.glass-panel {
  background: #ffffff;
  border: 1px solid #eae3d2;
  box-shadow: var(--soft-shadow);
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 24px;
  transition: var(--transition);
}

.glass-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 153, 51, 0.2);
}

/* Top Bar Styling */

.vertical-socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px; /* Space between icons and donate button */
}

.vertical-socials a {
  color: var(--maroon-primary);
  background: white;
  padding: 8px;
  border-radius: 50%;
  font-size: 16px;
  width: 38px;
  height: 38px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 992px) {
  .vertical-socials a {
    font-size: 24px;
    width: 52px;
    height: 52px;
    padding: 12px;
    border: 1.5px solid var(--gold-primary);
    box-shadow: 0 6px 15px rgba(128, 0, 32, 0.15);
  }
}

.vertical-socials a:hover {
  color: white;
  background: var(--maroon-primary);
  border-color: var(--maroon-primary);
  transform: scale(1.15) translateY(-4px);
  box-shadow: 0 10px 25px rgba(128, 0, 32, 0.4);
}

.btn-donate {
  background: #800020;
  color: #ffffff;
  border: 1.5px solid #d4af37;
  padding: 10px 24px;
  border-radius: 30px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(128, 0, 32, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1.5px;
  position: relative;
  overflow: hidden;
}

.btn-donate::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.btn-donate:hover::before {
  left: 100%;
}

.btn-donate:hover {
  transform: scale(1.06) translateY(-1px);
  box-shadow: 0 8px 25px rgba(230, 126, 34, 0.55), 0 0 10px rgba(255, 215, 0, 0.4);
  filter: brightness(1.05);
}

.btn-donate:active {
  transform: scale(0.98);
}

/* 1. Top Rajasthani Jaali Pattern Bar */
.jaali-top-bar {
  height: 16px;
  width: 100%;
  background-color: var(--maroon-primary);
  background-image: url('assets/rajasthani-jaali.svg');
  background-repeat: repeat-x;
  background-size: auto 16px;
  border-bottom: 1.5px solid var(--gold-primary);
}

/* 2. Main Site Header with Mandala Watermark */
.site-header {
  position: relative;
  background-color: var(--bg-cream);
  padding: 32px 16px 24px 16px;
}

/* Mandala Overlay Effect */
.mandala-left, .mandala-right {
  position: absolute;
  top: -50px;
  width: 420px;
  height: 420px;
  opacity: 0.12;
  pointer-events: none;
  background-image: url('assets/mandala-watermark.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.mandala-left { left: -100px; }
.mandala-right { right: -100px; }

/* 3. Header Flex Wrapper */
.header-brand-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  z-index: 2;
}

/* 4. Logo & Emblem */
.header-logo {
  width: 90px;
  height: 90px;
  border: 2px solid var(--gold-primary);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(128, 0, 32, 0.2);
}

.header-text-wrap {
  text-align: left;
}

/* 5. Elegant Hindi Title Typography */
.header-title-hindi {
  font-family: 'Tiro Devanagari Hindi', 'Rozha One', serif;
  color: var(--maroon-primary);
  font-size: 3.2rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  text-shadow: 0px 2px 4px rgba(212, 175, 55, 0.25);
  letter-spacing: 0.5px;
}

/* 6. Trust Subtitle & Badges */
.header-subtitle {
  color: #555555;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.3px;
}

.header-subtitle span {
  color: var(--maroon-primary);
  font-weight: 700;
}

/* 6. Sticky Contrast Navigation Bar */
.main-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-top: 1px solid #e2d9cc;
  border-bottom: 2px solid var(--gold-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  flex-wrap: wrap;
}

.nav-link {
  color: #333333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 6px 6px 0 0;
  transition: all 0.25s ease;
  border-bottom: 3px solid transparent;
}

.nav-link:hover, .nav-link.active {
  background-color: transparent;
  color: #800020;
  border-bottom: 3px solid #800020;
}

/* Side Decorative Jali Pillars */
@media (min-width: 1200px) {
  .side-pillar-left, .side-pillar-right {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 1000;
    pointer-events: none;
    background-image: url('assets/rajasthani-jaali.svg');
    background-size: 40px;
    background-repeat: repeat-y;
  }
  .side-pillar-left {
    left: 0;
    box-shadow: inset -4px 0 10px rgba(0,0,0,0.05);
  }
  .side-pillar-right {
    right: 0;
    box-shadow: inset 4px 0 10px rgba(0,0,0,0.05);
  }
}

/* Responsive adjustment for Mobile screens */
@media (max-width: 768px) {
  .header-brand-wrap {
    flex-direction: column;
    text-align: center;
  }
  .header-text-wrap {
    text-align: center;
  }
  .header-title-hindi {
    font-size: 1.8rem;
  }
  .header-logo {
    width: 70px;
    height: 70px;
  }
}

/* Section Title */
section {
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 30px;
  border-left: 5px solid var(--primary-saffron);
  padding-left: 15px;
}

.section-header h2 {
  font-size: 28px;
  margin-bottom: 6px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Carousels & Layouts */
.carousel-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
  min-height: 250px;
}

.carousel-card {
  min-width: 300px;
  flex: 1;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.carousel-card img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0,0,0,0.02);
}

.badge-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--secondary-blue);
  color: #fff;
}

.badge-tag.kirtan { background: #e74c3c; }
.badge-tag.paidal { background: #2980b9; }
.badge-tag.bhandara { background: var(--primary-saffron); }
.badge-tag.medical { background: #27ae60; }

/* Grid layout for Trustees */
.trustees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 20px;
  min-height: 200px;
}

.trustee-card {
  text-align: center;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.trustee-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.7);
}

.trustee-card img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid var(--primary-saffron);
  background: #fff;
}

.trustee-card h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.trustee-card p {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

/* Floating Popups */
.floating-popup {
  position: fixed;
  bottom: 24px;
  max-width: 320px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 16px;
  transition: var(--transition);
}


.floating-donate-wrapper {
  position: fixed;
  bottom: 24px;
  right: 32px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

@media (min-width: 1200px) {
  .floating-donate-wrapper {
    right: 80px; /* Shift left to clear side decorative pillars */
  }
}


.floating-popup.left-calendar {
  left: 24px;
}

.floating-popup .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 6px;
}

.floating-popup .popup-header h3 {
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

.floating-popup .popup-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-muted);
}

.floating-popup .popup-content {
  font-size: 13px;
  max-height: 200px;
  overflow-y: auto;
}

/* Calendar Mini Style */
.calendar-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 11px;
}

.calendar-mini-header {
  font-weight: bold;
  color: var(--secondary-blue);
  padding-bottom: 4px;
}

.calendar-day {
  padding: 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.03);
}

.calendar-day.booked {
  background: #e74c3c;
  color: #fff;
  font-weight: bold;
  position: relative;
  cursor: pointer;
}

/* Form Styles */
.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--secondary-blue);
}

.form-group input, .form-group select, .form-group textarea {
  font-family: inherit;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.5);
  outline: none;
  transition: var(--transition);
  font-size: 14px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary-saffron);
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 153, 51, 0.2);
}

.btn-submit {
  background: var(--secondary-blue);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  width: 100%;
}

.btn-submit:hover {
  background: #002244;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 153, 51, 0.2);
}

/* Modal Styling */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 255, 255, 0.1));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid transparent;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  padding: 28px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  color: var(--text-muted);
}

/* Footer Section */
footer.main-footer {
  text-align: center;
  padding: 30px 24px;
  background: var(--secondary-blue);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

footer.main-footer strong {
  color: #fff;
}

/* Mobile-first responsiveness changes */
@media (max-width: 768px) {
  body {
    padding-bottom: 80px; /* Space for sticky donate button */
  }
  
  body.hide-donate-mobile .floating-donate-wrapper .btn-donate.trigger-donation {
    display: none !important;
  }

  header.site-header {
    padding: 16px 12px 12px 12px;
  }
  
  .mandala-left {
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.06;
  }
  
  .mandala-right {
    display: none;
  }
  
  .header-brand-wrap {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .header-text-wrap {
    text-align: center;
  }
  
  .header-logo {
    width: 75px;
    height: 75px;
  }
  
  .header-title-hindi {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 4px;
  }
  
  .header-subtitle {
    font-size: 0.8rem;
    line-height: 1.3;
    max-width: 100%;
    margin: 0 auto;
  }
  
  /* Enable native horizontal swipe for recent events carousels only */
  #recent-events .carousel-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 12px;
  }
  
  #recent-events .carousel-container::-webkit-scrollbar {
    display: none;
  }
  
  #recent-events .carousel-track {
    transform: none !important; 
    gap: 16px;
    padding: 0 16px;
  }
  
  #recent-events .carousel-card {
    scroll-snap-align: center;
    min-width: 280px !important;
    max-width: 85vw;
    flex: 0 0 auto;
  }
  
  #recent-events .carousel-card img {
    max-height: 220px;
  }
  
  nav.main-navbar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px;
    gap: 16px;
    scrollbar-width: none; /* Firefox */
  }
  
  nav.main-navbar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
  
  .nav-link {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 6px 12px;
  }
  
  /* Make Donate Button Full-Width Sticky Footer */
  .floating-donate-wrapper .btn-donate.trigger-donation {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 0 !important;
    z-index: 10000;
    margin: 0 !important;
    text-align: center;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1) !important;
  }

  /* Keep Social Icons where they are but shift them up so donate button doesn't cover them */
  .floating-donate-wrapper {
    bottom: 80px; 
    right: 16px;
    z-index: 9999;
  }


  /* Hide floating elements when donation modal is open */
  body.modal-open .floating-donate-wrapper,
  body.modal-open .floating-donate-wrapper .btn-donate.trigger-donation {
    display: none !important;
  }
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}
.skeleton-card {
  min-width: 300px;
  flex: 1;
  height: 250px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skeleton-box {
  background: #f6f7f8;
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 800px 100%;
  animation-duration: 1.5s;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  animation-name: shimmer;
  animation-timing-function: linear;
  border-radius: 8px;
}
.skeleton-img { width: 100%; height: 150px; }
.skeleton-title { width: 60%; height: 20px; }
.skeleton-text { width: 100%; height: 12px; }
