/* ========================================
   PROFESSIONAL GOVERNMENT WEBSITE DESIGN
   Color Scheme: Soft Decent Colors - Warm Neutrals & Earth Tones
   Professional with Soft, Calming Colors
   ======================================== */

:root {
    /* === PRIMARY PALETTE (Soft & Decent) === */
    --primary-cream: #FAF9F6;
    --primary-beige: #F5F5F0;
    --primary-peach: #FFFBF7;
    --primary-sand: #F2F0EB;

    /* === ACCENT COLORS (Muted) === */
    --accent-warm: #E6E2D8;
    --accent-soft-beige: #F0EFE9;
    --accent-taupe: #C8C2BC;
    --accent-ivory: #FCFCFA;

    /* === NAVIGATION & DARK ACCENTS (Deep Green) === */
    --nav-dark-green: #3A4A3E;
    --nav-hover-green: #4B5E50;
    --dark-olive: #334036;
    --dark-forest: #2A362D;

    /* === SECONDARY ACCENTS === */
    --accent-gold: #C5A059;
    --accent-bronze: #A68B5B;

    /* === NEUTRAL TONES === */
    --text-primary: #333333;
    --text-secondary: #555555;
    --bg-white: #FFFFFF;
    --bg-cream: #FAF9F6;
    --bg-soft: #F4F4F4;

    /* === SOFT GRADIENTS === */
    --gradient-warm: linear-gradient(135deg, #FAF9F6 0%, #F5F5F0 100%);
    --gradient-peach: linear-gradient(135deg, #FFFBF7 0%, #F2F0EB 100%);
    --gradient-neutral: linear-gradient(135deg, #FAF9F6 0%, #F4F4F4 100%);
    --gradient-green: linear-gradient(135deg, #3A4A3E 0%, #2A362D 100%);

    /* === SUBTLE SHADOWS === */
    --shadow-xs: 0 1px 3px rgba(74, 93, 78, 0.08);
    --shadow-sm: 0 2px 8px rgba(74, 93, 78, 0.12);
    --shadow-md: 0 4px 16px rgba(74, 93, 78, 0.15);
    --shadow-lg: 0 8px 32px rgba(74, 93, 78, 0.18);
    --shadow-xl: 0 16px 48px rgba(74, 93, 78, 0.22);

    /* === BORDER RADIUS === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* === FONTS === */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* === SPACING === */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-cream);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* === SITE WRAPPER WITH DECORATIVE ELEMENTS === */
.site-wrapper {
    position: relative;
    overflow: hidden;
}

/* === MAIN CONTENT CONTAINER - SPACING FIX === */
.main-container {
    padding-top: 1rem;
    /* Adjusted from 280px since header is relative */
    min-height: 100vh;
}

/* === LEADERSHIP SECTION STYLING === */
.leadership-wrapper,
.leadership-container,
.leadership-row {
    background: linear-gradient(to right, #FAF9F6, #FFF8E1) !important;
    /* Warm Cream Gradient */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.content-wrapper {
    padding-top: 1rem;
    padding-bottom: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Mobile spacing adjustments */
@media (max-width: 768px) {
    .main-container {
        padding-top: 1rem;
        /* Adjusted from 480px */
    }

    .content-wrapper {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* === ANIMATED BACKGROUND ORBS === */
.decorative-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
    animation: float-orb 25s ease-in-out infinite;
}

.decorative-orb-1 {
    width: 700px;
    height: 700px;
    background: var(--gradient-warm);
    top: -250px;
    right: -250px;
    animation-delay: 0s;
}

.decorative-orb-2 {
    width: 600px;
    height: 600px;
    background: var(--gradient-peach);
    bottom: -200px;
    left: -200px;
    animation-delay: 8s;
}

.decorative-orb-3 {
    width: 500px;
    height: 500px;
    background: var(--gradient-neutral);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 16s;
}

@keyframes float-orb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(40px, -40px) scale(1.05);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.95);
    }
}

.pattern-overlay {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(168, 149, 128, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(232, 168, 124, 0.02) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(74, 93, 78, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(201, 169, 97, 0.3);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce-subtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* === ANIMATION UTILITIES === */
.animate-fade-up {
    animation: fadeInUp 0.8s ease-out both;
}

.animate-zoom {
    animation: scaleIn 0.8s ease-out both;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out both;
}

/* ========================================
   HEADER SECTION
   ======================================== */
/* HEADER SCROLL FIX: Header scrolls away, Navbar stays */
.main-header {
    position: relative;
    /* Was fixed */
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: none;
    /* Navbar has border */
}

.main-header.scrolled {
    padding: 0.3rem 0;
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--accent-soft-peach);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 10;
}

/* === BRAND SECTION === */
.brand-section {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    animation: fadeInLeft 0.8s ease-out;
}

.logo-container {
    position: relative;
    width: 75px;
    height: 75px;
    background: var(--gradient-neutral);
    border-radius: var(--radius-full);
    padding: 4px;
    box-shadow: var(--shadow-md);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.logo-container::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: var(--gradient-neutral);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: pulse-glow 3s infinite;
}

.logo-container:hover {
    transform: rotate(360deg) scale(1.15);
    box-shadow: var(--shadow-xl);
}

.logo-container:hover::before {
    opacity: 0.4;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-full);
    background: white;
    padding: 10px;
}

/* Fix Scheme Icons in Revenue Page */
.scheme-icon-small {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
    color: var(--nav-dark-green);
}

.service-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.village-name {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--nav-dark-green), var(--dark-olive));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.8px;
    line-height: 1.5;
    /* Increased from 1.1 to prevent clipping in Marathi/Hindi */
    padding: 5px 0;
    /* Added padding to prevent vertical clipping */
    display: block;
    /* Ensure box model works correctly */
    position: relative;
}

.lgd-code {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.6px;
}

/* === HEADER CONTROLS === */
.header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: fadeInRight 0.8s ease-out;
}

.seal-container {
    position: relative;
}

.seal-img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 16px rgba(74, 93, 78, 0.3));
    transition: all 0.5s ease;
    animation: bounce-subtle 3s ease-in-out infinite;
}

.seal-img:hover {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 8px 24px rgba(74, 93, 78, 0.5));
}

