/* ============================================================
   GRAM PANCHAYAT CHAPARI - PROFESSIONAL GOVERNMENT THEME
   Color Palette: Deep Navy Blue + Gold - Clean & Official
   ============================================================ */
:root {
    --primary-color: #1a3a6b;
    /* Deep Navy Blue */
    --primary-dark: #0f2447;
    /* Darker Navy */
    --primary-light: #e8eef7;
    /* Soft Blue Tint */
    --accent-color: #c8982a;
    /* Government Gold */
    --accent-light: #f5e8c8;
    /* Light Gold */
    --text-dark: #1a1a2e;
    --text-light: #5a6478;
    --white: #FFFFFF;
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 20px rgba(26, 58, 107, 0.08);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #1a3a6b 0%, #2d5fa8 100%);
    --gradient-gold: linear-gradient(135deg, #c8982a 0%, #e8b84b 100%);
    --gradient-hero: linear-gradient(135deg, #0f2447 0%, #1a3a6b 50%, #2d5fa8 100%);
    --border-light: rgba(26, 58, 107, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* ============================================================
   HEADER - Professional Government Style
   ============================================================ */
.header {
    background: linear-gradient(135deg, #e8eef8 0%, #eef2fa 50%, #f4f7fd 100%);
    padding: 0.8rem 5%;
    border-bottom: 3px solid var(--accent-color);
    position: relative;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(26, 58, 107, 0.12);
}

.header-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0;
}

.village-brand {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.gp-logo {
    height: 72px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(200, 152, 42, 0.4));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gp-logo:hover {
    transform: scale(1.08) rotate(2deg);
}

.village-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a3a6b;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: none;
    margin: 0;
}

.header-utilities {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* Language Selector */
.lang-select {
    padding: 8px 16px;
    border-radius: 30px;
    border: 2px solid var(--accent-color);
    background: rgba(26, 58, 107, 0.08);
    color: #1a3a6b;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.lang-select option {
    background: #ffffff;
    color: #1a3a6b;
}

.lang-select:hover {
    background: var(--accent-color);
    color: #1a3a6b;
    transform: translateY(-2px);
}

/* ============================================================
   NAVIGATION - Professional Floating Bar (No Overlap)
   ============================================================ */
.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 8px 20px;
    position: static;
    /* Static - no overlap with content */
    z-index: 150;
    box-shadow: 0 4px 20px rgba(26, 58, 107, 0.15);
    border-bottom: 3px solid var(--accent-color);
    margin: 0;
    width: 100%;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 4px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-item {
    position: relative;
    padding: 9px 18px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 1;
    overflow: hidden;
    white-space: nowrap;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease-in-out;
    z-index: -1;
    border-radius: 30px;
}

.nav-item:hover::before,
.nav-item.active::before {
    width: 100%;
}

.nav-item:hover,
.nav-item.active {
    color: var(--white);
    box-shadow: 0 4px 12px rgba(26, 58, 107, 0.3);
}

.nav-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-icon {
    transform: rotate(10deg) scale(1.1);
}

/* ============================================================
   LEADERSHIP SECTION - Continuous Auto-Scroll Marquee
   ============================================================ */
.leadership-marquee {
    background: var(--white);
    padding: 12px 0;
    margin: 0 0 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    border-left: 4px solid var(--accent-color);
    border-right: 4px solid var(--accent-color);
}

/* Fade edges */
.leadership-marquee::before,
.leadership-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 10;
    pointer-events: none;
}

.leadership-marquee::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.leadership-marquee::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

/* The scrolling track */
.leadership-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 8px 20px;
    align-items: center;
    white-space: nowrap;
    /* Continuous marquee animation */
    animation: leadershipScroll 35s linear infinite;
    width: max-content;
}

.leadership-container:hover {
    animation-play-state: paused;
}

@keyframes leadershipScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.leader-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-color);
    padding: 10px 14px;
    border-radius: 12px;
    min-width: 120px;
    width: 120px;
    flex-shrink: 0;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    white-space: normal;
}

.leader-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(26, 58, 107, 0.12);
    background: var(--white);
    border-color: var(--accent-color);
}

.leader-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    padding: 2px;
    margin-bottom: 8px;
}

.leader-info span {
    font-size: 0.65rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
}

.leader-info p {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

/* ============================================================
   MAIN DASHBOARD / LAYOUT
   ============================================================ */
#main-dashboard {
    max-width: 1400px;
    margin: 16px auto;
    padding: 0 20px;
}

