/* assets/css/style.css */
/* Premium Divine Aesthetic Stylesheet for Arulmigu Ananda Rudratsa Eswarar Dhiyana Peedam */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Mukta+Malar:wght@400;600;700&family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --primary-saffron: hsl(24, 95%, 52%);      /* Vibrant divine saffron */
  --primary-gold: hsl(45, 95%, 50%);         /* Glowing temple gold */
  --divine-crimson: hsl(356, 50%, 15%);      /* Deep spiritual red */
  --dark-bg: hsl(20, 15%, 6%);               /* Near black, rich charcoal */
  --dark-card: rgba(30, 20, 15, 0.75);        /* Translucent glassmorphic card bg */
  --text-light: hsl(45, 40%, 96%);           /* Creamy white for readability */
  --text-muted: hsl(40, 20%, 75%);           /* Golden-grey for subtitles */
  --border-gold: rgba(241, 196, 15, 0.35);    /* Muted gold borders */
  --border-gold-hover: rgba(241, 196, 15, 0.85);
  
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Outfit', sans-serif;
  --font-tamil: 'Mukta Malar', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-gold: 0 4px 20px rgba(241, 196, 15, 0.15);
  --shadow-gold-hover: 0 10px 30px rgba(241, 196, 15, 0.3);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-light);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Set Tamil Font when language is Tamil */
body[lang="ta"] {
  font-family: var(--font-tamil);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--dark-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-saffron);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gold);
}

/* Anchor links */
a {
  color: var(--primary-gold);
  text-decoration: none;
  transition: var(--transition-smooth);
}
a:hover {
  color: var(--primary-saffron);
  text-shadow: 0 0 8px rgba(241, 196, 15, 0.5);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary-gold);
  margin-bottom: 0.5em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}
body[lang="ta"] h1, body[lang="ta"] h2, body[lang="ta"] h3, body[lang="ta"] h4 {
  font-family: var(--font-tamil);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh; /* Make hero full-screen layout */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 8rem 2rem 4rem 2rem; /* padded top to offset the absolute header */
}
/* Overlay gradient */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, var(--dark-bg) 5%, rgba(15, 8, 4, 0.5) 50%, var(--dark-bg) 95%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  background: rgba(30, 10, 5, 0.65);
  backdrop-filter: blur(8px);
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid var(--border-gold);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), var(--shadow-gold);
  animation: fadeIn 1.2s ease-out;
}

.om-symbol {
  font-size: 3rem;
  color: var(--primary-saffron);
  text-shadow: 0 0 15px rgba(224, 83, 0, 0.8);
  margin-bottom: 1rem;
  animation: pulse 3s infinite ease-in-out;
  display: inline-block;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary-gold), var(--primary-saffron));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}
body[lang="ta"] .hero h1 {
  font-size: 2.8rem;
}

.hero-tagline {
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

/* Header & Navbar */
header {
  background: rgba(10, 5, 3, 0.65); /* Made more transparent to blend in hero background */
  border-bottom: 1px solid rgba(241, 196, 15, 0.15);
  position: absolute; /* Set absolute overlay over hero background */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%; /* Wider width to keep menu in a single line */
  margin: 0 auto;
  padding: 0.6rem 3rem;
}

.logo-section a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text h2 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--primary-gold);
}
.logo-text span {
  font-size: 0.75rem;
  color: var(--primary-saffron);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 12px; /* reduced gap to fit cleanly in a single line */
  align-items: center;
}

.nav-menu a {
  font-size: 0.88rem; /* slightly smaller size to prevent line wraps */
  font-weight: 600;
  color: var(--text-light);
  padding: 5px 8px;
  position: relative;
  white-space: nowrap; /* CRITICAL: prevents link text from wrapping */
}

.nav-menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-gold);
  transition: var(--transition-smooth);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.lang-selector {
  display: flex;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border-gold);
}

.lang-btn {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-light);
  transition: var(--transition-smooth);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--primary-saffron), var(--primary-gold));
  color: #000;
  box-shadow: 0 2px 10px rgba(241,196,15,0.3);
}

/* Sections */
.section {
  padding: 5rem 2rem;
  position: relative;
}

.section-dark {
  background-color: var(--dark-bg);
}

.section-alt {
  background: linear-gradient(180deg, var(--dark-bg), var(--divine-crimson), var(--dark-bg));
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 15px;
}
.section-title::after {
  content: '❖';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--primary-gold);
  font-size: 1.2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Cards & Glassmorphism Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 3rem;
}

.card {
  background: var(--dark-card);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-gold);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--primary-saffron), var(--primary-gold));
  opacity: 0;
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-gold-hover);
  border-color: var(--border-gold-hover);
}

.card:hover::before {
  opacity: 1;
}