.lang-selector select {
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--accent-warm);
    border-radius: var(--radius-full);
    background: white;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: var(--shadow-xs);
}

.lang-selector select:hover,
.lang-selector select:focus {
    background: var(--primary-cream);
    color: var(--text-primary);
    border-color: var(--nav-dark-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.6rem;
    transition: all 0.3s ease;
}

.mobile-nav-toggle:hover {
    transform: scale(1.1);
}

.mobile-nav-toggle .bar {
    width: 30px;
    height: 3px;
    background: var(--gradient-warm);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ========================================
   NAVIGATION BAR
   ======================================== */
.navbar {
    background: var(--nav-dark-green);
    border-top: 1px solid rgba(74, 93, 78, 0.15);
    padding: 0;
    position: sticky;
    /* Sticky Navbar */
    top: 0;
    z-index: 1100;
    /* Above everything */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.navbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-green);
    opacity: 0.4;
}

.nav-links {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 0;
}

.nav-links li {
    position: relative;
}

.nav-item {
    display: block;
    padding: 1.3rem 2.2rem;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 85%;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 3px 3px 0 0;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--nav-hover-green);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-item:hover,
.nav-item.active {
    color: #FFFFFF;
    transform: translateY(0);
}

.nav-item:hover::before,
.nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-item:hover::after,
.nav-item.active::after {
    opacity: 1;
}

/* === NEW SPLIT HERO LAYOUT === */
.max-w-container {
    max-width: 1400px;
    /* Reduced from default to fit screen */
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.home-main-grid {
    display: flex;
    align-items: center;
    gap: 3rem;
    justify-content: space-between;
}

.hero-bg-soft {
    background: var(--bg-cream);
    padding-top: 140px !important;
    /* Reduced from 180px */
    padding-bottom: 2rem;
    /* Reduced from 4rem */
    min-height: auto;
    /* Ensure full viewport height feel */
    display: flex;
    align-items: center;
}

.hero-text-content {
    flex: 1;
    z-index: 2;
    padding-right: 2rem;
}

.hero-visual {
    flex: 1.2;
    /* Give more space to visual */
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 8px solid white;
    /* Attractive border */
}

.hero-slider-frame {
    transition: transform 0.5s ease;
    height: 450px !important;
    /* Taller slider */
}

.hero-slider-frame:hover {
    transform: scale(1.02);
}

.h-slide {
    position: absolute;
    inset: 0;
    transition: opacity 1.5s ease-in-out;
    opacity: 0;
}

.h-slide.active {
    opacity: 1;
}

.mini-news-ticker {
    transition: all 0.3s ease;
    margin-top: 2rem;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    border-left: 5px solid var(--accent-gold);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 15px;
}

.mini-news-ticker:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* === NEW COMPACT STATS === */
.stats-strip-section {
    position: relative;
    z-index: 10;
    margin-top: -3rem;
    padding-bottom: 1.5rem;
    /* Reduced from 4rem */
}

.stat-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-box-compact {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    flex: 1;
    transition: all 0.3s ease;
    border-radius: 12px;
    border: 1px solid transparent;
}

.stat-box-compact:hover {
    background: var(--bg-soft);
    border-color: var(--accent-warm);
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
}

.stat-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

.stat-number-compact {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--nav-dark-green);
    line-height: 1;
    font-family: var(--font-primary);
}

.stat-label-compact {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.vertical-divider {
    width: 1px;
    background: #E0E0E0;
    margin: 0 15px;
    height: 50px;
    align-self: center;
}

.members-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.members-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 10px;
}

.members-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.members-scroll-wrapper {
    padding-bottom: 10px;
    /* Space for scrollbar */
    cursor: grab;
}

.members-scroll-wrapper:active {
    cursor: grabbing;
}

.btn-text-only {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-text-only:hover {
    color: var(--accent-bronze) !important;
    transform: translateX(5px);
}

/* === RESPONSIVE FIXES === */
@media (max-width: 900px) {
    .home-main-grid {
        grid-template-columns: 1fr;
        gap: 2rem !important;
        display: grid;
    }

    .hero-visual {
        width: 100%;
        max-width: 100%;
        height: 300px;
    }

    .hero-slider-frame {
        height: 300px !important;
    }

    .stat-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        transform: translateY(0) !important;
        margin-top: 1rem;
        box-shadow: var(--shadow-md) !important;
    }

    .vertical-divider {
        display: none;
    }

    .stat-box-compact {
        padding: 15px;
        background: var(--bg-soft);
        border-radius: 8px;
    }
}

.hero-content h1 {
    font-size: 2.5rem;
    /* Further reduced as requested */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 1px 2px 8px rgba(0, 0, 0, 0.15);
    /* Softer shadow */
    letter-spacing: -0.5px;
    animation: fadeInDown 1s ease-out 0.5s both;
    color: var(--nav-dark-green);
}

.hero-subtitle {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 3.5rem;
    opacity: 0.98;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    line-height: 1.7;
    animation: fadeInUp 1s ease-out 0.7s both;
}

.hero-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.btn-primary,
.btn-secondary {
    padding: 1.2rem 3rem;
    font-size: 1.15rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--nav-dark-green);
    color: white;
    box-shadow: 0 10px 30px rgba(74, 93, 78, 0.4);
    border: 2px solid var(--nav-dark-green);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--nav-hover-green);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.5);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary:hover span {
    color: var(--text-primary);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.3);
}

/* ========================================
   MINISTER MARQUEE SECTION
   ======================================== */
.minister-marquee-wrapper {
    background: white;
    padding: 2rem 0;
    overflow: hidden;
    border-top: 4px solid var(--accent-warm);
    border-bottom: 4px solid var(--accent-soft-peach);
    box-shadow: var(--shadow-md);
    position: relative;
}

