/* ==========================================================================
   MUNICIPAL COUNCIL PALWAL - GLOBAL ARCHITECTURE & DESIGN SYSTEM
   ========================================================================== */

:root {
    /* Color Palette Matrix */
    --gov-primary: #0f172a;       /* Deep Navy Slate */
    --gov-secondary: #1e293b;     /* Slate Core */
    --gov-accent: #0284c7;        /* Administrative Blue Accent */
    --gov-accent-hover: #0369a1;  /* Deep Accent Hover */
    --gov-background: #f8fafc;    /* Clean Content Surface BG */
    --gov-white: #ffffff;
    --gov-border: rgba(0, 0, 0, 0.08);
    --text-main: #334155;
    --text-muted: #64748b;
    
    /* Typography Stacks */
    --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

/* Base Structural Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: var(--font-body);
    background-color: var(--gov-background);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--gov-primary);
}

a {
    color: var(--gov-accent);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--gov-accent-hover);
}

/* ==========================================================================
   ACCESSIBILITY TOP ENGINE BAR
   ========================================================================== */
.top-accessibility-bar {
    background-color: var(--gov-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    font-size: 13px;
    font-weight: 500;
}

.gov-core-brand .pill-badge {
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Font Engine Switches */
.font-engine, .premium-lang-engine {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    padding: 3px;
    border-radius: 6px;
}

.font-trigger, .lang-selector {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.font-trigger:hover, .lang-selector:hover {
    color: var(--gov-white);
    background: rgba(255, 255, 255, 0.1);
}

.font-trigger.active, .lang-selector.active {
    background: var(--gov-white);
    color: var(--gov-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   NEO-HEADER FRAME IDENTITY AREA
   ========================================================================== */
.neo-header {
    background: var(--gov-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--gov-border);
}

.header-grid-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-core {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-logo-frame img {
    height: 75px;
    width: auto;
    object-fit: contain;
}

.brand-text-matrix .main-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.2;
}

.brand-text-matrix .sub-title {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin: 4px 0 0 0;
    letter-spacing: 0.2px;
}

.national-emblem-cluster {
    display: flex;
    align-items: center;
    gap: 16px;
}

.national-emblem-cluster img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.national-emblem-cluster .divider-line {
    width: 1px;
    height: 35px;
    background-color: var(--gov-border);
}

/* ==========================================================================
   STICKY MAIN NAVIGATION SYSTEM
   ========================================================================== */
.sticky-nav-bar {
    background: var(--gov-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--gov-border);
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 4px 0;
}

.nav-container-inner {
    position: relative;
    width: 100%;
}

/* FIX: Absolute mobile toggle control. Always hidden layout on desktop screens */
.nav-toggle {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #f8fafc;
    border: 1px solid var(--gov-border);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--gov-primary);
    font-size: 15px;
}

.modern-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
    flex-wrap: wrap;
}

.modern-menu li {
    position: relative;
}

.modern-menu li a.nav-item-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    color: var(--gov-secondary);
    font-weight: 600;
    font-size: 14.5px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-menu li a.nav-item-link:hover {
    background: #f1f5f9;
    color: var(--gov-accent);
}

.modern-menu li a.highlight-portal {
    background: rgba(2, 132, 199, 0.08);
    color: var(--gov-accent);
}

.modern-menu li a.highlight-portal:hover {
    background: var(--gov-accent);
    color: var(--gov-white);
}

.drop-arrow {
    font-size: 10px;
    margin-left: 2px;
    opacity: 0.7;
}

/* Standard Dropdown Engine Components */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--gov-white);
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    list-style: none;
    padding: 8px;
    margin-top: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1050;
}

.dropdown-content li a {
    display: block;
    padding: 10px 14px;
    color: var(--gov-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.dropdown-content li a:hover {
    background: #f8fafc;
    color: var(--gov-accent);
    padding-left: 18px;
}

/* Desktop Hover Activation Trigger */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-content {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* ==========================================================================
   MAIN SYSTEM VIEWPORT CORE ENGINE
   ========================================================================== */
.main-viewport-engine {
    padding-top: 35px;
    padding-bottom: 60px;
    min-height: 75vh;
}

/* ==========================================================================
   RE-ENGINEERED FIXED FOOTER COMPONENT
   ========================================================================== */
.neo-footer {
    background: #090d16; /* Clean premium dark layout tone */
    color: rgba(255, 255, 255, 0.75);
    padding: 70px 0 0 0;
    border-top: 4px solid var(--gov-accent);
    font-size: 14.5px;
}

.footer-inner {
    width: 100%;
}

/* FIX: Strict hierarchy controls for title and subtitle stacking */
.footer-identity-card {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.footer-identity-card .f-logo {
    height: 60px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.f-text-block {
    display: flex;
    flex-direction: column; /* Forces the Govt of Haryana label down */
    justify-content: center;
}

.footer-identity-card .f-title {
    color: var(--gov-white);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

/* "Government of Haryana Administrative Portal" clean typography positioning */
.footer-identity-card .f-sub {
    font-size: 13.5px;
    color: #64748b; /* Clean distinct muted grey */
    margin: 4px 0 0 0;
    line-height: 1.4;
    font-weight: 500;
}

.f-description {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
}

/* Grid Grid Networks */
.f-column-title {
    color: var(--gov-white);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    position: relative;
}

/* Also find this inside your '@media (max-width: 576px)' block near the bottom and REMOVE it: */
/* .f-column-title::after {
    left: 50%;
    transform: translateX(-50%);
} */


.f-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.f-links li {
    margin-bottom: 12px;
}

.f-links li a {
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.2s ease;
    font-size: 14px;
}

.f-links li a:hover {
    color: var(--gov-white);
    padding-left: 6px;
}

/* Contact Desks Card */
.f-contact-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.f-contact-card .c-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}

.f-contact-card .c-item i {
    color: var(--gov-accent);
    font-size: 16px;
    margin-top: 2px;
}

.f-contact-card .c-item a {
    color: rgba(255, 255, 255, 0.65);
}

.f-contact-card .c-item a:hover {
    color: var(--gov-white);
}

/* Social Icon Blocks */
.f-social-grid {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.f-social-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.f-social-grid a:hover {
    background: var(--gov-accent);
    color: var(--gov-white);
    transform: translateY(-3px);
}

/* Meta Strips Bottom Panels */
.footer-meta-strip {
    margin-top: 50px;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.meta-counters {
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-count {
    color: #f1f5f9;
    font-weight: 700;
    font-family: monospace;
    font-size: 14px;
}

.developer-credit {
    font-weight: 500;
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATION MEDIA RULES
   ========================================================================== */

@media (min-width: 992px) {
    /* Hard assertion to prevent visual bugs on wide desktop arrays */
    .nav-toggle {
        display: none !important;
    }
    .modern-menu {
        display: flex !important;
    }
}

@media (max-width: 991px) {
    /* Transform Navigation Bar for Mobile Tablets */
    .nav-toggle {
        display: flex !important;
    }

    .modern-menu {
        display: none;
        flex-direction: column !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        border-bottom: 1px solid var(--gov-border);
        padding: 15px 20px !important;
        gap: 8px !important;
        max-height: 75vh;
        overflow-y: auto;
    }

    /* JavaScript State Class Trigger mapping */
    .modern-menu.open {
        display: flex !important;
    }

    .modern-menu li {
        width: 100%;
    }

    .modern-menu li a.nav-item-link {
        width: 100%;
        padding: 12px 16px !important;
        justify-content: space-between;
        background: #f8fafc;
    }

    /* Handle inner mobile nested submenus collapse states */
    .dropdown-content {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        background: #f1f5f9 !important;
        width: 100% !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-top: 4px;
        padding-left: 12px !important;
    }

    .dropdown.open > .dropdown-content {
        display: block !important;
    }

    /* Core Structural Adaptive Grids */
    .header-grid-wrapper {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .brand-core {
        flex-direction: column;
        gap: 12px;
    }

    .national-emblem-cluster {
        margin-top: 10px;
    }

    .footer-meta-strip {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .brand-text-matrix .main-title {
        font-size: 20px;
    }
    
    .footer-identity-card {
        flex-direction: column;
        text-align: center;
    }
    
 
    
    .f-links li a:hover {
        padding-left: 0;
    }
}