/* ============================================================
   LACHHARSAR VILLAGE PORTAL — Complete Public CSS
   Includes: Theme variables, Layout, Sections, Dynamic content
   ============================================================ */

/* ============================================================
   ROOT VARIABLES — Theme customizable (admin se)
   ============================================================ */
:root {
  --primary: #0c2340;
  --primary-light: #1e3a5f;
  --accent: #ff9933;
  --accent-dark: #e07e1a;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
  --radius: 16px;
  --transition: all 0.28s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 60px;
  padding: 0.75rem 1.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(255, 153, 51, 0.35);
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
  text-align: center;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(255, 153, 51, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 60px;
  padding: 0.7rem 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 60px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s;
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
}

/* ============================================================
   HERO (Home page)
   ============================================================ */
.hero {
  background: linear-gradient(145deg, var(--bg-alt) 0%, var(--bg) 100%);
  padding: 3rem 1.25rem 4rem;
}

.hero-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  background: rgba(255, 153, 51, 0.15);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border-radius: 40px;
  margin-bottom: 1rem;
}

.hero-name {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.stat-box {
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border-top: 3px solid var(--accent);
}

.stat-box strong {
  display: block;
  font-size: 1.5rem;
  color: var(--primary);
}

.stat-box span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-img {
  width: 100%;
  max-width: 500px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--accent);
  object-fit: cover;
  max-height: 500px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 4rem 1.25rem;
}

.section-alt {
  background: var(--bg-alt);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 4px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 4px;
}

/* ============================================================
   DYNAMIC SECTIONS — Common (About, Panchayat, Contact, Home)
   ============================================================ */
.about-section-block {
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem 2rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--accent);
  transition: all 0.25s ease;
  scroll-margin-top: 90px;
}

.about-section-block:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.about-section-block h2 {
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Hashtag highlight animation */
.home-dynamic-section.highlighted,
.about-section-block.highlighted {
  animation: sectionHighlight 2s ease;
}

@keyframes sectionHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 153, 51, 0.8),
                0 4px 14px rgba(0, 0, 0, 0.06);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(255, 153, 51, 0),
                0 4px 14px rgba(0, 0, 0, 0.06);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 153, 51, 0),
                0 4px 14px rgba(0, 0, 0, 0.06);
  }
}

/* ============================================================
   TABLE TYPE
   ============================================================ */
.dyn-table {
  width: 100%;
  border-collapse: collapse;
}

.dyn-table tr {
  border-bottom: 1px dashed var(--border);
}

.dyn-table tr:last-child {
  border-bottom: none;
}

.dyn-table td {
  padding: 0.85rem 0.5rem;
  font-size: 0.95rem;
  vertical-align: top;
}

.dyn-table td:first-child {
  color: var(--text-muted);
  font-weight: 600;
  width: 40%;
}

.dyn-table td:last-child {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   LIST TYPE
   ============================================================ */
.dyn-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dyn-list li {
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dyn-list li:last-child {
  border-bottom: none;
}

.dyn-list li strong {
  color: var(--primary);
  font-weight: 700;
}

.dyn-list li span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   CARDS TYPE
   ============================================================ */
.dyn-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.dyn-card {
  background: linear-gradient(135deg, #fff8ee, #ffe8cc);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  border-left: 4px solid var(--accent);
  transition: all 0.25s ease;
}

.dyn-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.dyn-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.dyn-card h4 {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 0.35rem 0;
}

.dyn-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* ============================================================
   HTML TYPE
   ============================================================ */
.dyn-html {
  line-height: 1.8;
  color: var(--text);
}

.dyn-html iframe {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  display: block;
  border: none;
}

.dyn-html img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.dyn-html a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}

/* ============================================================
   LOADING BOX
   ============================================================ */
.loading-box {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================
   INFO GRID (Home Quick Info)
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.info-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--accent);
  transition: var(--transition);
  text-align: center;
}

.info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.info-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.info-card h4 {
  color: var(--primary);
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 1rem;
}

.info-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   ABOUT PAGE — Info Table (static blocks)
   ============================================================ */
.about-block {
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--accent);
}

.about-block h2 {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.about-block h3 {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px dashed var(--border);
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table td {
  padding: 0.7rem 0.5rem;
  font-size: 0.95rem;
}

.info-table td:first-child {
  color: var(--text-muted);
  font-weight: 600;
  width: 45%;
}

.info-table td:last-child {
  color: var(--primary);
  font-weight: 600;
}

.nearby-list {
  list-style: none;
  padding: 0;
}

.nearby-list li {
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text);
}

.nearby-list li:last-child {
  border-bottom: none;
}

.nearby-list strong {
  color: var(--primary);
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  padding: 1.5rem 0.75rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
  display: block;
  text-decoration: none;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.contact-card .icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.contact-card h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  word-break: break-word;
}

/* Map */
.map-container {
  margin-top: 2rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-container iframe {
  display: block;
  width: 100%;
  border: none;
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-container {
  max-width: 900px !important;
}

.legal-updated {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  font-style: italic;
}

.legal-content {
  background: #fff;
  border-radius: 16px;
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow-sm);
  line-height: 1.8;
}

.legal-content h2 {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.legal-content ul {
  margin: 0.75rem 0 1.25rem 1.5rem;
  color: var(--text);
}

.legal-content ul li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.legal-content strong {
  color: var(--primary);
  font-weight: 700;
}

.legal-note {
  background: rgba(255, 153, 51, 0.1);
  padding: 1rem;
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  margin-top: 2rem;
  font-size: 0.9rem !important;
  color: var(--text-muted) !important;
}

.disclaimer-alert {
  background: #fef3c7;
  border-left: 5px solid #f59e0b;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  color: #78350f;
  font-size: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--primary);
  color: #cbd5e1;
  text-align: center;
  padding: 2.5rem 1rem;
}

.footer-content p {
  margin: 0.35rem 0;
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.35rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-name {
    font-size: 2.5rem;
  }
  .hero-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  /* Navbar */
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    z-index: 999;
    box-shadow: var(--shadow-md);
  }
  .hamburger {
    display: block;
  }

  /* Typography */
  .section-title {
    font-size: 1.6rem;
  }

  /* Hero */
  .hero {
    padding: 2rem 1rem 3rem;
  }

  /* Info table */
  .info-table td:first-child {
    width: 50%;
    font-size: 0.85rem;
  }
  .info-table td:last-child {
    font-size: 0.85rem;
  }

  /* Legal */
  .legal-content {
    padding: 1.5rem 1.25rem;
  }
  .legal-content h2 {
    font-size: 1.1rem;
  }
  .legal-content p,
  .legal-content ul li {
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {
  .about-section-block {
    padding: 1.35rem 1.25rem;
  }
  .about-section-block h2 {
    font-size: 1.1rem;
  }
  .dyn-table td:first-child {
    width: 50%;
    font-size: 0.85rem;
  }
  .dyn-table td:last-child {
    font-size: 0.85rem;
  }
  .dyn-cards {
    grid-template-columns: 1fr;
  }
  .dyn-card {
    padding: 1rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .gallery-caption {
    font-size: 0.75rem;
    padding: 1.25rem 0.5rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2rem;
  }
  .section {
    padding: 2.5rem 1rem;
  }
  .stat-box {
    padding: 0.75rem 1rem;
  }
  .stat-box strong {
    font-size: 1.2rem;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mt-2 {
  margin-top: 2rem;
}