.minister-marquee-wrapper::before,
.minister-marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.minister-marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.minister-marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

.minister-track {
    display: inline-flex;
    animation: scrollLeft 45s linear infinite;
    gap: 2.5rem;
}

.minister-track:hover {
    animation-play-state: paused;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.minister-pill {
    display: inline-flex;
    align-items: center;
    gap: 1.3rem;
    background: var(--gradient-warm);
    padding: 1.2rem 2.5rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--accent-warm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.minister-pill:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--dark-taupe);
    background: white;
}

.minister-img {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
}

.minister-pill:hover .minister-img {
    transform: scale(1.15) rotate(5deg);
}

.minister-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.minister-info strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.minister-info small {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========================================
   STATS SECTION - FLOATING CARDS
   ======================================== */
.stats-strip {
    position: relative;
    margin-top: -100px;
    z-index: 10;
    padding: 0 2.5rem;
}

.stat-container {
    max-width: 1300px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    padding: 3.5rem 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--accent-warm);
    position: relative;
    overflow: hidden;
}

.stat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-neutral);
}

.stat-box {
    text-align: center;
    padding: 1.5rem;
    position: relative;
    animation: scaleIn 0.8s ease-out both;
    transition: all 0.4s ease;
}

.stat-box:hover {
    transform: translateY(-8px);
}

.stat-box:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-box:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-box:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-box:nth-child(4) {
    animation-delay: 0.4s;
}

.stat-number {
    display: block;
    font-size: 4rem;
    font-weight: 900;
    color: var(--nav-dark-green);
    line-height: 1;
    margin-bottom: 0.8rem;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

/* ========================================
   MAIN CONTENT SECTIONS - FULL PAGE
   ======================================== */
.section-block {
    min-height: 100vh;
    padding: var(--spacing-xl) 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-block.bg-soft {
    background: var(--primary-beige);
}

.section-block.bg-rose {
    background: var(--primary-peach);
}

.section-block.bg-white {
    background: white;
}

.max-w-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.center-text {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeInDown 1s ease-out;
}

.section-heading {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 6px;
    background: var(--gradient-neutral);
    border-radius: var(--radius-full);
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-top: 2rem;
    font-weight: 500;
    line-height: 1.8;
}

/* ========================================
   CARD GRIDS
   ======================================== */
.modern-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.glass-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid var(--accent-warm);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 1s ease-out both;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-neutral);
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-neutral);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.glass-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--dark-sage);
}

.glass-card:hover::before {
    transform: scaleX(1);
}

.glass-card:hover::after {
    opacity: 0.08;
}

.card-icon-circle {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-full);
    background: var(--gradient-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 3.5rem;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    border: 4px solid var(--accent-warm);
}

.card-icon-circle::before {
    content: '';
    position: absolute;
    inset: -6px;
    background: var(--gradient-neutral);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    animation: pulse-glow 3s infinite;
}

.glass-card:hover .card-icon-circle {
    transform: scale(1.15) rotate(15deg);
    border-color: var(--dark-sage);
}

.glass-card:hover .card-icon-circle::before {
    opacity: 0.3;
}

.glass-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.glass-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   SARPANCH MESSAGE SECTION
   ======================================== */
.sarpanch-msg-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
    align-items: center;
    background: white;
    padding: 5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 3px solid var(--accent-warm);
    position: relative;
    overflow: hidden;
}

.sarpanch-msg-layout::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -25%;
    width: 600px;
    height: 600px;
    background: var(--gradient-warm);
    border-radius: 50%;
    opacity: 0.15;
    z-index: 0;
}

.sarpanch-photo-box {
    position: relative;
    z-index: 1;
    animation: fadeInLeft 1s ease-out;
}

.sarpanch-img-lg {
    width: 100%;
    max-width: 350px;
    height: 420px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 5px solid white;
    transition: all 0.5s ease;
}

.sarpanch-img-lg:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 20px 60px rgba(129, 199, 132, 0.3);
}

.quote-icon {
    position: absolute;
    top: -40px;
    left: -25px;
    font-size: 6rem;
    color: var(--accent-warm);
    opacity: 0.2;
    z-index: 0;
}

.msg-content {
    position: relative;
    z-index: 1;
    animation: fadeInRight 1s ease-out;
}

.msg-content h3 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--dark-sage), var(--dark-coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.msg-content p {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.signature {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark-sage);
    text-align: right;
    font-style: italic;
    margin-top: 2.5rem;
}

/* ========================================
   NOTICE BOARD
   ======================================== */
.notice-board-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border-top: 6px solid var(--accent-soft-peach);
    height: 100%;
}

.notice-board-container h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.notice-marquee {
    height: 400px;
    overflow: hidden;
    position: relative;
}

.marquee-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: marqueeUp 25s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marqueeUp {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100%);
    }
}

.notice-item {
    padding: 2rem;
    background: var(--primary-beige);
    border-radius: var(--radius-md);
    border-left: 5px solid var(--dark-sage);
    transition: all 0.4s ease;
}

.notice-item:hover {
    background: var(--primary-peach);
    border-left-color: var(--dark-coral);
    transform: translateX(12px);
    box-shadow: var(--shadow-md);
}

.notice-date {
    font-size: 0.85rem;
    color: var(--dark-sage);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 0.8rem;
    display: block;
}

.notice-text {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.8;
}

/* ========================================
   HOME PAGE GRID
   ======================================== */
.home-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

.panel-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--accent-warm);
    margin-bottom: 2.5rem;
    transition: all 0.4s ease;
}

.panel-box:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--dark-sage);
    transform: translateY(-5px);
}

