/* सामान्य आणि फॉन्ट सेटिंग्ज */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #004d99; /* गडद निळा (Grampanchayat Blue) */
  --secondary-color: #4caf50; /* गवताचा हिरवा (Development Green) */
  --accent-color: #ff9800; /* चमकदार केशरी (Highlight Orange) */
  --light-bg: #e3f2fd; /* खूप हलका निळा */
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f7f6;
  /* 📌 स्थिर हेडरमुळे कंटेट लपणार नाही यासाठी मार्जिन */
  padding-top: 85px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

h1,
h2,
h3 {
  font-weight: 600;
}

/* बटणे */
.btn-main {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-main:hover {
  background-color: #388e3c;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* -------------------- हेडर (Fixed) -------------------- */
header {
  /* 📌 स्थिर (Fixed) नेव्हिगेशनसाठी */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100; /* नेहमी वर दिसावे */

  background: linear-gradient(#5ec5ce, #162a84);
  background-size: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  color: white;
  font-size: 2em;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  margin-left: 25px;
  font-size: 1.05em;
  transition: color 0.3s ease;
  padding: 5px 0;
}

.nav-menu a:hover {
  color: var(--accent-color);
}

.hamburger {
  display: none;
  font-size: 1.5em;
  color: white;
  cursor: pointer;
}

/* सूचना बार (Ticker Tape) */
.ticker-tape {
  background-color: #59a1bb;
  color: white;
  padding: 5px 0;
  font-weight: 500;
  font-size: 0.9em;
}

/* -------------------- ड्रॉपडाउन मेनू -------------------- */
.dropdown {
  position: relative;
  display: inline-block;
  margin-left: 25px;
}

.dropdown:hover > .dropbtn {
  color: var(--accent-color);
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--primary-color);
  min-width: 180px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 10;
  border-top: 3px solid var(--accent-color);
  border-radius: 0 0 5px 5px;
  overflow: hidden;
}

.dropdown-content a {
  color: white !important;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  margin-left: 0;
  font-size: 1em;
}

.dropdown-content a:hover {
  background-color: #003366;
  color: var(--accent-color) !important;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropbtn i {
  margin-left: 5px;
  font-size: 0.8em;
}

/* -------------------- मुख्य पृष्ठ घटक (Home Components) -------------------- */

.hero-section {
  background: linear-gradient(rgb(94 197 206 / 75%), rgb(22 42 132 / 75%)),
    url(https://via.placeholder.com/1500x500/004D99/FFFFFF?text=Grampanchayat+Nerpinglai);
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 100px 20px;
  border-radius: 0 0 15px 15px;
  margin-bottom: 50px;
}
.hero-content h1 {
  font-size: 3em;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.hero-content p {
  font-size: 1.2em;
  margin-bottom: 30px;
}

/* क्विक ॲक्सेस कार्ड्स */
.quick-access {
  margin-top: -80px;
  margin-bottom: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  z-index: 10;
  position: relative;
}

.quick-access .card {
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 4px solid var(--accent-color);
}

.quick-access .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.icon-blue {
  color: var(--primary-color);
}
.icon-green {
  color: var(--secondary-color);
}
.icon-orange {
  color: var(--accent-color);
}

.quick-access .card i {
  font-size: 3em;
  margin-bottom: 15px;
  transition: color 0.3s;
}
.quick-access .card:hover i {
  color: var(--primary-color);
}
.quick-access .card h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

/* 4. Content Overlay (Title and Description) */

.slide-content {
  position: absolute; /* Puts the content over the image */
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px;

  /* Styling the transparent background for readability */
  background-color: rgb(0 0 0 / 67%);
  color: white;
  text-align: center;
}

/* 5. Title and Description Specifics */
.slide-title {
  font-size: 2em;
  margin-top: 0;
}

.slide-description {
  font-size: 1.1em;
}

/* सामान्य विभाग स्टाइल */
.page-content {
  padding: 60px 20px;
  min-height: 70vh;
}

.page-content h2 {
  color: var(--primary-color);
  font-size: 2.5em;
  margin-bottom: 30px;
  border-bottom: 3px solid var(--accent-color);
  display: inline-block;
  padding-bottom: 10px;
}

/* ग्रामपंचायतीबद्दल विभाग */
.about-gp {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 50px;
}

/* आकडेवारी विभाग */
.stats-section {
  background-color: #5e98c2;
  padding: 50px 20px;
  text-align: center;
  margin-bottom: 50px;
  border-radius: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.stat-item {
  padding: 20px;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stat-item i {
  font-size: 2.5em;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.stat-number {
  display: block;
  font-size: 3em;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
}

/* गॅलरी सेक्शन */
.gallery-section {
  background-color: white;
  margin-bottom: 50px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 1. मुख्य ग्रिड कंटेनर */
.gallery-grid {
  display: grid;
  /* 3 कॉलम का ग्रिड सेट करें */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

/* 2. प्रत्येक इमेज/कैप्शन कंटेनर */
.grid-item {
  position: relative; /* <-- यह सबसे महत्वपूर्ण है! नाम (figcaption) को absolute करेगा */
  overflow: hidden;
  margin: 0; /* figure टैग का डिफ़ॉल्ट मार्जिन हटाएँ */
  border-radius: 8px; /* यदि आप कोनों को गोल करना चाहते हैं */
}

/* 3. इमेज स्टाइलिंग */
.grid-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* इमेज को कंटेनर में फिट करें */
}
.grid-item img:hover {
  transform: scale(1.05);
  transition: transform 0.4s ease;
}

/* 4. इमेज का नाम/कैप्शन (ओवरले) */
.image-name {
  position: absolute; /* <-- यह नाम को इमेज के ऊपर रखेगा */
  bottom: 0; /* नाम को नीचे से शुरू करें */
  left: 0;
  width: 100%;

  /* नाम के बैकग्राउंड की स्टाइल */
  background-color: rgba(0, 0, 0, 0.7); /* ट्रांसपेरेंट काला */
  color: white;
  padding: 10px 15px;
  text-align: center;
  font-size: 1em;
  font-weight: bold;
  transform: translateY(100%); /* शुरू में नाम को छुपाएँ */
  transition: transform 0.3s ease-in-out;
}
.grid-item:hover .image-name {
  transform: translateY(0);
}

/* -------------------- योजना/सेवा पृष्ठे -------------------- */

/* योजना/सेवा सूची स्टाइल */
.scheme-list,
.service-list {
  list-style: none;
  padding: 0;
}

.scheme-list li,
.service-list li {
  background-color: white;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 6px solid var(--secondary-color);
  transition: box-shadow 0.3s;
}
.scheme-list li:hover,
.service-list li:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.scheme-list li h3 {
  color: var(--secondary-color);
  margin-bottom: 5px;
  font-size: 1.4em;
}

.scheme-list li p {
  margin-top: 5px;
  font-size: 1em;
  color: #555;
}

/* संपर्क विभाग (Contact Page) */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.contact-card {
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  border-top: 5px solid var(--primary-color);
}

.contact-card i {
  font-size: 3em;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.contact-card h3 {
  margin-bottom: 10px;
  font-size: 1.5em;
}

.contact-card p {
  margin-bottom: 5px;
}

/* -------------------- फुटर (Footer) -------------------- */

footer {
  background-color: #1a1a1a;
  color: white;
  padding-top: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 30px;
  border-bottom: 1px solid #333;
}

.footer-info,
.footer-links,
.footer-hours {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
}
.footer-info p,
.footer-links p,
.footer-hours p {
  margin-bottom: 0;
}

.footer-info h4,
.footer-links h4,
.footer-hours h4 {
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 10px;
  margin-bottom: 15px;
  font-size: 1.2rem;
  font-weight: bold;
}

.footer-links a {
  display: block;
  color: #ccc;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding: 15px 0;
  font-size: 0.9em;
  background-color: #111;
}

/* -------------------- मोबाईल प्रतिसाद (Media Queries) -------------------- */
@media (max-width: 900px) {
  .hero-content h1 {
    font-size: 2em; /* 2.5em वरून 2em केले */
  }
  .quick-access .card {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 110px; /* सूचना बारसह अधिक उंची */
  }

  .nav-bar {
    padding: 10px 0;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px; /* हेडरच्या खाली */
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
  }

  .dropdown {
    display: block;
    margin-left: 0;
    width: 100%;
  }

  .dropdown-content {
    position: static;
    /* display: block; */
    background-color: #003366;
    box-shadow: none;
    width: 100%;
    border-radius: 0;
  }

  .dropdown-content a {
    padding-left: 40px; /* उप-विषयांसाठी इंडेंट */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .hamburger {
    display: block;
  }
  .ticker-tape {
    font-size: 0.8em;
  }

  .hero-content h1 {
    font-size: 2em;
  }
  .quick-access {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .stat-number {
    font-size: 2em;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    justify-content: center;
    text-align: center;
  }
  .footer-info,
  .footer-links,
  .footer-hours {
    min-width: 100%;
  }
}

/* छुपेलेले पृष्ठ (SPA साठी) */
.page-section.hidden {
  display: none;
}
