/* Government Theme - Clean, Professional, Official */

:root {
    --gov-primary: #f8f9fa;
    /* Light background */
    --gov-header-bg: #ffffff;
    /* White header */
    --gov-text: #000000;
    /* Distinct Black Text */
    --gov-accent: #1a5f7a;
    /* Professional Blue/Grey */
    --gov-border: #e9ecef;
    --gov-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --gov-font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--gov-primary);
    color: var(--gov-text);
    font-family: var(--gov-font-family);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Prevent horizontal scroll on body */
}

/* --- Global Text Styling --- */
/* DEFAULT to black, but allow overrides for specific white text areas */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
a,
li,
td,
th {
    color: #000000;
}

/* Override for Slider/Hero Text to be White */
.hero-overlay h2,
.hero-overlay span,
.hero-overlay p,
.hero-overlay div {
    color: #FFFFFF !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    /* Enhance visibility */
}

/* --- Header Section (Full Width) --- */
.header {
    width: 100% !important;
    /* Fixed width issue */
    background: #ffffff !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0 !important;
    margin: 0 !important;
    /* Removed border-bottom to fix "2 lines" issue, Minister section has top border */
    position: relative;
    z-index: 1000;
    box-sizing: border-box;
    overflow-x: hidden;
    /* Prevent internal scrolling */
}

.header-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header Top Row Layout */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    padding-bottom: 10px;
    /* Reduced padding */
}

/* Left: GP Logo */
.village-title-container {
    display: flex;
    align-items: center;
    flex: 1;
    /* Takes left space */
    min-width: 200px;
}

.gp-logo {
    height: 80px;
    /* Slightly adjusted size */
    width: auto;
}

/* Center: Title + LGD ID */
.header-center-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 2;
    /* Takes center space */
    /* Removed absolute positioning to prevent cropping/overlap issues */
    z-index: 10;
}

.village-title {
    font-size: 2.2rem;
    /* Larger */
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px;
    color: #000000 !important;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    /* Prevent wrapping if possible */
}

.id-center {
    background: #f1f3f5 !important;
    /* Light accent background */
    border: 1px solid #ced4da;
    padding: 10px 30px;
    /* Increased padding */
    min-width: 260px;
    /* Wider for translations */
    border-radius: 25px;
    /* Rounded pill shape */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.id-label,
.id-value,
.census-id {
    font-size: 0.5rem;
    /* Small attractive size */
    line-height: 1.2;
    color: #333 !important;
    font-weight: 600;
}

/* Right: Rajmudra + Language */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    /* Takes right space */
    gap: 15px;
    min-width: 200px;
}

.rajya-mudra-logo {
    height: 80px;
    width: auto;
}

.lang-select {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #000000;
    font-weight: 600;
}

/* --- Minister Section (Full Width, Blended) --- */
.leadership-row {
    width: 100% !important;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa) !important;
    /* Subtle fade */
    /* Only Keep Blue Line Here if needed, or remove completely if Header has it. 
       User said Keep blue line. Let's add it here as top border */
    border-top: 2px solid var(--gov-accent);
    padding: 15px 0;
    /* Reduced padding */
    margin-top: 5px;
    /* Reduced spacing */
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.leadership-inline {
    display: flex !important;
    justify-content: center !important;
    /* Centered alignment */
    flex-wrap: wrap !important;
    /* Wrap allowed to prevent scrollbar */
    width: 100%;
    max-width: 1400px;
    /* Constraint max width for large screens */
    gap: 20px;
    /* Reduced gap */
}

/* Remove overflow-x automatic causing scrollbar */
.leadership-inline::-webkit-scrollbar {
    display: none;
}

.leader-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
    /* Minimal card feel for leader */
    border: 1px solid #eee !important;
    padding: 8px;
    /* Reduced padding */
    border-radius: 8px;
    transition: transform 0.2s;
    min-width: 120px;
    /* Ensure consistent width */
}

.leader-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12) !important;
}

.leader-img {
    width: 75px;
    /* Slightly smaller for better fit */
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--gov-accent);
    /* Double border effect */
    margin-bottom: 8px;
}

