/* Custom Styles for NCRPB - Fixed & Responsive */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    font-family: 'Roboto', sans-serif;
}

:root {
    --primary: #3284d6;
    --secondary: #FFB300;
    --accent: #00A651;
    --dark: #2C3E50;
    --light: #F8F9FA;
}

/* FIX 1: Page ko hilne se rokne ke liye */
html, body { 
    max-width: 100%; 
    overflow-x: hidden; 
    background-color: #f8f9fa; 
    transition: font-size 0.2s; 
    height: 100%;
}

/* Accessibility Bar */
.access-bar {
    background: #E8F4FD;
    border-bottom: 2px solid var(--primary);
    padding: 8px 0;
}

.btn-gov {
    background: var(--primary);
    color: white !important;
    border-radius: 4px;
    font-size: 12px;
    padding: 4px 12px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Header Section */
.gov-header {
    background: var(--primary);
    color: white;
    padding: 9px 0;
}

.header-logo {
    height: 65px;
    width: auto;
    border-radius: 4px;
}

.whats-new-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #FFB300;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
    margin-left: 5px;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 179, 0, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 179, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 179, 0, 0); }
}

/* Navigation */
.gov-nav {
    background: white;
    border-bottom: 3px solid var(--primary);
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 15px 18px !important;
    font-size: inherit;
    border-right: 1px solid #f0f0f0;
}

.navbar-nav .nav-link:hover {
    background: var(--primary) !important;
    color: white !important;
}

/* Multi-level Dropdown Logic */
.dropdown-menu {
    border: none;
    border-top: 3px solid var(--primary);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 0;
    /* FIX 2: Menu ko floating banane ke liye taaki section na hile */
    position: absolute !important; 
}

.dropdown-item {
    padding: 10px 20px;
    font-size: 13px;
    border-bottom: 1px solid #f8f9fa;
}

.dropdown-item:hover {
    background-color: #f1f7ff;
    color: var(--primary);
    padding-left: 25px;
    transition: all 0.3s;
}

/* Submenu on Hover for Desktop */
@media (min-width: 992px) {
    .dropdown-submenu {
        position: relative;
    }

    /* FIX 3: Submenu position lock */
    .dropdown-submenu > .dropdown-menu {
        top: 0 !important;
        left: 100% !important;
        margin-top: -1px; 
        position: absolute !important;
        display: none;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block !important;
    }

    /* Invisible bridge to prevent flickering */
    .dropdown-submenu > .dropdown-menu::before {
        content: "";
        position: absolute;
        top: 0;
        left: -10px;
        width: 10px;
        height: 100%;
    }
}