.app-container {
    display: block;
}

/* ============================================================
   HERO SECTION - Slideshow
   ============================================================ */
.hero-section {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--card-shadow);
    height: 480px !important;
}

.slideshow {
    height: 100% !important;
    width: 100%;
}

.slideshow-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.slideshow-image.active {
    opacity: 1;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    background: rgba(15, 36, 71, 0.88) !important;
    backdrop-filter: blur(8px);
    bottom: 24px !important;
    left: 24px !important;
    right: auto !important;
    border-radius: 14px;
    padding: 24px 28px !important;
    width: auto;
    max-width: 460px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--accent-color);
}

.hero-overlay h2 {
    color: #FFFFFF !important;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 8px !important;
    font-size: 1.7rem;
}

.hero-overlay p {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 400;
}

/* ============================================================
   GP INFO SECTION (Homepage Banner)
   ============================================================ */
.gp-info-section {
    background: var(--gradient-hero);
    border-radius: var(--border-radius);
    padding: 36px 40px;
    margin: 18px 0;
    color: white;
    box-shadow: 0 8px 30px rgba(26, 58, 107, 0.25);
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--accent-color);
}

.gp-info-section::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 280px;
    height: 280px;
    background: rgba(200, 152, 42, 0.08);
    border-radius: 50%;
}

.gp-info-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.gp-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 22px;
}

.gp-info-stat {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(200, 152, 42, 0.3);
    transition: var(--transition);
}

.gp-info-stat:hover {
    background: rgba(200, 152, 42, 0.2);
    transform: translateY(-4px);
}

.gp-info-stat .stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
    -webkit-text-fill-color: unset;
}

.gp-info-stat .stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1.1;
}

.gp-info-stat .stat-label {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

.gp-info-section h2 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: white;
}

.gp-info-section p {
    opacity: 0.88;
    max-width: 680px;
    font-size: 0.95rem;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 14px;
    text-align: center;
    font-weight: 800;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

/* ============================================================
   CARDS & CONTAINERS
   ============================================================ */
.cream-card,
.scheme-detail-box,
.contact-card,
.office-address-box,
.emergency-helpline-card,
.member-card,
.intro-card,
.population-card,
.alerts-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    margin-bottom: 18px;
}

.cream-card:hover,
.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(26, 58, 107, 0.12);
}

.content-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

/* ============================================================
   SCHEMES ROW
   ============================================================ */
.schemes-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.scheme-card-box {
    background: var(--white);
    padding: 18px 12px;
    border-radius: 14px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    border: 2px solid transparent;
}

.scheme-card-box .icon {
    font-size: 1.8rem !important;
    margin-bottom: 8px !important;
}

.scheme-card-box h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.3;
}

.scheme-card-box:hover {
    border-color: var(--accent-color);
    background: var(--accent-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(200, 152, 42, 0.15);
}

/* ============================================================
   REVENUE TABLE
   ============================================================ */
.revenue-table-container {
    overflow-x: auto;
    margin-top: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.revenue-services-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    min-width: 600px;
}

.revenue-services-table th {
    background: var(--primary-color);
    color: white;
    padding: 13px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--accent-color);
}

.revenue-services-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(26, 58, 107, 0.06);
    color: var(--text-dark);
    font-size: 0.88rem;
}

.revenue-services-table tr:nth-child(even) {
    background-color: var(--primary-light);
}

.revenue-services-table tr:hover {
    background-color: var(--accent-light) !important;
}

/* Fix the scheme external link icon - was too large */
.scheme-link-external {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--primary-color);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 30px;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.9rem;
}

.scheme-link-external:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 58, 107, 0.2);
}

.scheme-link-external .scheme-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    flex-shrink: 0;
}

/* Services page scheme icon */
.scheme-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    background: var(--bg-color);
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
    transition: var(--transition);
    text-decoration: none;
}

.scheme-link:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateX(4px);
    color: var(--primary-color);
}

.scheme-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-color);
    flex-shrink: 0;
}

/* ============================================================
   LISTS
   ============================================================ */
.detail-list {
    margin: 16px 0;
    padding-left: 22px;
}

.detail-list li {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 0.93rem;
    line-height: 1.5;
}

.detail-list.numbered-list {
    list-style-type: decimal;
}

.detail-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 22px 0 12px;
    font-weight: 700;
    border-left: 3px solid var(--accent-color);
    padding-left: 12px;
}