/* Divine Lists & Icons */
ul.divine-list {
  list-style: none;
}
ul.divine-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 0.8rem;
  color: var(--text-light);
}
ul.divine-list li::before {
  content: '🎴';
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--primary-gold);
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-saffron), var(--primary-gold));
  color: #1a0802;
  box-shadow: 0 4px 15px rgba(224, 83, 0, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-gold), var(--primary-saffron));
  box-shadow: 0 6px 20px rgba(241, 196, 15, 0.5);
  transform: scale(1.03);
  color: #000;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--primary-gold);
  color: var(--primary-gold);
}
.btn-secondary:hover {
  background: rgba(241, 196, 15, 0.1);
  color: var(--text-light);
  border-color: var(--primary-saffron);
}

/* Quick Actions Widget */
.quick-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 2rem;
}

/* Deities Tabs Filter */
.tab-header {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2.5rem;
}

.tab-btn {
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--primary-saffron);
  color: #fff;
  border-color: var(--primary-gold);
  box-shadow: 0 4px 12px rgba(224, 83, 0, 0.4);
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

/* Event Countdown Timer */
.countdown-box {
  background: linear-gradient(135deg, rgba(50, 10, 10, 0.8), rgba(20, 5, 5, 0.8));
  border: 2px solid var(--primary-gold);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  max-width: 700px;
  margin: 3rem auto;
  box-shadow: var(--shadow-gold-hover);
}

.countdown-timer {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
}

.countdown-item {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 1rem;
  min-width: 80px;
}

.countdown-number {
  font-size: 2.5rem;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--primary-gold);
  display: block;
}

.countdown-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* Live YouTube Stream Container */
.live-stream-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid var(--primary-gold);
  box-shadow: var(--shadow-gold-hover);
  margin-bottom: 2rem;
}

.live-stream-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Gallery & Album styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  height: 240px;
  box-shadow: var(--shadow-gold);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  padding: 1.5rem 1rem 1rem 1rem;
  opacity: 0;
  transition: var(--transition-smooth);
  display: flex;
  align-items: flex-end;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay p {
  color: var(--primary-gold);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-gold);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-saffron);
  box-shadow: 0 0 10px rgba(224, 83, 0, 0.4);
}

/* Footer Section */
footer {
  background: #080402;
  border-top: 1px solid var(--border-gold);
  padding: 4rem 2rem 2rem 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto 3rem auto;
}

.footer-brand h3 {
  font-size: 1.4rem;
  color: var(--primary-gold);
  margin-bottom: 1rem;
}

.footer-brand p {
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 1.1rem;
  color: var(--primary-saffron);
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 5px;
}

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

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--primary-gold);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.visitor-stats-panel {
  display: flex;
  gap: 20px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 15px;
  border-radius: 20px;
  border: 1px solid var(--border-gold);
  font-size: 0.8rem;
}

.visitor-stat-item strong {
  color: var(--primary-gold);
}

.dev-credit {
  font-weight: 600;
  font-size: 0.85rem;
}
.dev-credit a {
  color: var(--primary-gold);
  border-bottom: 1px dashed var(--primary-gold);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; text-shadow: 0 0 10px rgba(224, 83, 0, 0.5); }
  50% { transform: scale(1.05); opacity: 1; text-shadow: 0 0 25px rgba(224, 83, 0, 0.9), 0 0 5px var(--primary-gold); }
  100% { transform: scale(1); opacity: 0.9; text-shadow: 0 0 10px rgba(224, 83, 0, 0.5); }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 15px;
  }
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .hero-content {
    padding: 1.5rem;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  body[lang="ta"] .hero h1 {
    font-size: 1.9rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Admin & Members Panel UI Utilities */
.panel-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f0b09;
  border-right: 1px solid var(--border-gold);
  padding: 2rem 1.5rem;
}

.sidebar h3 {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--primary-gold);
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 1rem;
}

.sidebar-menu a {
  display: block;
  padding: 10px 15px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  background: rgba(224, 83, 0, 0.15);
  color: var(--primary-gold);
  border-left: 4px solid var(--primary-saffron);
}

.main-content {
  padding: 3rem;
  background: hsl(20, 10%, 4%);
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid #2ecc71;
  color: #2ecc71;
}

.alert-danger {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

.table-responsive {
  overflow-x: auto;
  margin-top: 1.5rem;
}

table.divine-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

table.divine-table th, table.divine-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(241,196,15,0.15);
}

table.divine-table th {
  background: rgba(224, 83, 0, 0.1);
  color: var(--primary-gold);
  font-family: var(--font-serif);
}

table.divine-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success { background: #2ecc71; color: #000; }
.badge-pending { background: #f1c40f; color: #000; }
.badge-danger { background: #e74c3c; color: #fff; }

@media (max-width: 992px) {
  .panel-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none; /* Add responsive mobile toggler if needed */
  }
}
