/* Exact Matching CSS Refined */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

body.home-page {
    background-color: #f6efe8;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: #3f1d1f;
}

/* HEADER FIXES: Prevent Overlap */
.home-page .main-header {
    background-color: #fff;
    border-bottom: none;
    box-shadow: none;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.home-page .header-content {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    flex: 0 0 auto;
}
.home-page .leadership-row {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 10px 0 0 20px;
    background: transparent;
    display: block; /* changed from flex to block to allow horizontal scrolling smoothly */
    width: auto;
}
.home-page .leadership-inline {
    display: inline-flex;
    gap: 15px;
    justify-content: flex-start;
}
.home-page .leader-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    box-shadow: none;
    padding: 0;
    min-width: 60px;
}
.home-page .leader-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 5px;
    border: 2px solid #a6583d;
}
.home-page .leader-info span {
    font-size: 0.6rem;
    color: #444;
}
.home-page .leader-info p {
    font-size: 0.55rem;
    color: #8c2a33;
    margin: 0;
}
.home-page .header-controls {
    display: none !important;
}

/* BRANDING */
.home-page .brand-section {
    display: flex;
    align-items: center;
}
.home-page .logo-img {
    height: 60px;
    margin-right: 15px;
}
.home-page .brand-text h1.village-name {
    color: #8c2a33;
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0;
}
.home-page .lgd-code {
    color: #666;
    font-size: 0.9rem;
}

/* NavBar */
.home-page .navbar {
    background: #3f1920;
    display: flex;
    justify-content: center;
    padding: 0;
    width: 100%;
    order: 3; /* Puts navbar below the header-content and leadership-row flex items */
}
.home-page .nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}
.home-page .nav-item {
    color: #fff !important;
    text-transform: uppercase;
    font-weight: 600;
    text-decoration: none;
    padding: 15px 5px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    display: inline-block;
}
.home-page .nav-item.active {
    border-bottom: 3px solid #ffcc00;
}

/* EXACT TEMPLATE GLOBALS */
.exact-template {
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: hidden;
}

/* HERO SECTION */
.exact-hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    background: url("assets/gramsabha.jpeg") center/cover no-repeat;
    display: flex;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}
.exact-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.2) 100%);
    z-index: 1;
}

.exact-hero-section > * {
    position: relative;
    z-index: 2;
}

.hero-left-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-left: 2%;
}
.hero-left-card h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #222;
    line-height: 1.1;
    margin: 15px 0;
}
.hero-left-card p.hero-subtitle {
    color: #444;
    font-size: 1rem;
    margin-bottom: 25px;
    font-weight: 500;
}
.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.hero-buttons .btn-primary {
    background-color: #bd8619;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}
.hero-buttons .btn-secondary {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border: 1px solid #bd8619;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.hero-bottom-stats {
    position: absolute;
    bottom: 20px;
    right: 40px;
    display: flex;
    gap: 15px;
    z-index: 10;
}
.stat-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.6);
}
.stat-icon-wrapper {
    background: #fde8dd;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon-wrapper svg { fill: #d55a29; }
.heart-wrapper { background: #eed8d3; color: #b54932; font-size: 1.4rem; }
.stat-text .stat-sub { font-size: 0.8rem; color: #444; display: block; font-weight: 500;}
.stat-nums { font-size: 1.6rem; color: #222; font-weight: 800; display:flex; align-items:center; gap:8px; }
.stat-text strong { font-size: 1.2rem; font-weight: 800; color: #222; }

/* ALERTS SECTION */
.exact-alerts-section {
    padding: 60px 40px 30px;
}
.section-heading {
    font-size: 1.6rem;
    font-weight: 900;
    color: #2e1d35;
    margin-bottom: 20px;
}
.alerts-banner {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 15px;
    background: url("assets/vishesh upakram (1).jpeg") center/cover no-repeat;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 40px;
}
.alerts-overlay-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
}
.alerts-icon { font-size: 2rem; }
.alerts-sub { font-size: 0.8rem; color: #666; display: block; }
.alerts-main { font-size: 1.2rem; color: #222; font-weight: 800; }

/* POPULATION SECTION */
.exact-population-section {
    padding: 20px 40px 40px;
}
.pop-header-title {
    text-align: center;
    margin-bottom: 5px;
}
.pop-header-title h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2e1d35;
    margin: 0;
}
.section-subheading { text-align: center; color: #666; font-size: 0.9rem; margin-bottom: 30px; }
.exact-pop-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.exact-pop-table th {
    background: #3f1920;
    color: #fff;
    font-weight: 600;
    padding: 15px;
    text-align: center;
    font-size: 0.85rem;
}
.exact-pop-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #f9f5f0;
    font-size: 0.95rem;
    color: #444;
}

/* SCHEMES GRID - EXACT MATCH PASTEL CARDS */
.exact-schemes-section {
    padding: 20px 40px 60px;
}
.schemes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.scheme-card {
    border-radius: 15px;
    padding: 0;
    text-align: center;
    color: #333;
    position: relative;
    overflow: hidden;
    min-height: 250px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.scheme-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: cover;
    background-position: center;
}
.brown-grad::before { background-image: url("assets/vishesh upakram (4).jpeg"); filter: brightness(0.9); }
.purple-grad::before { background-image: url("assets/shala.jpeg"); filter: brightness(0.9); }
.blue-grad::before { background-image: url("assets/vishesh upakram (2).jpeg"); filter: brightness(0.9); }
.green-grad::before { background-image: url("assets/shada (1).jpeg"); filter: brightness(0.9); }

.scheme-card-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 30px 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.brown-grad .scheme-card-inner { background: linear-gradient(135deg, rgba(238, 207, 187, 0.85) 0%, rgba(223, 195, 178, 0.95) 100%); }
.purple-grad .scheme-card-inner { background: linear-gradient(135deg, rgba(209, 191, 228, 0.85) 0%, rgba(194, 177, 214, 0.95) 100%); }
.blue-grad .scheme-card-inner { background: linear-gradient(135deg, rgba(203, 235, 237, 0.85) 0%, rgba(188, 207, 210, 0.95) 100%); }
.green-grad .scheme-card-inner { background: linear-gradient(135deg, rgba(216, 229, 198, 0.85) 0%, rgba(200, 213, 182, 0.95) 100%); }

.scheme-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.scheme-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 800;
    color: #222;
}
.scheme-card p {
    font-size: 0.75rem;
    margin: 0 0 30px;
    flex-grow: 1;
    color: #444;
    line-height: 1.4;
    font-weight: 500;
}
.scheme-date {
    background: #3f1920;
    color: #fff;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* VIEW ALL BUTTON */
.view-all-container { text-align: center; }
.view-all-btn {
    background: #fdf5ea;
    color: #3f1d1f;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: pointer;
}

.bottom-scenic-banner {
    position: relative;
    width: 100%;
    height: 150px;
    background: url("assets/grampanchayat office.jpeg") center/contain no-repeat;
    background-color: transparent;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px 40px;
    box-sizing: border-box;
    margin-top: 20px;
}
.bottom-scenic-banner > * {
    position: relative;
    z-index: 2;
}
.goto-top-btn {
    background: #fdf5ea;
    color: #3f1d1f;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .schemes-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-bottom-stats {
        position: relative; right: auto; bottom: auto; margin-top: 30px; flex-direction: column;
    }
}
@media (max-width: 768px) {
    .schemes-grid { grid-template-columns: 1fr; }
    .exact-hero-section { padding: 20px; }
    .alerts-overlay-card { right: 20px; left: 20px; text-align: center; }
    .home-page .leadership-row { padding-left: 0; }
}