.leader-info span {
    /* Designation */
    font-size: 0.75rem;
    font-weight: 600;
    color: #555 !important;
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leader-info p {
    /* Name */
    font-size: 0.85rem;
    font-weight: 700;
    color: #000000 !important;
    margin: 0;
}

/* --- Layout: Equal Height Columns for Members & Population --- */
.content-split {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
    /* Stretch children to same height */
    width: 100%;
}

.members-grid-area {
    flex: 3;
    /* Allocate more space to members */
    display: flex;
    flex-direction: column;
}

.sticky-panel {
    flex: 1;
    /* Sidebar takes less space */
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

/* Ensure the cards inside fill the height */
.members-grid-area section,
.sticky-panel .cream-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gp-members-home-grid {
    display: grid !important;
    /* Force 2 columns min */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    flex-grow: 1;
    /* Allow grid to fill space */
}

/* Ensure images in grid don't break layout */
.gp-members-home-grid img {
    max-width: 100%;
    height: auto;
}


/* --- Attractive Section Styling with Borders --- */
.section-title {
    font-size: 1.5rem;
    border-bottom: 3px solid var(--gov-accent);
    padding-bottom: 10px;
    margin-bottom: 15px;
    /* Reduced margin */
    color: #000 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 6px;
    background: var(--gov-accent);
    border-radius: 3px;
}

/* Card Styling Enhancements */
.cream-card,
.scheme-detail-box,
.contact-card,
.scheme-card-box,
.info-item,
.pop-sidebar-item {
    background: #ffffff !important;
    border: 1px solid #dadce0 !important;
    /* Subtle definitive border */
    border-top: 4px solid var(--gov-accent) !important;
    /* Featured top border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06) !important;
    border-radius: 8px !important;
    padding: 20px;
    /* Reduced padding */
    margin-bottom: 20px;
    /* Reduced margin */
    transition: all 0.3s ease;
}

/* Inner Page Enhancements */
.main-wrapper {
    padding: 20px;
    background: #f1f3f5;
    /* Light grey background for content area */
    min-height: 600px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 15px;
}

/* --- Footer Styling (One Row Inline) --- */
.footer {
    background: #2d3436 !important;
    /* Darker professional footer background */
    border-top: 4px solid var(--gov-accent);
    color: #ffffff !important;
    /* White text for contrast on dark bg */
    padding: 30px 0;
    margin-top: 30px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    /* Spread items across row */
    align-items: flex-start;
    /* Align top */
    flex-wrap: nowrap;
    /* Force single row on desktop */
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 30px;
}

.footer div {
    flex: 1;
    /* Equal width columns */
    color: #ffffff !important;
}

.footer h3 {
    color: #ffca28 !important;
    /* Golden accent for headings */
    border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer p,
.footer li,
.footer a,
.footer strong,
.footer span {
    color: #f0f0f0 !important;
    /* Off-white text */
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer a:hover {
    color: #ffca28 !important;
    text-decoration: underline;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {

    /* Tablet/Mobile */
    .header-top {
        flex-direction: column;
        text-align: center;
    }

    .header-center-block {
        order: 2;
        width: 100%;
        margin-top: 10px;
    }

    .village-title-container {
        justify-content: center !important;
        order: 1;
        width: 100%;
    }

    .header-right {
        justify-content: center;
        order: 3;
        width: 100%;
        margin-top: 10px;
    }

    .village-title {
        font-size: 1.5rem;
        /* Scaled down */
        white-space: normal;
        /* Allow wrap on mobile */
    }

    .gp-members-home-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        /* Strict 2 columns on mobile/tablet as requested */
    }

    .leadership-inline {
        gap: 15px;
        flex-wrap: wrap !important;
        /* Ensure wrapping on smaller screens */
    }

    .footer-container {
        flex-wrap: wrap;
        /* Allow wrapping on scroll screens */
    }

    .footer div {
        flex: 1 1 100%;
        /* Full width on mobile */
        text-align: center;
        margin-bottom: 20px;
    }

    .content-split {
        flex-direction: column;
        /* Stack on mobile */
    }

    .members-grid-area,
    .sticky-panel {
        width: 100%;
    }
}