/**
 * Shree Vardhman Sthanakwasi Jain Sangh, Borivali West
 * Main Stylesheet - Divine Jain Theme
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Noto+Sans+Gujarati:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
  --primary: #b45309;
  --primary-dark: #78350f;
  --primary-light: #f59e0b;
  --gold: #d97706;
  --gold-glow: #fbbf24;
  --gold-light: #fef3c7;
  --gold-border: #fde68a;
  --maroon: #991b1b;
  --maroon-dark: #7f1d1d;
  --saffron: #ea580c;
  
  --bg-page: #fbf9f5;
  --bg-card: #ffffff;
  --bg-subtle: #f7f3eb;
  
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-gold: #92400e;
  
  --border-light: #f0e6d6;
  --border-subtle: #e5e7eb;
  
  --shadow-sm: 0 1px 3px rgba(180, 83, 9, 0.08);
  --shadow-md: 0 4px 14px -2px rgba(180, 83, 9, 0.12);
  --shadow-lg: 0 12px 28px -4px rgba(180, 83, 9, 0.16);
  --shadow-glow: 0 0 20px rgba(217, 119, 6, 0.25);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-heading: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', 'Noto Sans Gujarati', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-gujarati: 'Noto Sans Gujarati', 'Noto Sans Devanagari', 'Plus Jakarta Sans', sans-serif;
  --font-hindi: 'Noto Sans Devanagari', 'Noto Sans Gujarati', 'Plus Jakarta Sans', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Top Divine Bar */
.top-divine-bar {
  background: linear-gradient(90deg, #78350f 0%, #991b1b 50%, #78350f 100%);
  color: #fef3c7;
  font-size: 0.82rem;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(254, 243, 199, 0.2);
  gap: 12px;
}

.top-mantra {
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.mantra-text {
  color: #fef08a;
  font-weight: 700;
}

.top-contact {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-contact a {
  color: #fef3c7;
  text-decoration: none;
  transition: opacity 0.2s;
}

.top-contact a:hover {
  text-decoration: underline;
}

/* Language Switcher Styling on Top Bar */
.lang-switch-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(253, 230, 138, 0.45);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.lang-switch-box .lang-label {
  color: #fde68a;
  font-weight: 700;
  font-size: 0.76rem;
}

.lang-btn {
  color: #fef3c7;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.lang-btn.active {
  background: #f59e0b;
  color: #78350f !important;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.lang-divider {
  color: rgba(254, 243, 199, 0.4);
  font-size: 0.75rem;
}

/* Language Switcher in Main Header */
.header-lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.lang-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 16px;
  transition: all 0.2s;
}

.lang-tag:hover {
  color: var(--maroon);
}

.lang-tag.active {
  background: var(--primary);
  color: #ffffff !important;
}

/* Main Header */
.main-header {
  background: #ffffff;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-bottom: 2px solid #fed7aa;
}

.header-container {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.sangh-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.brand-emblem {
  width: 54px;
  height: 64px;
  flex-shrink: 0;
}

.brand-info h1 {
  font-family: var(--font-heading), var(--font-gujarati);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

.brand-info .sub-title {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.brand-info .tagline {
  font-size: 0.8rem;
  color: var(--maroon);
  font-family: var(--font-gujarati), var(--font-hindi);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Primary Navbar - Single Word, No Wrap */
.primary-nav {
  background: linear-gradient(135deg, #78350f 0%, #b45309 60%, #d97706 100%);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.2);
}

.nav-container {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  flex-wrap: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
}

.nav-links li {
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links a {
  display: inline-block;
  color: #fffaf0;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
  padding: 13px 14px;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  white-space: nowrap !important;
  letter-spacing: 0.3px;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fef08a;
  border-bottom-color: #fef08a;
}

.nav-member-btn {
  background: #ffffff;
  color: var(--maroon) !important;
  border-radius: var(--radius-full);
  padding: 8px 18px !important;
  margin: 4px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-member-btn:hover {
  background: #fef3c7 !important;
  color: var(--maroon-dark) !important;
  transform: translateY(-1px);
}

.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  padding: 10px;
  cursor: pointer;
}

/* Layout Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-py {
  padding: 50px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.section-badge {
  display: inline-block;
  background: var(--gold-light);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  border: 1px solid var(--gold-border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 680px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gold-border);
}

.card-gold-border {
  border-top: 4px solid var(--gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.35);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

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

.btn-maroon {
  background: linear-gradient(135deg, var(--maroon) 0%, #b91c1c 100%);
  color: #fff;
}

.btn-maroon:hover {
  opacity: 0.92;
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* Panchang & Tithi Widget */
.panchang-widget {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fff7ed 100%);
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.panchang-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #f59e0b;
  padding-bottom: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.panchang-tithi-highlight {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--maroon);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panchang-samvat-badge {
  background: #ffffff;
  border: 1px solid #f59e0b;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.pachkhan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.pachkhan-item {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}

.pachkhan-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pachkhan-time {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 2px;
}

/* Navkar Mantra Card */
.navkar-box {
  background: #ffffff;
  border: 2px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
}

.navkar-lines {
  font-family: var(--font-hindi);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.8;
  margin: 16px 0;
}

.navkar-meaning {
  background: #fdfaf5;
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  line-height: 1.6;
}

/* Form Styles */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s;
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th {
  background: #fdf8f0;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-light);
  text-align: left;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
  color: var(--text-main);
}

.table tr:hover td {
  background: #fffcf7;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-gold { background: var(--gold-light); color: var(--primary-dark); }
.badge-maroon { background: #fee2e2; color: var(--maroon); }
.badge-green { background: #d1fae5; color: #065f46; }

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alert-success { background: #ecfdf5; color: #065f46; border-left: 4px solid #10b981; }
.alert-error, .alert-danger { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.alert-info { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }

/* Footer */
.main-footer {
  background: #1c1917;
  color: #d6d3d1;
  padding-top: 50px;
  border-top: 4px solid var(--gold);
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 30px;
}

.footer-col h4 {
  color: #fef3c7;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--gold);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #a8a29e;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fef08a;
}

.footer-bottom {
  background: #0c0a09;
  padding: 16px;
  text-align: center;
  font-size: 0.82rem;
  color: #78716c;
}

.footer-bottom a {
  color: #d6d3d1;
}

/* Lightbox Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  max-width: 800px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  background: #fdf8f0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* Responsive */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) and (min-width: 769px) {
  .nav-links a {
    font-size: 0.88rem;
    padding: 13px 8px;
  }
  .nav-member-btn {
    padding: 7px 12px !important;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 12px 0;
    gap: 0;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-mobile-toggle {
    display: block;
  }
  .top-divine-bar {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 8px 12px;
  }
  .top-mantra, .top-contact {
    flex-wrap: wrap;
    justify-content: center;
  }
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* Live Instant Member Search Dropdown */
.live-search-dropdown {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.16) !important;
  border: 1.5px solid #fed7aa !important;
  animation: fadeInDown 0.2s ease-out;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #fef3c7;
}

.live-search-dropdown::-webkit-scrollbar {
  width: 6px;
}

.live-search-dropdown::-webkit-scrollbar-thumb {
  background-color: #f59e0b;
  border-radius: 4px;
}

.live-search-item {
  transition: all 0.18s ease;
}

.live-search-item:hover {
  background-color: #fefce8 !important;
  transform: translateX(2px);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