/* ============================================================
   GALLERY GRID
   ============================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.gallery-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    aspect-ratio: 1 / 1;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-card:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(26, 58, 107, 0.18);
}

.gallery-card:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.gallery-lightbox.open,
.gallery-lightbox[style*="flex"] {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-lightbox:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   CERTIFICATE / SELF-DECLARATION CARDS (4 per row, 2 rows)
   ============================================================ */
.self-declaration-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.self-declaration-card {
    background: linear-gradient(145deg, #fff 0%, var(--primary-light) 100%);
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(26, 58, 107, 0.08);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.self-declaration-card::before {
    content: '📄';
    font-size: 2.2rem;
    display: block;
}

.self-declaration-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(26, 58, 107, 0.16);
    border-color: var(--primary-color);
    background: linear-gradient(145deg, var(--primary-light) 0%, var(--accent-light) 100%);
}

.declaration-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.4;
    flex: 1;
}

.declaration-download-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    box-shadow: 0 3px 10px rgba(26, 58, 107, 0.25);
}

.declaration-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 58, 107, 0.35);
    opacity: 0.92;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: linear-gradient(to right, #0a1628, #0f2447);
    color: rgba(255, 255, 255, 0.8);
    padding: 50px 0 20px;
    margin-top: 50px;
    border-top: 3px solid var(--accent-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 36px;
    padding: 0 20px;
}

.footer h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 18px;
    border-left: 4px solid var(--accent-color);
    padding-left: 12px;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    padding: 4px 0;
    font-size: 0.9rem;
}

/* ============================================================
   MEMBER CARDS
   ============================================================ */
.member-card {
    text-align: center;
    padding: 20px;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    background: white;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(26, 58, 107, 0.12);
    border-color: var(--accent-color);
}

.member-img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid var(--accent-color);
    padding: 2px;
}

.member-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.member-designation {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ============================================================
   STATS / INFO WIDGETS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-box {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 100%);
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-gold);
    opacity: 0.6;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(26, 58, 107, 0.1);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
    background: -webkit-linear-gradient(#1a3a6b, #c8982a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-light);
    font-weight: 600;
    margin-top: 2px;
    text-transform: uppercase;
}

/* Info Items */
.info-scroller {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    display: flex;
    gap: 12px;
    padding: 13px;
    border-radius: 10px;
    align-items: flex-start;
    transition: var(--transition);
}

.info-item:hover {
    transform: translateX(4px);
}

.alert-item {
    background-color: #FFF5F5;
    border-left: 4px solid #E53E3E;
}

.news-item {
    background-color: #F0FFF4;
    border-left: 4px solid #38A169;
}

.info-icon {
    font-size: 1.3rem;
    min-width: 28px;
    text-align: center;
}

.info-content h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.alert-item h4 {
    color: #C53030;
}

.news-item h4 {
    color: #276749;
}

.info-content p {
    font-size: 0.82rem;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

/* ============================================================
   VILLAGE DETAILS TABLE
   ============================================================ */
.village-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.village-details-table th,
.village-details-table td {
    padding: 9px 6px;
    border-bottom: 1px solid #eef2f7;
    font-size: 0.88rem;
    color: var(--text-dark);
}

.village-details-table tr:last-child td {
    border-bottom: none;
}

.village-details-table .label {
    font-weight: 500;
    text-align: left;
}

.village-details-table .value {
    font-weight: 700;
    text-align: right;
    color: var(--primary-color);
}

/* Excluded Services Grid - Two columns side by side */
.excluded-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #fffde7;
    border: 1px solid #f6e05e;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 12px 0 20px;
}

.excluded-services-grid ul {
    margin: 0;
    padding-left: 20px;
}

.excluded-services-grid li {
    font-size: 0.92rem;
    color: #7c4a00;
    margin-bottom: 6px;
    line-height: 1.5;
}

.census-header {
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.census-header h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 800;
}