.panel-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 4px solid transparent;
    border-image: var(--gradient-neutral) 1;
    background: linear-gradient(135deg, var(--dark-sage), var(--dark-coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   MEMBER PROFILES
   ======================================== */
/* #member-list-home REMOVED to allow marquee styling via class */
/* Was: display: grid; ... */

.profile-card {
    text-align: center;
    transition: all 0.4s ease;
    animation: scaleIn 0.8s ease-out both;
}

.profile-card:hover {
    transform: translateY(-10px);
}

.profile-frame {
    width: 130px;
    height: 130px;
    margin: 0 auto 1.2rem;
    border-radius: var(--radius-full);
    border: 5px solid var(--accent-warm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.profile-frame::before {
    content: '';
    position: absolute;
    inset: -6px;
    background: var(--gradient-neutral);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    animation: pulse-glow 3s infinite;
}

.profile-card:hover .profile-frame {
    transform: scale(1.15) rotate(8deg);
    box-shadow: var(--shadow-xl);
    border-color: var(--dark-sage);
}

.profile-card:hover .profile-frame::before {
    opacity: 0.4;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.profile-role {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========================================
   SCHEMES SIDE LIST
   ======================================== */
.schemes-side-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.scheme-side-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--primary-beige);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid transparent;
}

.scheme-side-item:hover {
    background: white;
    border-color: var(--dark-sage);
    transform: translateX(12px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.scheme-side-icon {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-md);
    background: var(--gradient-neutral);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}

.scheme-side-item:hover .scheme-side-icon {
    transform: rotate(15deg) scale(1.15);
}

.scheme-side-item strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
    display: block;
    margin-top: 5px;
    /* Add space between icon and text if wrapped, or general spacing */
}

/* Ensure item aligns top for long text */
.scheme-side-item {
    align-items: flex-start !important;
}

/* ========================================
   FOOTER
   ======================================== */
.main-footer {
    background: var(--dark-forest);
    color: white;
    padding: 5rem 0 2.5rem;
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--accent-gold);
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: transparent;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    margin-bottom: 2.5rem;
}

.footer-col h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: var(--gradient-neutral);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-col p {
    font-size: 1rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.2rem;
}

.footer-col strong {
    color: white;
    font-weight: 700;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    padding: 0.8rem 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
}

.copyright-text,
.disclaimer-text {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ========================================
   INNER PAGE SPACER
   ======================================== */
.inner-page-spacer {
    height: 160px;
    background: transparent;
}

/* ========================================
   CONTENT WRAPPER
   ======================================== */
.content-wrapper {
    min-height: 100vh;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1200px) {
    .section-heading {
        font-size: 3rem;
    }

    .hero-content h1 {
        font-size: 4rem;
    }
}

@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .section-heading {
        font-size: 2.8rem;
    }

    .sarpanch-msg-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3.5rem;
    }

    .home-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 1rem 1.5rem;
    }

    .brand-section {
        gap: 1.2rem;
    }

    .village-name {
        font-size: 1.5rem;
    }

    .logo-container {
        width: 55px;
        height: 55px;
    }

    .seal-img {
        height: 45px;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .navbar {
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        padding: 0;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(129, 199, 132, 0.1);
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .stat-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 2.5rem 1.5rem;
    }

    .stat-number {
        font-size: 3rem;
    }

    .section-block {
        padding: 4rem 0;
    }

    .section-heading {
        font-size: 2.2rem;
    }

    .modern-grid-4 {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .stat-container {
        grid-template-columns: 1fr;
    }

    .section-heading {
        font-size: 2rem;
    }

    .sarpanch-msg-layout {
        padding: 2rem;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.animate-fade-up {
    animation: fadeInUp 1s ease-out forwards;
}

.animate-fade-down {
    animation: fadeInDown 1s ease-out forwards;
}

.animate-zoom {
    animation: scaleIn 1s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 1s ease-out forwards;
}

/* ========================================
   LOADING STATES
   ======================================== */
.loading {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.3);
}

/* ========================================
   SMOOTH TRANSITIONS
   ======================================== */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

a,
button,
.nav-item,
.glass-card,
.profile-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === PANEL / CARD STYLES === */
.panel-box {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    border: 1px solid var(--accent-warm);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.panel-box:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
    border-color: var(--nav-dark-green);
}

/* Member Reference Styles (Members Page) */
.member-ref-card {
    background: white;
    border-radius: var(--radius-lg, 12px);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.member-ref-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.member-img-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    background-color: #f1f5f9;
    display: block;
}

.members-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.member-info-box {
    width: 100%;
    margin-top: 0.5rem;
}

.member-name-ref {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.member-role-ref {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ======================================== BUTTONS ======================================== */
.btn-primary {
    background: var(--nav-dark-green);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--nav-hover-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--nav-dark-green);
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--nav-dark-green);
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--nav-dark-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   HEADINGS & SECTIONS
   ======================================== */
.section-heading {
    color: var(--nav-dark-green);
    font-weight: 800;
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px;
    border-bottom: 3px solid var(--accent-gold);
    display: inline-block;
}

.heading-underline {
    height: 4px;
    width: 80px;
    background: var(--accent-gold);
    margin: 0.5rem auto 2rem;
    border-radius: 2px;
}

/* ========================================
   MEMBERS MARQUEE
   ======================================== */
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: scrollLeft 30s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
        /* Assumes content is duplicated */
    }
}

.member-card-marquee {
    flex: 0 0 200px;
    /* Fixed width for consistency */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ========================================
   POPULATION CARDS
   ======================================== */
.pop-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-top: 5px solid var(--nav-dark-green);
    transition: transform 0.3s ease;
}

.pop-card:hover {
    transform: translateY(-5px);
}

.pop-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.pop-table td {
    padding: 8px 5px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #444;
}

.pop-table td strong {
    color: var(--nav-dark-green);
}

/* Adjust Full Screen Width */
.max-w-container {
    max-width: 95%;
    /* Increased from 1400px to fill more space */
    padding: 0 1rem;
    margin: 0 auto;
}

/* ========================================
   TABLE STYLES (Ref Table)
   ======================================== */
.ref-table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.ref-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.ref-table thead {
    background: var(--nav-dark-green);
    color: white;
}

.ref-table th,
.ref-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.ref-table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.ref-table tr:hover {
    background-color: #f8fafc;
}

.ref-table tr:last-child td {
    border-bottom: none;
}

/* ========================================
   GALLERY STYLES
   ======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.gallery-card {
    background: white;
    padding: 10px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-warm);
}

.gallery-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-md);
    transition: transform 0.5s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

/* Lightbox Styles */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: 5px solid white;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
}

.close-lightbox:hover {
    color: var(--accent-gold);
}

/* ========================================
   GP STAFF & MEMBERS CARD CONSISTENCY
   ======================================== */
.members-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    /* Slightly wider cards */
    gap: 2.5rem;
    padding: 2rem 0;
}

.member-ref-card {
    background: white;
    /* Clean white card */
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    /* Soft shadow */
    border: 1px solid #f1f5f9;
    /* Subtle border */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.member-ref-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-warm);
}

