/* SPACING AND MOBILE RESPONSIVENESS FIXES */

:root {
    --primary: #14532d !important;
    --primary-dark: #052e16 !important;
    --primary-mid: #166534 !important;
    --accent: #2563eb !important;
    --accent-light: #dbeafe !important;
}

.member-card {
    min-width: 0 !important;
    width: 100% !important;
    padding: 16px 10px !important;
    border: 1px solid #dbeafe !important;
    border-top: 3px solid #2563eb !important;
    border-radius: 18px !important;
    background: linear-gradient(160deg, #ffffff, #f0fdf4) !important;
    box-shadow: 0 8px 22px rgba(5, 46, 22, 0.1) !important;
    animation: fadeInUp 0.55s ease both;
}
.member-avatar { width: 92px !important; height: 92px !important; margin: 0 auto 10px !important; border: 4px solid #bfdbfe !important; }
.member-name { font-size: 0.9rem !important; line-height: 1.35 !important; overflow-wrap: anywhere; }
.member-designation { color: #14532d !important; font-size: 0.78rem !important; }
#member-list-home, #members-list-page, #contact-members-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
.cta-banner { background: linear-gradient(110deg, #063b20 0%, #0b4d2b 48%, #2f5fd3 100%) !important; color: #fff !important; }
.cta-banner h3, .cta-banner p { color: #fff !important; }
.footer { background: #103b28 !important; }
.hero-wrapper { background: linear-gradient(120deg, #ecfdf5, #eff6ff) !important; border-radius: 0 0 28px 28px; padding: 28px !important; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Reduce margins on the section containers */
.section-container {
    margin-bottom: 20px !important;
    padding: 20px !important;
}

/* Fix Hero Wrapper spacing and layout */
.hero-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px !important;
    align-items: center;
}

.hero-left {
    flex: 1.2;
    min-width: 300px;
}





/* Reduce gap between stats row items and margins */
.stats-row {
    margin: 20px 0 !important;
    gap: 15px !important;
}

.stat-card {
    padding: 15px !important;
    min-width: 130px !important;
}

/* Reduce gaps on the GP Services sections */
.services-grid, #gp-services-home {
    gap: 15px !important;
}

/* General spacing reduction */
body, #main-dashboard {
    padding-bottom: 20px !important;
}

.leadership-marquee {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

/* GP Members Grid on Home Page (Make attractive for 8 members) */
#member-list-home {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    justify-items: center !important;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 15px !important;
    }

    .hero-wrapper {
        flex-direction: column;
    }

    .hero-right {
        width: 100% !important;
        min-height: 300px !important;
        border-radius: 20px !important;
    }

    

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .btn-hero-primary, .btn-hero-outline {
        width: 100%;
        text-align: center;
    }

    .stats-row {
        flex-direction: row; 
    }

    .stat-card {
        flex: 1 1 calc(50% - 15px);
        margin-bottom: 0;
    }

    #main-dashboard {
        padding: 15px !important;
    }

    .member-card { padding: 12px 7px !important; }
    .member-avatar { width: 72px !important; height: 72px !important; }
    #member-list-home, #members-list-page, #contact-members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
}

/* NEW SLIDER DESIGN: Increase height, decrease width, better shape, no cropping */
.hero-right {
    flex: 0.8 !important;
    max-width: 450px !important;
    height: 550px !important;
    position: relative !important;
    background: #000 !important;
    border-radius: 30px 100px 30px 100px !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4) !important;
    overflow: hidden !important;
    border: 5px solid rgba(255, 255, 255, 0.8) !important;
    margin-top: -30px !important;
}

#hero-slider-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: transparent !important;
    border-radius: 25px 95px 25px 95px !important;
}


/* Added for middle alignment */
.village-brand { align-items: center; justify-content: center; text-align: center; }
.village-brand > div { text-align: center; }


/* Added for inline header and smaller menu */
.village-title {
    white-space: nowrap !important;
    font-size: clamp(1.2rem, 4vw, 2.2rem) !important;
}
.header-lgd, .header-sub {
    font-size: clamp(0.7rem, 2vw, 0.9rem) !important;
}

@media (min-width: 1024px) {
    .nav-item {
        font-size: 0.85rem !important;
        padding: 8px 10px !important;
    }
}

/* Added for header inline alignment and menu fixes */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.village-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}
.village-brand > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
.header-lgd {
    color: #f59e0b !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.village-title {
    white-space: nowrap !important;
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    color: #1e3a8a !important;
    text-transform: uppercase;
    margin: 2px 0 !important;
}
.header-sub {
    color: #64748b !important;
    font-size: 0.85rem !important;
}
@media (max-width: 1024px) {
    .village-title { font-size: 1.5rem !important; }
    .nav-menu a { font-size: 0.85rem !important; padding: 8px 10px !important; }
    .nav-menu { gap: 5px !important; }
}
@media (max-width: 768px) {
    .village-brand > div { align-items: center; text-align: center; }
    .village-title { font-size: 1.3rem !important; white-space: normal !important; line-height: 1.2 !important; }
    .village-brand { flex-direction: column; }
}

/* Reduce menu size in desktop to prevent 'Contact Us' cut-off */
.nav-menu a {
    font-size: 0.85rem !important;
    padding: 8px 10px !important;
}
.nav-menu {
    gap: 5px !important;
}

/* Updated Mobile Header matching Image 1 */
@media (max-width: 768px) {
    .village-brand {
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
    }
    .village-brand > div {
        align-items: flex-start !important;
        text-align: left !important;
    }
    .village-title {
        font-size: 1.1rem !important;
        white-space: normal !important;
        line-height: 1.1 !important;
    }
    .header-lgd {
        font-size: 0.65rem !important;
        letter-spacing: 0px !important;
    }
    .header-sub {
        font-size: 0.75rem !important;
    }
}

/* Ensure menu never crops */
.nav-menu {
    flex-wrap: wrap !important;
    justify-content: center !important;
}

/* Gallery layout: 4 cards in one row on desktop */
#gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}
@media (max-width: 1024px) {
    #gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
@media (max-width: 768px) {
    #gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 480px) {
    #gallery-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .header-top { padding: 5px !important; min-height: unset !important; }
    .header-container { padding: 5px !important; }
    .gp-logo { width: 45px !important; height: auto !important; }
}

/* Final Zapi visual system */
:root {
    --primary: #17624a !important;
    --primary-dark: #103c35 !important;
    --primary-mid: #287d62 !important;
    --accent: #244f78 !important;
    --accent-light: #dcebe6 !important;
    --bg: #e7f0ec !important;
    --text: #18332f !important;
    --text-muted: #58706b !important;
}
body { background: #e7f0ec !important; color: #18332f !important; }
.top-info-bar { background: #103c35 !important; }
.top-info-bar > div:last-child { display: none !important; }
.header { background: #f3f8f5 !important; border-bottom-color: #244f78 !important; }
.village-title { color: #103c35 !important; text-transform: none !important; }
.main-nav { background: #244f78 !important; }
.nav-item.active { background: #17624a !important; }
.rajmudra-wrap { width: 62px !important; height: 62px !important; display: flex !important; align-items: center !important; justify-content: center !important; background: transparent !important; border-radius: 0 !important; box-shadow: none !important; }
.rajmudra { width: 58px !important; height: 58px !important; object-fit: contain !important; filter: none !important; }
.hero-wrapper { background: linear-gradient(135deg, #dcebe6 0%, #edf4f1 52%, #dce7f0 100%) !important; border-radius: 0 0 76px 18px !important; clip-path: polygon(0 0, 100% 0, 100% 88%, 92% 100%, 8% 94%, 0 100%) !important; padding: 42px 5% 58px !important; }
.hero-wrapper::before { background: linear-gradient(135deg, rgba(23,98,74,.12), rgba(36,79,120,.1)) !important; }
.hero-right { height: 390px !important; min-height: 390px !important; max-width: 560px !important; margin-top: 0 !important; border-radius: 34px 88px 34px 88px !important; background: #c8dcd5 !important; border: 6px solid rgba(255,255,255,.75) !important; }
#hero-slider-img { object-fit: cover !important; background: #c8dcd5 !important; border-radius: 28px 80px 28px 80px !important; }
.hero-right > div { background: #17624a !important; }
.our-zapi-panel { background: linear-gradient(135deg, #17624a 0%, #287d62 48%, #244f78 100%) !important; color: #fff !important; box-shadow: 0 12px 30px rgba(16, 60, 53, .2) !important; }
.our-zapi-panel h2 { color: #fff !important; }
.section-container, .scheme-detail-box, .member-card, .stat-card, .scheme-card-box { background-color: #f3f8f5 !important; }
.census-gender-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid #bdd3cc; border-radius: 14px; background: #f3f8f5; }
.census-gender-wrap h3 { margin: 0; padding: 12px 16px; text-align: center; color: #103c35; background: #dcebe6; font-size: 1rem; }
.census-gender-table { width: 100%; min-width: 520px; border-collapse: collapse; text-align: center; color: #18332f; }
.census-gender-table th, .census-gender-table td { padding: 10px 12px; border: 1px solid #bdd3cc; }
.census-gender-table thead { background: #244f78; color: #fff; }
.census-gender-table tbody th { text-align: left; background: #e8f2ee; }

@media (max-width: 768px) {
    .top-info-bar { display: none !important; }
    .header { padding: 8px 12px !important; }
    .header-top { flex-direction: row !important; align-items: center !important; gap: 6px !important; }
    .village-brand { flex-direction: row !important; justify-content: flex-start !important; gap: 7px !important; min-width: 0 !important; text-align: left !important; }
    .village-brand > div { align-items: flex-start !important; text-align: left !important; min-width: 0 !important; }
    .gp-logo { width: 42px !important; height: 42px !important; }
    .village-title { font-size: .92rem !important; line-height: 1.05 !important; white-space: normal !important; max-width: 150px !important; }
    .header-lgd, .header-sub { font-size: .52rem !important; line-height: 1.15 !important; white-space: normal !important; max-width: 155px !important; letter-spacing: 0 !important; }
    .header-utilities { gap: 4px !important; flex-shrink: 0 !important; }
    .lang-select { padding: 4px 3px !important; font-size: .62rem !important; max-width: 72px !important; }
    .mobile-menu-btn { display: flex !important; padding: 6px !important; }
    .rajmudra-wrap { width: 36px !important; height: 42px !important; }
    .rajmudra { width: 34px !important; height: 40px !important; }
    .hero-wrapper { clip-path: polygon(0 0, 100% 0, 100% 95%, 86% 100%, 14% 96%, 0 100%) !important; padding: 25px 16px 42px !important; border-radius: 0 0 34px 12px !important; }
    .hero-right { height: 270px !important; min-height: 270px !important; border-radius: 24px 54px 24px 54px !important; }
    #hero-slider-img { border-radius: 18px 48px 18px 48px !important; }
    .stats-row { gap: 9px !important; }
    .stat-card { min-width: 0 !important; padding: 12px 7px !important; }
    .stat-card > div:first-child { font-size: 1.35rem !important; }
    .section-container { padding: 14px !important; }
}

    /* Final polish */
    .home-summary-stats { display: none !important; }
    .scheme-back-button {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 18px 0 6px;
        padding: 10px 16px;
        border: 1px solid #b8d2c8;
        border-radius: 10px;
        background: #f3f8f5;
        color: #103c35;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(16, 60, 53, .08);
    }
    .scheme-back-button:hover { background: #dcebe6; transform: translateX(-2px); }
    .scheme-detail-box, .main-content-grid, .section-container { color: #18332f; }
    .scheme-detail-box h3, .scheme-detail-box h4, .section-title { color: #103c35; }
    .scheme-link-external, .btn-primary { background: #244f78 !important; color: #fff !important; }
    .footer { background: #103c35 !important; }

    @media (max-width: 768px) {
        html, body { width: 100%; max-width: 100%; overflow-x: hidden !important; }
        .header-container, .header-top { width: 100% !important; max-width: 100% !important; }
        .header-top { min-width: 0 !important; }
        .village-brand { flex: 1 1 auto !important; overflow: hidden !important; }
        .village-brand > div { overflow: hidden !important; }
        .village-title, .header-lgd, .header-sub { max-width: 100% !important; overflow: hidden !important; text-overflow: ellipsis !important; }
        .header-utilities { margin-left: auto !important; }
        .main-content-grid, .content-area, #main-wrapper { width: 100% !important; min-width: 0 !important; }
        .scheme-back-button { margin: 12px 0 2px; }
        .census-gender-table { min-width: 440px; }
    }

/* Final visual refresh: warm civic palette with a clearer hero and navigation hierarchy */
:root {
    --page-surface: #f5f6f2;
    --ink-navy: #162b46;
    --civic-teal: #17624a;
    --civic-saffron: #d97745;
}
body { background: var(--page-surface) !important; color: #233447 !important; }
.header { background: #fffdf8 !important; border-bottom: 1px solid #e8d9c5 !important; }
.main-nav { background: var(--ink-navy) !important; box-shadow: 0 8px 22px rgba(22, 43, 70, .18) !important; }
.nav-list { gap: 6px !important; padding: 8px 3% !important; }
.nav-item { border-radius: 10px !important; color: #eef5fb !important; transition: background .2s ease, transform .2s ease !important; }
.nav-item:hover { background: rgba(255,255,255,.14) !important; transform: translateY(-2px); }
.nav-item.active { background: var(--civic-saffron) !important; box-shadow: 0 5px 14px rgba(217,119,69,.32) !important; }
.hero-wrapper { background: linear-gradient(118deg, #fff8eb 0%, #e5f0ea 52%, #dfe8f3 100%) !important; border-radius: 0 0 72px 20px !important; box-shadow: inset 0 -1px 0 rgba(22,43,70,.08), 0 14px 30px rgba(22,43,70,.08) !important; }
.hero-wrapper::before { background: linear-gradient(118deg, rgba(217,119,69,.16), rgba(23,98,74,.12)), url('assets/hero-bg-curve.svg') center/cover no-repeat !important; opacity: .34 !important; }
.hero-eyebrow { color: var(--civic-teal) !important; font-weight: 800 !important; }
.hero-title { color: var(--ink-navy) !important; }
.hero-title span { color: var(--civic-saffron) !important; }
.hero-subtitle { color: #435669 !important; }
.hero-btns .btn-hero-primary { background: var(--civic-saffron) !important; box-shadow: 0 8px 18px rgba(217,119,69,.28) !important; }
.hero-btns .btn-hero-outline { color: var(--ink-navy) !important; border-color: var(--ink-navy) !important; background: rgba(255,255,255,.55) !important; }
.hero-right > div:first-child { border-color: rgba(255,255,255,.9) !important; box-shadow: 0 18px 34px rgba(22,43,70,.18) !important; }
.hero-right > div:last-child { background: var(--civic-teal) !important; box-shadow: -8px 12px 24px rgba(23,98,74,.24) !important; }
.footer { background: linear-gradient(135deg, #162b46, #103c35) !important; }
.footer-bottom { border-top-color: rgba(255,255,255,.2) !important; }

@media (max-width: 768px) {
    .main-nav { box-shadow: none !important; }
    .hero-wrapper { border-radius: 0 0 34px 12px !important; }
    .hero-title { font-size: 2rem !important; }
    .hero-right > div:last-child { right: -4px !important; max-width: 145px !important; padding: 14px !important; }
}