/* ============================================================
   CARD HEADER / BADGES
   ============================================================ */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-title-sm {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge {
    background: var(--gradient-gold);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(200, 152, 42, 0.25);
}

/* ============================================================
   EMERGENCY HELPLINE
   ============================================================ */
.emergency-helpline-container {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
}

.emergency-helpline-card {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    margin-bottom: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.emergency-helpline-card:hover {
    transform: translateY(-3px);
    border-left-color: var(--accent-color);
}

.emergency-icon {
    font-size: 2rem;
}

.emergency-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.emergency-service {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 4px;
}

/* ============================================================
   CONTACT CARDS
   ============================================================ */
.contact-grid {
    display: grid;
    gap: 20px;
}

.contact-card {
    text-align: center;
    padding: 22px !important;
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.contact-role {
    color: var(--primary-color) !important;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px !important;
}

.contact-name,
.contact-mobile {
    font-size: 0.88rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
@media (min-width: 992px) {
    .grid-3-columns {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .contact-grid.grid-3-columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

.excluded-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

/* Map Preview */
.map-preview {
    transition: var(--transition);
    cursor: pointer;
    background: #EEEEEE !important;
}

.map-preview:hover {
    background: #E0E0E0 !important;
    transform: scale(1.02);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================================
   MOBILE MENU / SIDEBAR
   ============================================================ */
.mobile-menu-btn {
    display: none;
    background: rgba(26, 58, 107, 0.1);
    border: 1px solid rgba(26, 58, 107, 0.25);
    font-size: 1.4rem;
    cursor: pointer;
    color: #1a3a6b;
    padding: 7px 10px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #ffffff;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
    border-right: 3px solid var(--accent-color);
    z-index: 1000;
    transition: left 0.3s ease;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
}

.sidebar-menu.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
}

#sidebar-menu .nav-item {
    display: block;
    padding: 14px 22px;
    border-bottom: 1px solid rgba(26, 58, 107, 0.06);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 0;
    background: none;
    transition: background 0.2s;
}

#sidebar-menu .nav-item::before {
    display: none;
}

#sidebar-menu .nav-item:hover,
#sidebar-menu .nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    box-shadow: none;
}

/* ============================================================
   RESPONSIVE - TABLET (≤900px)
   ============================================================ */
@media (max-width: 900px) {
    .self-declaration-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gp-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #main-dashboard {
        margin: 10px auto;
        padding: 0 12px;
    }

    /* Hide desktop nav, show hamburger */
    .desktop-only {
        display: none !important;
    }

    .mobile-menu-btn {
        display: block !important;
    }

    .hero-section {
        height: 320px !important;
    }

    .hero-overlay {
        bottom: 12px !important;
        left: 12px !important;
        padding: 16px !important;
        max-width: 88%;
    }

    .hero-overlay h2 {
        font-size: 1.2rem !important;
    }

    .content-split {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .schemes-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-3-columns {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .village-title {
        font-size: 1.3rem;
    }

    .leader-img {
        width: 62px;
        height: 62px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .leadership-marquee {
        margin: 0 0 12px;
    }

    .gp-info-section {
        padding: 24px 20px;
    }

    .gp-info-section h2 {
        font-size: 1.4rem;
    }
}

/* ============================================================
   RESPONSIVE - MOBILE (≤600px)
   ============================================================ */
@media (max-width: 600px) {
    .header {
        padding: 0.7rem 4%;
    }

    .header-top {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .village-brand {
        flex-direction: row;
        gap: 0.8rem;
    }

    .gp-logo {
        height: 50px;
    }

    .village-title {
        font-size: 1rem;
        letter-spacing: 0.5px;
    }

    .header-utilities {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    .header-utilities img {
        height: 40px !important;
    }

    .lang-select {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .self-declaration-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gp-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .schemes-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .grid-3-columns {
        grid-template-columns: 1fr !important;
    }

    .gp-logo {
        height: 48px;
    }

    .scheme-card-box {
        padding: 14px 8px;
        min-height: 90px;
    }

    .leader-item {
        min-width: 95px;
        width: 95px;
        padding: 8px;
    }

    .leader-img {
        width: 52px;
        height: 52px;
    }

    .leader-info span {
        font-size: 0.6rem;
    }

    .leader-info p {
        font-size: 0.68rem;
    }

    .member-img {
        width: 80px;
        height: 80px;
    }

    .hero-section {
        height: 240px !important;
    }

    .hero-overlay {
        bottom: 8px !important;
        left: 8px !important;
        right: 8px !important;
        padding: 12px !important;
        max-width: 100%;
    }

    .hero-overlay h2 {
        font-size: 1rem !important;
    }

    .cream-card,
    .scheme-detail-box {
        padding: 18px;
    }

    .gp-info-section {
        padding: 20px 14px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .emergency-helpline-card {
        min-width: 100%;
    }
}

/* ============================================================
   EXTRA SMALL (≤380px)
   ============================================================ */
@media (max-width: 380px) {
    .village-title {
        font-size: 0.9rem;
    }

    .gp-logo {
        height: 42px;
    }

    .self-declaration-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .gp-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .schemes-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   MISC UTILITY
   ============================================================ */
.hidden-on-scroll {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Ensure header never moves */
.header {
    transform: none !important;
}

/* Headroom override - never hide menu */
.headroom--unpinned {
    transform: none !important;
}

/* Scheme detail box */
.scheme-detail-box {
    border-top: 3px solid var(--accent-color);
}

.scheme-detail-box h3 {
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

/* Procedure text */
.procedure-text {
    margin-top: 14px;
    font-weight: 700;
    color: #c53030;
    font-size: 0.92rem;
}

/* Main content grid */
.main-content-grid {
    display: grid;
    gap: 24px;
}

/* Sticky panel */
.sticky-panel {
    position: sticky;
    top: 20px;
    align-self: start;
}

@media (max-width: 900px) {
    .sticky-panel {
        position: static;
    }
}

/* ============================================================
   COMPREHENSIVE MOBILE RESPONSIVE IMPROVEMENTS
   ============================================================ */

/* --- Revenue Table: horizontal scroll on mobile --- */
.revenue-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- Village details table: responsive --- */
.village-details-table {
    font-size: 0.82rem;
}

/* --- Member grid: ensure proper wrapping --- */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
}

/* --- GP info grid: 2-column on mobile --- */
@media (max-width: 480px) {
    .gp-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gp-info-stat .stat-value {
        font-size: 1.3rem;
    }

    .gp-info-stat .stat-label {
        font-size: 0.68rem;
    }
}

/* --- Schemes row: 2-col on very small screens --- */
@media (max-width: 480px) {
    .schemes-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .scheme-card-box h4 {
        font-size: 0.75rem;
    }
}

/* --- Self declaration certificates: 2-col on mobile --- */
@media (max-width: 480px) {
    .self-declaration-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* --- Revenue services table full responsive --- */
@media (max-width: 700px) {

    .revenue-services-table th,
    .revenue-services-table td {
        padding: 8px 8px;
        font-size: 0.78rem;
    }

    .revenue-services-table {
        min-width: 500px;
    }
}

/* --- Content split: 1 column on mobile --- */
@media (max-width: 900px) {
    .content-split {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* --- Members page grid responsive --- */
@media (max-width: 600px) {
    .member-grid.grid-3-columns {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px;
    }
}

@media (max-width: 380px) {
    .member-grid.grid-3-columns {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* --- Member cards on home: auto fill --- */
.gp-members-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

@media (max-width: 600px) {
    .gp-members-home-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
}

/* --- Excluded services grid: 1 col on small mobile --- */
@media (max-width: 480px) {
    .excluded-services-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Emergency helpline: stack vertically on mobile --- */
@media (max-width: 600px) {
    .emergency-helpline-container {
        flex-direction: column;
    }

    .emergency-helpline-card {
        min-width: unset;
        width: 100%;
    }
}

/* --- Gallery: 2-col on small screens --- */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* --- Contact grid: 1-col on mobile --- */
@media (max-width: 600px) {
    .contact-grid.grid-3-columns {
        grid-template-columns: 1fr !important;
    }
}

/* --- Navigation: smaller font on narrow desktop --- */
@media (max-width: 1100px) and (min-width: 901px) {
    .nav-item {
        padding: 8px 12px;
        font-size: 0.82rem;
    }
}

/* --- Sidebar menu: readable on all screens --- */
#sidebar-menu .nav-item {
    font-size: 1rem;
    padding: 14px 22px;
}

/* --- Scheme detail box responsive --- */
@media (max-width: 600px) {
    .scheme-detail-box {
        padding: 16px;
    }

    .detail-subtitle {
        font-size: 1rem;
    }

    .detail-list li {
        font-size: 0.88rem;
    }
}

/* --- GP Info section: responsive text --- */
@media (max-width: 480px) {
    .gp-info-section h2 {
        font-size: 1.2rem;
    }

    .gp-info-section p {
        font-size: 0.88rem;
    }
}

/* --- Footer: proper padding on mobile --- */
@media (max-width: 600px) {
    .footer {
        padding: 30px 0 15px;
    }

    .footer-container {
        gap: 20px;
        padding: 0 16px;
    }

    .footer h3 {
        font-size: 1rem;
    }
}

/* --- Header: ensure logo + title always visible --- */
@media (max-width: 400px) {
    .village-brand {
        gap: 0.5rem;
    }

    .gp-logo {
        height: 38px;
    }

    .village-title {
        font-size: 0.85rem;
        letter-spacing: 0;
    }

    .header-utilities img {
        height: 32px !important;
    }

    .lang-select {
        padding: 5px 7px;
        font-size: 0.75rem;
    }
}

/* --- Leadership marquee: smaller on mobile --- */
@media (max-width: 480px) {
    .leadership-marquee {
        padding: 8px 0;
    }

    .leader-item {
        min-width: 85px;
        width: 85px;
        padding: 6px;
    }

    .leader-img {
        width: 46px;
        height: 46px;
    }
}

/* --- Lightbox: full screen on mobile --- */
@media (max-width: 600px) {
    .lightbox-img {
        max-width: 98vw;
        max-height: 80vh;
    }
}

/* --- Ensure images don't overflow container --- */
img {
    max-width: 100%;
    height: auto;
}

/* --- Section container: proper padding on mobile --- */
.section-container {
    padding: 0 2px;
}

@media (max-width: 600px) {
    .section-container {
        padding: 0;
    }
}

/* ============================================================
   COMPREHENSIVE MOBILE FIX v2 - All Sections Responsive
   ============================================================ */

/* ---- HEADER: RAJMUDRA (GP LOGO) + TITLE + SEAL always visible ---- */
@media (max-width: 768px) {
    .header {
        padding: 0.6rem 3% !important;
    }

    .header-top {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .village-brand {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .gp-logo {
        height: 52px !important;
        min-width: 52px;
        flex-shrink: 0;
    }

    .village-brand>div {
        min-width: 0;
        overflow: hidden;
    }

    .village-title {
        font-size: 0.95rem !important;
        letter-spacing: 0.3px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .village-brand>div>div:first-child {
        font-size: 0.6rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .village-brand>div>div:last-child {
        font-size: 0.65rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-utilities {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .header-utilities img {
        height: 36px !important;
    }

    .lang-select {
        padding: 5px 8px !important;
        font-size: 0.72rem !important;
        min-width: 60px;
    }

    .mobile-menu-btn {
        padding: 5px 7px !important;
    }
}

@media (max-width: 380px) {
    .gp-logo {
        height: 42px !important;
        min-width: 42px;
    }

    .village-title {
        font-size: 0.80rem !important;
    }

    .header-utilities img {
        height: 30px !important;
    }

    .lang-select {
        padding: 4px 6px !important;
        font-size: 0.68rem !important;
    }
}

/* ---- GP SERVICES TABLE: Mobile Horizontal Scroll ---- */
@media (max-width: 768px) {
    .revenue-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        margin: 10px -4px;
    }

    .revenue-services-table {
        min-width: 580px !important;
        font-size: 0.78rem;
    }

    .revenue-services-table th,
    .revenue-services-table td {
        padding: 8px 10px !important;
        font-size: 0.76rem;
        white-space: normal;
        word-break: break-word;
    }

    .revenue-services-table th {
        font-size: 0.75rem;
    }
}

/* ---- GP SERVICES PAGE: full layout fix ---- */
@media (max-width: 768px) {
    .scheme-detail-box {
        padding: 14px 12px !important;
    }

    .detail-subtitle {
        font-size: 0.92rem !important;
    }

    .detail-list li {
        font-size: 0.84rem !important;
        margin-bottom: 6px;
    }

    .excluded-services-grid {
        grid-template-columns: 1fr !important;
        padding: 12px 14px;
    }

    .procedure-text {
        font-size: 0.84rem !important;
    }

    /* GP services table narrow columns */
    .revenue-services-table td:nth-child(1),
    .revenue-services-table th:nth-child(1) {
        width: 36px;
        min-width: 36px;
    }
}

/* ---- REVENUE SERVICES: 7-column table on mobile ---- */
@media (max-width: 900px) {
    .revenue-services-table {
        min-width: 700px !important;
    }
}

/* ---- HOME PAGE: Population stats & members grid ---- */
@media (max-width: 600px) {
    .gp-info-section {
        padding: 18px 12px !important;
    }

    .gp-info-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .gp-info-stat .stat-value {
        font-size: 1.2rem !important;
    }

    .gp-info-stat .stat-label {
        font-size: 0.62rem !important;
    }

    .gp-members-home-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .member-card {
        padding: 14px 10px !important;
    }

    .member-img {
        width: 72px !important;
        height: 72px !important;
    }

    .member-name {
        font-size: 0.82rem !important;
    }

    .member-designation {
        font-size: 0.75rem !important;
    }
}

/* ---- VILLAGE DETAILS TABLE (Census) on mobile ---- */
@media (max-width: 600px) {
    .population-card {
        padding: 14px !important;
        overflow-x: auto;
    }

    .village-details-table {
        min-width: 360px;
        font-size: 0.76rem;
    }

    .village-details-table th,
    .village-details-table td {
        padding: 6px 4px !important;
        font-size: 0.72rem;
    }
}

/* ---- CONTACTS PAGE: 1-col stacking ---- */
@media (max-width: 600px) {
    .contact-grid.grid-3-columns {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .contact-card {
        padding: 16px !important;
        min-height: unset;
    }
}

/* ---- CERTIFICATES (Self-Declaration) on mobile ---- */
@media (max-width: 600px) {
    .self-declaration-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .self-declaration-card {
        padding: 14px 10px !important;
    }

    .declaration-card-title {
        font-size: 0.75rem !important;
    }

    .declaration-download-btn {
        font-size: 0.75rem !important;
        padding: 7px 12px !important;
    }
}

/* ---- SCHEMES ROW (quick links) ---- */
@media (max-width: 600px) {
    .schemes-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .scheme-card-box {
        min-height: 80px !important;
        padding: 10px 6px !important;
    }

    .scheme-card-box h4 {
        font-size: 0.7rem !important;
    }
}

/* ---- GALLERY ---- */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
}

/* ---- MEMBERS PAGE ---- */
@media (max-width: 600px) {
    .member-grid.grid-3-columns {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
}

/* ---- LEADERSHIP MARQUEE ---- */
@media (max-width: 600px) {
    .leadership-marquee {
        padding: 6px 0 !important;
        margin-bottom: 10px !important;
    }

    .leader-item {
        min-width: 82px !important;
        width: 82px !important;
        padding: 6px !important;
    }

    .leader-img {
        width: 44px !important;
        height: 44px !important;
    }

    .leader-info span {
        font-size: 0.56rem !important;
    }

    .leader-info p {
        font-size: 0.62rem !important;
    }
}

/* ---- SECTION TITLES ---- */
@media (max-width: 480px) {
    .section-title {
        font-size: 1.1rem !important;
    }

    .section-title-sm {
        font-size: 0.92rem !important;
    }
}

/* ---- HERO SECTION ---- */
@media (max-width: 480px) {
    .hero-section {
        height: 220px !important;
    }

    .hero-overlay {
        bottom: 6px !important;
        left: 6px !important;
        right: 6px !important;
        max-width: 100% !important;
        padding: 10px 12px !important;
    }

    .hero-overlay h2 {
        font-size: 0.9rem !important;
    }

    .hero-overlay p {
        font-size: 0.75rem !important;
    }
}

/* ---- FOOTER on mobile ---- */
@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 0 14px;
    }

    .footer {
        padding: 28px 0 14px;
    }
}

/* ---- MAIN DASHBOARD PADDING ---- */
@media (max-width: 600px) {
    #main-dashboard {
        padding: 0 8px;
        margin: 8px auto;
    }
}

/* ---- INFO CARDS (alerts/news) ---- */
@media (max-width: 600px) {

    .cream-card,
    .alerts-card,
    .intro-card,
    .population-card {
        padding: 14px !important;
        margin-bottom: 12px;
    }
}

/* ---- Emergency Helpline ---- */
@media (max-width: 600px) {
    .emergency-helpline-container {
        flex-direction: column;
        gap: 10px;
    }

    .emergency-helpline-card {
        min-width: unset !important;
        width: 100%;
        padding: 14px !important;
    }

    .emergency-number {
        font-size: 1.6rem !important;
    }
}

/* ---- Content split (2-column layout) ---- */
@media (max-width: 768px) {
    .content-split {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
}

/* ---- Ensure no horizontal overflow ---- */
* {
    max-width: 100%;
}

img,
table,
iframe {
    max-width: 100%;
}

/* ---- Sidebar nav item size fix for touch ---- */
@media (max-width: 900px) {
    #sidebar-menu .nav-item {
        font-size: 1rem;
        padding: 14px 22px;
        min-height: 48px;
    }
}