/* Dropdown Animation */
.dropdown-menu {
    animation: fadeIn 0.3s ease;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .navbar-nav .nav-link { border-right: none; border-bottom: 1px solid #f0f0f0; }
    .header-logo { height: 50px; }
    .gov-header { text-align: center; }
    .justify-content-end { justify-content: center !important; margin-top: 15px; }
    .dropdown-menu { position: static !important; } /* Mobile par fixed nahi chahiye */
}

/* High Contrast */
body.high-contrast {
    filter: invert(1) hue-rotate(180deg);
    background: #000;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- NCRPB Custom Styles --- */

:root {
    --primary-blue: #004a99;
    --ncr-gold: #f1c40f;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
}

/* Hero Banner Fix */
.hero-banner {
    width: 100%;
    height: 685px;
    object-fit: cover;
    object-position: center center;
}

/* News Card & Marquee */
.news-card {
    border-radius: 8px;
    border-top: 4px solid var(--primary-blue);
}

.hover-link:hover {
    color: var(--primary-blue) !important;
    text-decoration: underline !important;
}

/* Side Banners (Maps & Icons) */
.side-banner-img {
    width: 100%;
    max-width: 320px;
    margin-bottom: 15px;
    border-radius: 4px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.side-banner-img:hover {
    transform: scale(1.02);
}

/* Welcome Section */
.text-justify {
    text-align: justify;
}

.leading-relaxed {
    line-height: 1.8;
}

/* Important Links Box */
.links-scroll-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.link-item {
    display: block;
    padding: 8px 10px;
    background: white;
    margin-bottom: 5px;
    border-left: 3px solid var(--primary-blue);
    text-decoration: none;
    color: #444;
    font-size: 13px;
    transition: all 0.2s;
}

.link-item:hover {
    background: var(--primary-blue);
    color: white !important;
    padding-left: 15px;
}

/* High Contrast Mode */
.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}
.high-contrast .bg-white, .high-contrast .news-card {
    background-color: #222 !important;
    color: #fff !important;
}
.high-contrast a { color: #ffff00 !important; }

/* Submenu Styling for Header */
.dropdown-submenu { position: relative; }
.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

#footer {
    margin-top: auto;
}
#footer_include{
    margin-top:auto;
}

.custom-card{
    background:#fff;
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 4px 20px rgba(0,0,0,0.08);
}

.page-header{
    background:linear-gradient(135deg,#0d6efd,#0b5ed7);
    padding:28px;
}

.page-header h2{
    margin:0;
    color:#fff;
    font-size:2rem;
    font-weight:700;
}

.content-section{
    padding:35px;
}

.section-heading{
    font-size:1.5rem;
    font-weight:700;
    color:#0d6efd;
    margin-bottom:25px;
}

.custom-list{
    padding-left:20px;
}

.custom-list li{
    margin-bottom:18px;
    line-height:32px;
    color:#333;
}

.link-btn{
    display:inline-block;
    background:#198754;
    color:#fff !important;
    text-decoration:none;
    padding:10px 20px;
    border-radius:8px;
    margin-top:12px;
    font-weight:600;
    transition:0.3s;
}

.link-btn:hover{
    background:#146c43;
    color:#fff !important;
}

/* Responsive */
@media(max-width:768px){

    .page-header h2{
        font-size:1.5rem;
    }

    .content-section{
        padding:20px;
    }

    .custom-list li{
        line-height:28px;
    }
}

/* =========================
   SITEMAP PAGE DESIGN
========================= */

.sitemap-card{
    border-radius:20px;
    overflow:hidden;
    background:#fff;
}

.sitemap-header{
    background:linear-gradient(135deg,#0066cc,#004a99);
    padding:35px;
    color:#fff;
}

.sitemap-header h2{
    font-size:36px;
    font-weight:700;
    margin-bottom:10px;
}

.sitemap-header p{
    font-size:16px;
    opacity:0.9;
}

.sitemap-section{
    margin-bottom:40px;
    padding-bottom:25px;
    border-bottom:1px solid #e9ecef;
}

.sitemap-section:last-child{
    border-bottom:none;
    margin-bottom:0;
}

.sitemap-section h4{
    font-size:28px;
    color:#0066cc;
    font-weight:700;
    margin-bottom:20px;
    position:relative;
    padding-left:18px;
}

.sitemap-section h4::before{
    content:"";
    position:absolute;
    left:0;
    top:8px;
    width:6px;
    height:28px;
    background:#0066cc;
    border-radius:10px;
}

.sitemap-section h5{
    margin-top:25px;
    margin-bottom:15px;
    color:#004a99;
    font-weight:600;
    font-size:20px;
}

.sitemap-section ul{
    padding-left:20px;
}

.sitemap-section ul li{
    margin-bottom:12px;
    line-height:28px;
}

.sitemap-section ul li a{
    text-decoration:none;
    color:#333;
    font-size:16px;
    transition:0.3s;
}

.sitemap-section ul li a:hover{
    color:#0066cc;
    padding-left:5px;
}

@media(max-width:768px){

    .sitemap-header{
        padding:25px;
    }

    .sitemap-header h2{
        font-size:28px;
    }

    .sitemap-section h4{
        font-size:22px;
    }

    .sitemap-section h5{
        font-size:18px;
    }

    .sitemap-section ul li a{
        font-size:15px;
    }
}
    