.member-img-circle {
    width: 140px;
    /* Larger image */
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 5px solid white;
    box-shadow: var(--shadow-md);
    background-color: #f8fafc;
}

.member-name-ref {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--nav-dark-green);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.member-role-ref {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    padding: 4px 12px;
    background: var(--bg-soft);
    border-radius: 20px;
    display: inline-block;
}

/* Contact Cards Consistency */
.contact-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-ref-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.contact-ref-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--nav-dark-green);
}

.contact-icon-ref {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg-soft);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--nav-dark-green);
}

.contact-role-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--nav-dark-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 0.5rem;
    display: inline-block;
    width: max-content;
}

.contact-detail-row {
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ========================================
   FIXES & ENHANCEMENTS (APPENDED)
   ======================================== */

/* Main Container Adjustment */
.main-container {
    padding-top: 0 !important;
    /* Header is relative now */
    min-height: 100vh;
}

@media (max-width: 768px) {
    .main-container {
        padding-top: 0 !important;
    }
}

/* ========================================
   MODERN NEWS TICKER (Fixed Style)
   ======================================== */
.news-ticker-section {
    position: relative;
    background: #1B291E;
    /* Darker, more professional green */
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 48px;
    /* Compact height */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 20;
    border-bottom: 3px solid #C5A059;
    /* Gold Border */
}

.ticker-label {
    background: #C5A059;
    /* Gold Background */
    color: #2A362D;
    /* Dark Text */
    font-weight: 800;
    padding: 0 30px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 25;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    /* Removed clip-path for cleaner look per user request */
    border-right: 4px solid #1B291E;
}

.ticker-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-move {
    display: flex;
    white-space: nowrap;
    /* Slower smooth animation as requested */
    animation: tickerMaster 100s linear infinite;
    padding-left: 100%;
}

.ticker-move:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-size: 1rem;
    margin-right: 5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.ticker-item strong {
    color: #F4D03F;
    margin-right: 10px;
    text-transform: uppercase;
    font-weight: 700;
    background: rgba(244, 208, 63, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

@keyframes tickerMaster {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Ensure member cards in marquee look good */
.member-card-marquee {
    flex: 0 0 250px;
    height: 320px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-gold);
    margin-bottom: 1rem;
}

/* 2. INNER PAGE SPACING (Override) */
.inner-page-spacer {
    height: 150px !important;
    width: 100%;
    display: block;
}

/* 3. SCHEME ICON FIXES */
.scheme-icon-small,
.member-section-icon {
    font-size: 1.5rem;
}

/* 4. SECTION SPACING CONTROL */
.features-section {
    padding: 1.5rem 0;
    /* Reduced vertical padding */
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
}

.home-members-section {
    padding: 1.5rem 2rem;
    /* Reduced vertical padding */
    background: #fff;
    /* Ensure clean background */
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    /* Reduced bottom margin */
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.members-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.scheme-icon {
    width: 32px !important;
    height: 32px !important;
    margin-right: 12px;
    vertical-align: middle;
    color: var(--nav-dark-green);
    display: inline-block;
    flex-shrink: 0;
}

/* Fix for giant icons in revenue table if any */
.ref-table td svg {
    width: 24px;
    height: 24px;
}

/* 4. SERVICE & REVENUE CARDS */
.service-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: var(--accent-gold);
}

.hero-slider-frame {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.h-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.h-slide.active {
    opacity: 1;
}

/* 5. CONTACT PAGE STYLING */
.contact-card-modern {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    color: var(--nav-dark-green);
    font-size: 1.05rem;
}

.pill-icon {
    font-size: 1.2rem;
}

/* 6. GENERAL LAYOUT TWEAKS */
.scheme-detail-box {
    padding: 2.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Ensure tables look good */
.ref-table-container {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

/* === CRITICAL FIXES FOR TABLES AND SPACING === */

/* 1. Table Visibility */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

th,
td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    background-color: var(--nav-dark-green);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 2. Hero Section Alignment */
.hero-section {
    margin-top: 20px;
    /* Extra spacing from header */
    position: relative;
    z-index: 1;
}

.hero-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

/* 3. Page Header Spacing */
.page-title-container,
.section-title {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

/* 4. Contact Page Card Fix */
.contact-card,
.contact-card-modern {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid #eaeaea;
}

/* 5. Mobile Responsiveness for Header */
@media (max-width: 768px) {
    .main-container {
        padding-top: 380px;
        /* Even more space on mobile */
    }
}

/* ==========================================================================
   USER REQUESTED FIXES: TICKER, TABLES, CONTACT LAYOUT, CERTIFICATES
   ========================================================================== */

/* --- 1. ROBUST NEWS TICKER (Prevents Overlap) --- */
.news-ticker-section {
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    height: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 5;
}

.ticker-label {
    background: #D32F2F;
    /* Alert Red or Dark Green as preferred */
    color: white;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 25px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    z-index: 20;
    /* Ensures it stays ON TOP of scrolling text */
    position: relative;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.ticker-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    background: #FFF8E1;
    /* Light yellow bg for ticker track */
}

/* We will use the marquee-content class logic but ensure it's applied correctly in JS */
.ticker-move {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 25s linear infinite;
    padding-left: 100%;
    /* Start from right */
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 50px;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

@keyframes tickerScroll {
    0% {
        transform: translate3d(100%, 0, 0);
        /* Start from right edge */
    }

    100% {
        transform: translate3d(-100%, 0, 0);
        /* Go to left edge */
    }
}

/* --- 2. ATTRACTIVE TABLES (Services & Revenue) --- */
.modern-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e0e0e0;
    margin-bottom: 2rem;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: #8B0000;
    /* Dark Red/Maroon as per image */
    color: white;
}

.modern-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    font-size: 0.95rem;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:nth-child(even) {
    background-color: #fcfcfc;
}

.modern-table tr:hover {
    background-color: #fff9e6;
    /* Slight highlight */
}

/* --- 3. CERTIFICATES GRID (Image 3) --- */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.cert-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    /* Slightly sharper corners as per image */
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border-top: 4px solid #8B0000;
    /* Maroon top border */
    transition: transform 0.2s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.cert-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.btn-download-outline {
    width: 100%;
    padding: 10px;
    border: 1px solid #8B0000;
    background: white;
    color: #8B0000;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-download-outline:hover {
    background: #8B0000;
    color: white;
}

/* --- 4. CONTACT PAGE LAYOUT (Image 4) --- */
.contact-section-title {
    border-left: 4px solid #8B0000;
    padding-left: 15px;
    font-size: 1.5rem;
    color: #8B0000;
    font-weight: 700;
    margin: 2rem 0 1.5rem 0;
}

.officials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.official-card-box {
    background: white;
    border: 1px solid #ddd;
    padding: 2rem;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    height: 100%;
    /* Fix alignment gap */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.official-role-line {
    border-bottom: 2px solid #FFD700;
    /* Gold underline */
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-weight: 700;
    color: #8B0000;
    font-size: 1.2rem;
    display: inline-block;
}

.official-details p {
    margin: 5px 0;
    color: #555;
    font-size: 0.95rem;
}

.address-box-full {
    background: white;
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.emergency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.emergency-card {
    border: 1px solid #FFD700;
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    background: white;
}

.emergency-card strong {
    display: block;
    color: #8B0000;
    margin-bottom: 0.5rem;
}

.emergency-card span {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
}

/* === CONTACT PHOTO STYLING === */
.contact-photo-frame {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px auto;
    border: 3px solid var(--nav-dark-green);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
}

.contact-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fallback-icon {
    font-size: 2.5rem;
    display: block !important;
    /* Force display when fallback is triggered */
}

/* ==========================================================================
   MOBILE & SCHEME PAGE REFINEMENTS
   ========================================================================== */

/* 1. Enhanced Scheme Inner Pages */
.scheme-detail-page {
    padding-top: 2rem;
}

.scheme-detail-box {
    padding: 3rem;
    background: linear-gradient(to bottom right, #ffffff, #fdfbf7);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(139, 0, 0, 0.08);
    /* Subtle maroon tint */
    margin-bottom: 3rem;
}

.scheme-detail-box h3 {
    color: #8B0000;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #FFD700;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.detail-subtitle {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.detail-list {
    list-style: none;
    /* Remove default bullet */
    padding: 0;
}

.detail-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.detail-list li::before {
    content: '●';
    /* Circle dot */
    position: absolute;
    left: 0;
    color: #8B0000;
    font-size: 0.6rem;
    /* Adjusted size for dot */
    top: 8px;
    /* Adjusted alignment */
}

.scheme-link-external {
    display: inline-block;
    margin-top: 2rem;
    background: #8B0000;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    transition: transform 0.3s;
}

.scheme-link-external:hover {
    transform: translateY(-3px);
    background: #a50000;
}

/* 2. Mobile Specific Adjustments */
@media (max-width: 768px) {

    /* Adjust Main Container Padding for Mobile Header */
    /* Reducing slightly to check if it fits better, while ensuring header elements are compact */
    .main-container {
        padding-top: 320px;
    }

    /* Hero Title Size */
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .hero-section {
        margin-top: 0;
        /* Remove extra margin on mobile */
    }

    /* Grid Layouts to 1 Column */
    .certificates-grid,
    .schemes-grid,
    .officials-grid,
    .members-grid-home,
    .members-ref-grid,
    .footer-grid,
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    /* Contact Page */
    .contact-card-modern {
        padding: 1.5rem;
    }

    .official-card-box {
        padding: 1.5rem;
    }

    /* Scheme Pages */
    .scheme-detail-box {
        padding: 1.5rem;
    }

    .scheme-detail-box h3 {
        font-size: 1.5rem;
    }

    /* Tables */
    .modern-table th,
    .modern-table td {
        padding: 10px;
        font-size: 0.9rem;
        white-space: nowrap;
        /* Prevent wrapping in tight spaces, rely on scroll */
    }

    .modern-table-container {
        overflow-x: auto;
        /* Ensure scrolling */
    }

    /* Ticker */
    .ticker-label {
        font-size: 0.75rem;
        padding: 0 10px;
        width: 100px;
        /* Fixed width to prevent squishing */
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }

    .ticker-item {
        font-size: 0.85rem;
        margin-right: 20px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding-top: 350px;
        /* More space for very small screens where header wraps */
    }

    .header-content {
        padding: 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .village-name {
        font-size: 1.2rem !important;
    }
}

/* === Contact Page Enhancements === */
.officials-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.official-card-box {
    flex: 0 1 320px;
    /* Don't grow beyond basis, but shrink if needed. Basis 320px */
    width: 100%;
    /* Allow min-width to prevent squishing */
    min-width: 250px;
}

/* Ensure centering on larger screens */
@media (min-width: 992px) {
    .officials-grid {
        justify-content: center;
        /* Centers items in rows */
    }
}

/* ========================================
   ROBUST MOBILE RESPONSIVENESS (FINAL FIXES)
   ======================================== */
@media (max-width: 900px) {

    /* Global Container Fixes */
    .main-container {
        padding-top: 220px !important;
        /* Adjusted for mobile header height */
    }

    .content-wrapper {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hero Section Mobile */
    .hero-bg-soft {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
        flex-direction: column-reverse;
        /* Image top, text bottom usually, or standard column */
        text-align: center;
        height: auto !important;
        min-height: auto !important;
    }

    .home-main-grid {
        flex-direction: column-reverse;
        /* Text on top, or bottom? Let's do Column so visual is top if we want, or text top. Standard is text top for SEO/info */
        display: flex;
        gap: 2rem;
    }

    .hero-text-content {
        padding-right: 0;
        margin-top: 1rem;
    }

    .hero-content h1 {
        font-size: 2rem !important;
        /* Smaller title */
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        height: 250px;
        /* Reduced height for mobile */
        border-width: 4px;
    }

    .hero-slider-frame {
        height: 250px !important;
    }

    /* Stats Section Mobile */
    .stats-strip-section {
        margin-top: 0;
        /* Remove negative margin on mobile */
        padding-bottom: 1rem;
    }

    .stat-container {
        grid-template-columns: 1fr;
        /* Stack stats */
        gap: 1rem;
        padding: 1.5rem;
    }

    .stat-box-compact {
        padding: 1rem;
    }

    /* News Ticker Mobile */
    .news-ticker-section {
        height: auto;
        min-height: 48px;
    }

    .ticker-label {
        width: 110px;
        /* Fixed small width */
        font-size: 0.7rem;
        padding: 0 5px;
        line-height: 1.2;
    }

    .ticker-item {
        font-size: 0.85rem;
        margin-right: 2rem;
    }

    /* Features & Members */
    .features-section {
        gap: 1rem;
    }

    .feature-card {
        width: 100%;
        /* Full width cards */
        max-width: 100%;
    }

    .members-grid-home {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        /* Smaller cards for members on mobile */
        gap: 1rem;
    }

    .member-card-home {
        padding: 1rem;
    }

    /* Tables */
    .modern-table th,
    .modern-table td {
        font-size: 0.85rem;
        padding: 8px;
    }

    /* Hide decorative orbs on mobile to improve performance */
    .decorative-orb {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding-top: 260px !important;
        /* slightly more for wrapped text */
    }

    .hero-content h1 {
        font-size: 1.75rem !important;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & UI FIXES (FULL OPTIMIZATION - APPENDED)
   ========================================================================== */

/* 1. Global Reset for Mobile */
@media (max-width: 900px) {

    /* Fix Excessive Top Spacing */
    .main-container {
        padding-top: 1rem !important;
        /* Overrides previous massive padding */
        margin-top: 0 !important;
    }

    /* Ensure content wrapper has breathing room */
    .content-wrapper {
        padding-top: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Fix Hero Section Spacing */
    .hero-section,
    .modern-hero {
        margin-top: 2rem !important;
        grid-template-columns: 1fr !important;
        padding: 1.5rem !important;
        height: auto !important;
        gap: 2rem !important;
    }

    .hero-text-content {
        padding-right: 0 !important;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        height: 250px !important;
        width: 100% !important;
    }

    .hero-slider-frame {
        height: 100% !important;
    }
}

/* 2. Header & Navigation (Hamburger Menu) - IMPROVED */
@media (max-width: 900px) {
    .main-header {
        position: sticky !important;
        top: 0;
        z-index: 9999 !important;
        /* Super high to match toggle */
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 0 !important;
        height: auto;
        overflow: visible !important;
        /* CRITICAL: Prevent clipping dropdown */
    }

    .header-content {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        padding: 0.5rem 1rem !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 70px;
        overflow: visible !important;
        /* CRITICAL: Prevent clipping dropdown */
    }

    .brand-section {
        flex: 1;
        gap: 0.8rem !important;
        min-width: 0;
        /* Allow shrinking */
        align-items: center;
    }

    .logo-container {
        width: 45px !important;
        height: 45px !important;
        flex-shrink: 0;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .logo-img {
        padding: 0 !important;
    }

    /* Simplify Village Name on Mobile */
    .brand-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        /* Allow ellipsis */
    }

    .village-name {
        font-size: 1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0 !important;
        line-height: 1.2 !important;
    }

    .lgd-code {
        display: none !important;
        /* Hide codes on mobile to save space */
    }

    .header-controls {
        gap: 0.8rem !important;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    .seal-container {
        display: none !important;
        /* Hide seal on mobile */
    }

    /* Compact Lang Selector */
    .lang-selector select {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.8rem !important;
        height: 36px;
    }

    /* Hamburger Menu Button - High Visibility */
    .mobile-nav-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        /* Increased size for touch */
        height: 44px;
        background: #f0fdf4 !important;
        border: 2px solid var(--nav-dark-green) !important;
        /* Thicker border */
        border-radius: 8px;
        cursor: pointer !important;
        pointer-events: auto !important;
        /* Ensure clickable */
        z-index: 9999 !important;
        /* Super high Z-index */
        padding: 8px;
        transition: all 0.2s ease;
        position: relative;
        /* Ensure it respects Z-index context */
    }

    .mobile-nav-toggle:active {
        transform: scale(0.95);
        background: #dcfce7 !important;
    }

    .mobile-nav-toggle .bar {
        width: 100%;
        height: 3px;
        background-color: var(--nav-dark-green) !important;
        /* Ensure visibility */
        border-radius: 3px;
        transition: all 0.3s ease;
        display: block;
    }

    /* Animation for active state (X shape) */
    .mobile-nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Navbar Dropdown */
    .navbar {
        position: static !important;
        /* Let nav-links be positioned relative to header or fixed */
        padding: 0 !important;
        border: none !important;
        width: 100%;
    }

    /* The actual links container */
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white !important;
        padding: 10px 0;
        border-top: 3px solid var(--accent-gold);
        box-shadow: 0 100vh 0 100vh rgba(0, 0, 0, 0.5);
        /* Dim background overlay */
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        position: fixed !important;
        /* Force fixed */
        top: 70px !important;
        left: 0 !important;
        z-index: 9998 !important;
        /* Very high z-index */
    }

    .nav-links.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        /* Animation removed for stability */
    }

    /* Ensure links are visible and CLICKABLE */
    .nav-links li {
        width: 100%;
        text-align: left;
        background: white;
        /* Ensure bg is white */
        border-bottom: 1px solid #e5e7eb;
    }

    .nav-item {
        color: #064e3b !important;
        /* Dark Green */
        padding: 1rem 1.5rem !important;
        font-size: 1.1rem !important;
        /* Larger text */
        font-weight: 600 !important;
        display: flex !important;
        width: 100% !important;
        /* Full width tap area */
        align-items: center;
        justify-content: space-between;
        pointer-events: auto !important;
        /* Force clickable */
        text-decoration: none !important;
        cursor: pointer !important;
    }

    .nav-item::after {
        content: '›';
        /* Arrow indicator */
        font-size: 1.2rem;
        color: var(--accent-gold);
        opacity: 1 !important;
        position: static !important;
        background: none !important;
    }

    .nav-item:hover,
    .nav-item.active {
        background: #f9fafb !important;
        color: var(--nav-dark-green) !important;
        padding-left: 2rem !important;
        /* Slide effect */
    }

    /* Adjust Main Container to account for Sticky Header */
    .main-container {
        padding-top: 1rem !important;
        margin-top: 0 !important;
    }
}

/* 3. Schemes Card Fix (Text Alignment) */
.scheme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto !important;
    /* Prevent fixed height issues */
    min-height: 250px;
    /* Minimum height for consistency */
    position: relative;
    padding-top: 3rem !important;
    /* More space at top */
}

.scheme-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    order: -1;
    /* Ensure icon is always first */
    z-index: 1;
    position: relative;
    line-height: 1;
    height: 70px;
    /* Fixed height for icon area */
    display: flex;
    align-items: center;
    justify-content: center;
}

.scheme-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    z-index: 2;
    position: relative;
}

.scheme-card p {
    z-index: 2;
    position: relative;
}

/* 4. General Mobile Layout Fixes */
@media (max-width: 900px) {

    /* Stack all Grids */
    .features-section,
    .schemes-grid,
    .gallery-grid,
    .alerts-grid,
    .member-list-home,
    .members-grid-home,
    .footer-grid,
    .modern-grid-4 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Footer Alignment */
    .main-footer {
        text-align: center;
        padding: 3rem 1.5rem;
    }

    .footer-grid {
        gap: 2.5rem !important;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links li {
        justify-content: center;
    }

    /* Buttons Touch Target */
    button,
    .btn,
    .nav-item,
    .scheme-link-external {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Typography Adjustments */
    .section-heading {
        font-size: 2rem !important;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    /* Stats Stacked */
    .stat-container {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-box-compact {
        width: 100%;
        justify-content: center;
    }

    /* Leadership Row Mobile */
    .leadership-row {
        overflow-x: auto;
        white-space: nowrap;
        padding: 0.8rem 0;
        /* More padding */
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
        -ms-overflow-style: none;
        /* Hide scrollbar IE */
    }

    .leadership-row::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome */
    }

    .leadership-inline {
        display: inline-flex;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .leader-item {
        min-width: 120px;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .leader-img {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--accent-gold);
        margin-bottom: 0.5rem;
    }

    .leader-info span {
        font-size: 0.7rem;
        font-weight: 700;
        display: block;
        color: var(--nav-dark-green);
        white-space: normal;
        /* Allow title wrap */
        line-height: 1.2;
    }

    .leader-info p {
        font-size: 0.75rem;
        white-space: normal;
        /* Allow name wrap */
        line-height: 1.2;
        margin: 2px 0 0 0;
    }
}

/* === POPULATION SECTION (Compact) === */
.population-section {
    padding: 1.5rem 0;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-cream);
}

.pop-summ-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- SUMMARY CARD --- */
.pop-summary-card {
    background: white;
    border: 2px solid #FFD580;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto 2rem auto;
    text-align: center;
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.pop-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FF8C00, #FFD580);
}

.pop-title {
    color: #B3541E;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    /* Reduced margin */
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    letter-spacing: 0.5px;
}

.pop-title::after {
    content: none;
}

.pop-main-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.pop-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.pop-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1;
}

.pop-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- DETAILED CARDS --- */
.pop-subtitle {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--nav-dark-green);
    font-weight: 800;
    position: relative;
    padding-bottom: 0;
}

.pop-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.pop-village-card {
    background: white;
    border: 1px solid #FFE4B5;
    border-radius: var(--radius-md);
    border-top: 4px solid #FF8C00;
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.pop-village-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #FF8C00;
}

.village-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #FFE4B5;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.village-header h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #B3541E;
    letter-spacing: -0.3px;
    margin: 0;
}

.village-icon {
    font-size: 1.2rem;
    background: #FFF8E1;
    padding: 6px;
    border-radius: 50%;
}

.village-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.v-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f9f9f9;
}

.v-stat-row:last-child {
    border-bottom: none;
}

.v-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #A0522D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.v-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #2c3e50;
}

.v-stat-row.highlight {
    background: #FFF8E1;
    padding: 0.5rem 0.4rem;
    border-radius: 4px;
    margin-top: 0.3rem;
}

.v-stat-row.highlight .v-value {
    color: #D35400;
    font-size: 1rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .pop-main-stats {
        gap: 1.5rem;
    }

    .pop-value {
        font-size: 1.5rem;
    }

    .population-section {
        padding: 1rem 0;
    }
}