/* Dark Mode Styles - Refined */
body.dark-mode {
    background-color: #1a1a1a; /* Slightly lighter dark */
    color: #cccccc; /* Slightly dimmer white */
}

/* Emphasize bold text */
body.dark-mode b,
body.dark-mode strong {
    color: #e0e0e0; /* Slightly brighter than default text */
    /* font-weight: bold; /* Ensure boldness if needed */
}

/* Apply base colors to common containers */
body.dark-mode section,
body.dark-mode div,
body.dark-mode .container,
body.dark-mode .container-fluid,
body.dark-mode .row,
body.dark-mode main,
body.dark-mode article,
body.dark-mode aside {
    background-color: inherit; /* Inherit body background */
    color: inherit; /* Inherit body text color */
}

/* Override specific containers that might have their own light backgrounds */
body.dark-mode .well,
body.dark-mode .jumbotron {
    background-color: #252525; /* Slightly different dark shade */
    background-image: none; /* Remove theme gradient */
    color: #cccccc;
    border-color: #444;
}

body.dark-mode .jumbotron h1,
body.dark-mode .jumbotron h2,
body.dark-mode .jumbotron h3,
body.dark-mode .jumbotron p {
    color: inherit; /* Ensure text inside jumbotron inherits light color */
}

/* Ensure links are visible */
body.dark-mode a {
    color: #8cbced; /* Lighter blue for better contrast */
}

body.dark-mode a:hover,
body.dark-mode a:focus {
    color: #aed5f5; /* Even lighter blue on hover */
}

/* Headings */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .h1,
body.dark-mode .h2,
body.dark-mode .h3,
body.dark-mode .h4,
body.dark-mode .h5,
body.dark-mode .h6 {
    color: #e0e0e0 !important; /* Lighter color for headings, use important */
}

/* Override potential specific heading colors */
body.dark-mode h3,
body.dark-mode .h3 {
    color: #e5e5e5 !important; /* Slightly brighter light color for h3 */
}
body.dark-mode h4,
body.dark-mode .h4 {
    color: #e0e0e0 !important; /* Ensure h4 gets light color */
}

/* Specific Nav Head Links */
body.dark-mode .nav-head li a { /* Assuming .nav-head is the correct selector */
    color: #cccccc !important; /* Override default link blue */
}

body.dark-mode .nav-head li a:hover,
body.dark-mode .nav-head li a:focus {
    color: #ffffff !important; /* Lighter on hover */
}

/* Topbar */
body.dark-mode .topbar {
    background-color: #111111; /* Darkest background */
    color: #aaaaaa;
    border-bottom: 1px solid #333; /* Add a subtle border */
}

body.dark-mode .topbar .single-top p,
body.dark-mode .topbar a,
body.dark-mode .topbar .social li a i {
    color: #bbbbbb; /* Light color for text/links/icons */
}

body.dark-mode .topbar a:hover {
    color: #ffffff;
}

/* Adjust topbar buttons specifically if needed */
body.dark-mode .topbar .btn-default {
    background-color: #282828;
    border-color: #444;
    color: #bbbbbb;
}
body.dark-mode .topbar .btn-default:hover {
    background-color: #383838;
    color: #ffffff;
}

/* Style the dark mode toggle icon specifically */
body.dark-mode #btn-dark-mode i {
    color: #bbbbbb; /* Ensure icon inherits the button text color */
}
body.dark-mode #btn-dark-mode:hover i {
    color: #ffffff; /* Ensure icon inherits the button hover text color */
}

/* Middle Header */
body.dark-mode .middle-header { /* Assuming this is the correct selector */
    background-color: #1a1a1a; /* Match body background or choose another dark shade */
    border-bottom: 1px solid #333; /* Optional border */
}

/* Main Menu Container */
body.dark-mode .main-menu { /* Or the specific container for the navbar row */
    background-color: #252525 !important; /* Match navbar background */
    border-top: 1px solid #444; /* Optional separator from middle header */
    border-bottom: 1px solid #444; /* Optional separator from content */
}

/* Ensure logo text/links are visible if any */
body.dark-mode .middle-header .logo a {
    color: #8cbced; /* Match link color or adjust */
}

/* Navbar - Refined for Consistency */
body.dark-mode .navbar-default {
    background-color: #252525 !important; /* Use important if needed to override */
    background-image: none !important;
    border: none !important; /* Remove all borders for consistency */
    box-shadow: none !important;
    border-radius: 0;
}

/* Target the container inside navbar */
body.dark-mode .navbar-default .navbar-collapse {
    border-top: none; /* Remove potential internal borders */
    box-shadow: none;
}

/* Ensure ALL navbar list items get the base background */
body.dark-mode .navbar-default .navbar-nav > li {
    background-color: #252525 !important;
}

body.dark-mode .navbar-default .navbar-nav > li > a {
    color: #cccccc;
    text-shadow: none;
}

/* Style the SVG home icon link */
body.dark-mode .navbar-default .navbar-nav > li.current > a svg {
    fill: #cccccc; /* Make SVG icon light */
    /* Remove margin adjustments */
    vertical-align: middle; /* Try vertical alignment */
    height: 1em; /* Adjust size relative to font */
    position: relative;
    top: -1px; /* Fine-tune alignment */
}
body.dark-mode .navbar-default .navbar-nav > li.current > a:hover svg,
body.dark-mode .navbar-default .navbar-nav > li.current > a:focus svg {
    fill: #ffffff;
}

/* Style hover/focus/active/open states consistently for ALL items */
body.dark-mode .navbar-default .navbar-nav > li > a:hover,
body.dark-mode .navbar-default .navbar-nav > li > a:focus,
body.dark-mode .navbar-default .navbar-nav > li:hover > a { /* Add li:hover > a */
    color: #ffffff !important;
    background-color: #333333 !important;
}

/* Specific hover for odd items */
body.dark-mode .navbar-default .navbar-nav > li:nth-of-type(odd) > a:hover,
body.dark-mode .navbar-default .navbar-nav > li:nth-of-type(odd):hover > a { /* Add li:hover > a and ensure color */
    background-color: #333333 !important; /* Override general hover */
    color: #ffffff !important; /* Ensure text is white */
}

/* Apply active/open state background to the LI element for full coverage */
body.dark-mode .navbar-default .navbar-nav > .active,
body.dark-mode .navbar-default .navbar-nav > .open,
body.dark-mode .navbar-default .navbar-nav > li:focus,
body.dark-mode .navbar-default .navbar-nav > .current { /* Target .current class and add li:focus */
    background-color: #333333 !important;
}

/* Ensure text color changes on active/open LI state */
body.dark-mode .navbar-default .navbar-nav > .active > a,
body.dark-mode .navbar-default .navbar-nav > .active > a:focus,
body.dark-mode .navbar-default .navbar-nav > .active > a:hover,
body.dark-mode .navbar-default .navbar-nav > .open > a,
body.dark-mode .navbar-default .navbar-nav > .open > a:focus,
body.dark-mode .navbar-default .navbar-nav > .open > a:hover,
body.dark-mode .navbar-default .navbar-nav > li:focus > a, /* Add li:focus > a */
body.dark-mode .navbar-default .navbar-nav > .current > a,
body.dark-mode .navbar-default .navbar-nav > .current > a:focus,
body.dark-mode .navbar-default .navbar-nav > .current > a:hover {
    color: #ffffff !important;
    background-color: transparent !important; /* Explicitly keep link background transparent */
    background-image: none !important;
    box-shadow: none !important;
}

/* Ensure dropdown background matches */
body.dark-mode .navbar-default .navbar-nav > .open > .dropdown-menu {
    background-color: #252525;
    border: 1px solid #444;
}

body.dark-mode .navbar-default .navbar-nav > .open > .dropdown-menu > li > a {
    color: #cccccc;
}

body.dark-mode .navbar-default .navbar-nav > .open > .dropdown-menu > li > a:hover,
body.dark-mode .navbar-default .navbar-nav > .open > .dropdown-menu > li > a:focus {
    color: #ffffff;
    background-color: #383838;
}

/* Ensure navbar text color */
body.dark-mode .navbar-default .navbar-text {
    color: #cccccc;
}

/* Ensure navbar link color */
body.dark-mode .navbar-default .navbar-link {
    color: #cccccc;
}
body.dark-mode .navbar-default .navbar-link:hover {
    color: #ffffff;
}

/* Navbar Toggle Button (Mobile) */
body.dark-mode .navbar-default .navbar-toggle {
    border-color: #444;
}
body.dark-mode .navbar-default .navbar-toggle:hover,
body.dark-mode .navbar-default .navbar-toggle:focus {
    background-color: #333;
}
body.dark-mode .navbar-default .navbar-toggle .icon-bar {
    background-color: #ccc;
}

/* Buttons */
body.dark-mode .btn {
    text-shadow: none; /* Remove theme shadow */
    box-shadow: none; /* Remove theme shadow */
}
body.dark-mode .btn:active,
body.dark-mode .btn.active {
     box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.25); /* Darker inset shadow */
}

body.dark-mode .btn-default {
    color: #cccccc;
    background-color: #383838;
    background-image: none; /* Remove theme gradient */
    border-color: #555;
}

body.dark-mode .btn-default:hover,
body.dark-mode .btn-default:focus,
body.dark-mode .btn-default:active,
body.dark-mode .btn-default.active,
.open > .dropdown-toggle.btn-default.dark-mode {
    color: #ffffff;
    background-color: #484848;
    border-color: #666;
}

/* Primary Button */
body.dark-mode .btn-primary {
    color: #ffffff !important;
    background-color: #0056b3; /* Darker blue */
    background-image: none;
    border-color: #004085;
}

body.dark-mode .btn-primary:hover,
body.dark-mode .btn-primary:focus,
body.dark-mode .btn-primary:active,
body.dark-mode .btn-primary.active,
.open > .dropdown-toggle.btn-primary.dark-mode {
    color: #ffffff;
    background-color: #004085; /* Even darker blue */
    border-color: #002752;
}

/* Info Button */
body.dark-mode .btn-info {
    color: #ffffff;
    background-color: #117a8b; /* Darker cyan */
    background-image: none;
    border-color: #0f6674;
}
body.dark-mode .btn-info:hover,
body.dark-mode .btn-info:focus,
body.dark-mode .btn-info:active,
body.dark-mode .btn-info.active,
.open > .dropdown-toggle.btn-info.dark-mode {
    color: #ffffff;
    background-color: #0f6674; /* Even darker cyan */
    border-color: #0a4d56;
}

/* Warning Button */
body.dark-mode .btn-warning {
    color: #212529; /* Dark text for contrast on yellow */
    background-color: #d39e00; /* Darker yellow */
    background-image: none;
    border-color: #b88b00;
}
body.dark-mode .btn-warning:hover,
body.dark-mode .btn-warning:focus,
body.dark-mode .btn-warning:active,
body.dark-mode .btn-warning.active,
.open > .dropdown-toggle.btn-warning.dark-mode {
    color: #212529;
    background-color: #b88b00; /* Even darker yellow */
    border-color: #8a6900;
}

/* Panels */
body.dark-mode .panel {
    background-color: #252525;
    border-color: #444;
    box-shadow: none; /* Remove theme shadow */
}

body.dark-mode .panel-heading {
    background-color: #303030;
    background-image: none; /* Remove theme gradient */
    border-color: #444;
    color: #cccccc;
}

body.dark-mode .panel-body {
    color: #cccccc;
}

body.dark-mode .panel-footer {
    background-color: #303030;
    border-color: #444;
    color: #cccccc;
}

/* Forms */
body.dark-mode .form-control {
    background-color: #2a2a2a;
    border-color: #444;
    color: #cccccc;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.1); /* Darker inset */
}
body.dark-mode .form-control:focus {
    border-color: #64a0df; /* Light blue focus */
    box-shadow: inset 0 1px 1px rgba(0,0,0,.1), 0 0 8px rgba(100, 160, 223, 0.6);
}
body.dark-mode .form-control[disabled],
body.dark-mode .form-control[readonly],
body.dark-mode fieldset[disabled] .form-control {
    background-color: #303030;
    opacity: 0.7;
}

/* Input Groups */
body.dark-mode .input-group-addon {
    background-color: #303030;
    border-color: #444;
    color: #aaaaaa;
}

/* Footer */
body.dark-mode .footer {
    /* Assuming footer already has a dark background */
    /* Adjust text/link colors if needed */
    background-color: #111; /* Example: Make footer slightly darker */
    color: #cccccc;
}
body.dark-mode .footer a {
    color: #aed5f5; /* Changed from #8cbced for AAA contrast */
}
body.dark-mode .footer a:hover {
    color: #ffffff; /* Changed from #aed5f5 for better distinction */
}

/* Footer specific text elements */
body.dark-mode .footer p,
body.dark-mode .footer li,
body.dark-mode .footer address,
body.dark-mode .footer .single-contact i, /* Added icon selector */
body.dark-mode .footer .gstin-state span /* Added GSTIN span selector */
{
    color: #cccccc; /* Changed from #aaaaaa */
}

/* Specific elements from screenshot if identifiable */
body.dark-mode .highlights-section-selector { /* Replace with actual selector */
    background-color: #252525;
    border-color: #444;
}

body.dark-mode .clients-section-selector { /* Replace with actual selector */
    background-color: #1f1f1f; /* Slightly different dark bg */
}

/* Add more specific overrides as needed */

/* Ensure default text color for paragraphs and list items */
body.dark-mode p,
body.dark-mode li,
body.dark-mode dt,
body.dark-mode dd {
    color: inherit; /* Make sure these inherit the light text color */
}

/* Clients Section */
body.dark-mode .clients { /* Assuming .clients is the correct selector */
    background-color: #1f1f1f !important; /* Dark background, use important if needed */
    color: #cccccc; /* Ensure text inside is light */
    border-top: 1px solid #444; /* Optional: Add separation */
    border-bottom: 1px solid #444; /* Optional: Add separation */
}

/* Adjust heading color within .clients if necessary */
body.dark-mode .clients h2,
body.dark-mode .clients h3 {
    color: #e0e0e0;
}

/* Adjust client logo container styles if needed */
body.dark-mode .clients .single-clients {
    /* Example: remove any light background/border */
    background: none;
    border: none;
}

/* Copyright Section */
body.dark-mode .copyright { /* Assuming .copyright is the correct selector */
    background-color: #111111 !important; /* Match topbar background */
    color: #aaaaaa !important;
    border-top: 1px solid #333; /* Optional separator */
}

body.dark-mode .copyright p,
body.dark-mode .copyright a {
    color: inherit !important; /* Ensure text/links inherit the light color */
}

/* --- About Page Specific Styles --- */

/* Breadcrumbs */
body.dark-mode .breadcrumbs {
    background-color: #1f1f1f; /* Slightly different dark bg */
    background-image: none; /* Remove light-mode image if any */
}
body.dark-mode .breadcrumbs h2 {
    color: #e5e5e5;
}
body.dark-mode .breadcrumbs ul li a,
body.dark-mode .breadcrumbs ul li i {
    color: #aed5f5; /* Lighter link/icon color */
}
body.dark-mode .breadcrumbs ul li a:hover {
    color: #ffffff;
}
body.dark-mode .breadcrumbs ul li.active a {
    background-color: #333333; /* Standard dark hover/active bg */
    color: #ffffff;
}
body.dark-mode .breadcrumbs ul li.active a:hover {
    background-color: #444444;
}

/* Section Headings with Spans (e.g., Company History) */
body.dark-mode .about-content h3 span {
    color: #8cbced; /* Use standard link blue for contrast */
}

/* Human Resource Section Numbers */
body.dark-mode .features .serial {
    color: #aaaaaa; /* Much lighter gray */
}
/* Human Resource Section Inner Span */
body.dark-mode .features .f-content h3 .inner {
    color: #b0c4de; /* Lighter blue for sub-text */
}

/* Board of Directors Tabs */
body.dark-mode .nav-tabs.nav-justified > li {
    border-right-color: #444 !important; /* Darker border between tabs */
    background-color: #252525; /* Ensure base tab background */
}
body.dark-mode .nav-tabs.nav-justified > li > a {
    background-color: #252525; /* Dark base for tabs */
    color: #cccccc;
    border: none;
}
body.dark-mode .nav-tabs.nav-justified > li > a:hover,
body.dark-mode .nav-tabs.nav-justified > li > a:focus {
    background-color: #333333; /* Standard hover */
    color: #ffffff;
}
body.dark-mode .nav-tabs.nav-justified > li.active > a,
body.dark-mode .nav-tabs.nav-justified > li.active > a:hover,
body.dark-mode .nav-tabs.nav-justified > li.active > a:focus {
    background-color: #111111; /* Darker active tab */
    color: #ffffff;
    border: none;
}

/* Ensure tab content pane background */
body.dark-mode .tab-content {
    background-color: #1f1f1f; /* Match section bg or choose another dark */
    border: 1px solid #444;
    border-top: none;
}

/* Ensure director profile wells look ok */
body.dark-mode .well {
    background-color: #252525; /* Already styled, confirm */
    border-color: #444;
    color: #cccccc;
}

/* Ensure director profile headings are distinct */
body.dark-mode .well h3 {
    color: #e5e5e5 !important;
}
body.dark-mode .well h4 {
    color: #c0c0c0 !important; /* Slightly dimmer for subtitle */
}

/* Ensure Director table is styled */
body.dark-mode .tab-content .table th,
body.dark-mode .tab-content .table td {
     border-color: #444; /* Match other borders */
}

/* Ensure profile panel heading link is styled */
body.dark-mode .panel-group .panel-heading a {
    color: #e0e0e0;
}
body.dark-mode .panel-group .panel-heading a:hover {
    color: #ffffff;
}

/* --- Downloads/Stakeholders Page Specific Styles --- */

/* Section Headings */
body.dark-mode .about-content h3 {
     color: #e5e5e5; /* Ensure headings are light */
}

/* Tabs */
body.dark-mode .nav-tabs {
    border-bottom: 1px solid #444;
}
body.dark-mode .nav-tabs > li > a {
    color: #cccccc;
    background-color: #252525;
    border: 1px solid #444;
    border-bottom-color: transparent; /* For inactive tabs */
}
body.dark-mode .nav-tabs > li > a:hover,
body.dark-mode .nav-tabs > li > a:focus {
    color: #ffffff;
    background-color: #333333;
    border-color: #555;
    border-bottom-color: transparent;
}
/* Use the correct selector for the active tab link */
body.dark-mode .nav-tabs a.active,
body.dark-mode .nav-tabs a.active:hover,
body.dark-mode .nav-tabs a.active:focus {
    color: #ffffff;
    background-color: #383838; /* Lighter gray for active tab */
    border: 1px solid #555;    /* Slightly adjust border */
    border-bottom-color: #383838 !important; /* Match active tab bg - Use important if needed to override potential BS specificity */
}

/* Tab Content Pane */
body.dark-mode .tab-content {
    background-color: #1f1f1f;
    border: 1px solid #444;
    border-top: none;
    color: #cccccc;
}

/* Tables within Downloads/Stakeholders */
body.dark-mode .tab-content table {
    /* Assuming basic table styles exist, override specifics */
    background-color: transparent; /* Inherit from tab-content */
    border: 1px solid #444; /* Ensure main table border */
}
body.dark-mode .tab-content table th {
    background-color: #181818; /* Darker header */
    color: #e0e0e0;
    border: 1px solid #444; /* Adjusted border slightly */
}
body.dark-mode .tab-content table td {
    color: #cccccc;
    border-color: #444;
}
body.dark-mode .tab-content table tr:nth-of-type(odd) {
    background-color: #2a2a2a; /* Darker stripe */
}
body.dark-mode .tab-content table tr {
     border-color: #444;
}
body.dark-mode .tab-content table a {
    color: #8cbced; /* Standard link blue */
}
body.dark-mode .tab-content table a:hover {
    color: #aed5f5;
}
body.dark-mode .tab-content table a i {
    color: inherit; /* Icon should match link color */
}

/* --- Notice Board Page Specific Styles --- */

/* Style the top PESB table specifically */
body.dark-mode .about.section .about-content > table {
    border-collapse: collapse; /* Ensure borders combine */
    border: 1px solid #444;
    background-color: #1f1f1f;
}
body.dark-mode .about.section .about-content > table thead {
     background-color: #e0f2f7; /* This seems like a light mode style, override needed */
     background-color: #303030 !important; /* Dark header, use important if necessary */
}
body.dark-mode .about.section .about-content > table th {
    color: #e0e0e0 !important; /* Header text light */
    border: 1px solid #444 !important; /* Adjusted PESB table header border slightly */
    background-color: #181818 !important; /* Ensure dark background */
}
body.dark-mode .about.section .about-content > table tbody tr {
    background-color: #252525 !important; /* Override inline light background */
}
body.dark-mode .about.section .about-content > table td {
    color: #cccccc !important; /* Light text */
    border: 1px solid #444 !important; /* Cell border dark */
}
body.dark-mode .about.section .about-content > table td a {
    color: #8cbced !important; /* Link color light blue */
}
body.dark-mode .about.section .about-content > table td a:hover {
    color: #aed5f5 !important;
}
/* Ensure the PDF icon in the link is also light */
body.dark-mode .about.section .about-content > table td a i {
     color: #8cbced !important; /* Match link color */
}

/* Contact page table - navy header for dark theme */
body.dark-mode .contact .contact-table thead th {
    background-color: #1e3a5f !important;
    color: #fff !important;
    border-color: #2a4a7a !important;
}
body.dark-mode .contact .contact-table thead th i {
    color: #fff;
    opacity: 0.95;
}
body.dark-mode .contact .contact-table td {
    border-color: #444;
}
body.dark-mode .contact .contact-table tbody tr {
    background-color: inherit;
}
body.dark-mode .contact .contact-table tbody tr:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

/* --- Engineering & Technology Page Specific Styles --- */

/* Technology Buttons/Tabs */
body.dark-mode .our-projects .nav-tabs {
    border-bottom: none; /* Remove default border if any */
}
body.dark-mode .our-projects .nav-tabs li a {
    background-color: #444444; /* Medium gray */
    color: #ffffff;           /* White text */
    border: 1px solid #666;    /* Adjust border */
}
body.dark-mode .our-projects .nav-tabs li a:hover,
body.dark-mode .our-projects .nav-tabs li a:focus {
    background-color: #555555 !important; /* Lighter gray on hover - Added !important */
    color: #ffffff;
    border-color: #777;
}
/* Targeting li.active based on HTML structure for this specific section */
body.dark-mode .our-projects .nav-tabs li.active a {
    background-color: #606060; /* Distinct light gray for active */
    color: #ffffff;
    border-color: #888;
}
/* Style the speech bubble triangle for active state */
body.dark-mode .our-projects .nav-tabs li.active:after {
     border-top-color: #606060; /* Match the active background */
}

/* Fergedocument Box */
body.dark-mode .fergedocument {
    background-color: #1f1f1f;
    border: 1px solid #444;
    color: #cccccc;
}
body.dark-mode .fergedocument h4 {
    color: #e5e5e5 !important;
}
body.dark-mode .fergedocument ul li,
body.dark-mode .fergedocument .row .col-md-6 /* Target div text too */
{
    color: #cccccc;
}

/* Image Captions */
body.dark-mode .about-content p b {
    color: #e0e0e0; /* Use the emphasized bold color */
}

/* Ensure popup icon color */
body.dark-mode .about-img .button .popup i {
     color: #ffffff; /* Ensure icon is white on dark button */
}

/* --- Navigation Dropdown Specific Styles --- */

/* Ensure dropdown background and border using header specific selectors */
body.dark-mode .header .nav li .dropdown {
    background-color: #252525 !important; /* Override style.css */
    border: 1px solid #444 !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .3);
}

/* Ensure dropdown link text color */
body.dark-mode .header .nav li .dropdown li a {
    color: #cccccc !important; /* Override style.css */
    background-color: transparent !important; /* Override potential hover inheritance */
    border-bottom: 1px solid #444; /* Match dark divider */
}
body.dark-mode .header .nav li .dropdown li:last-child a {
    border-bottom: none;
}

/* Ensure dropdown link hover state */
body.dark-mode .header .nav li .dropdown li:hover > a, /* Target li:hover for full background */
body.dark-mode .header .nav li .dropdown li a:hover,
body.dark-mode .header .nav li .dropdown li a:focus {
    color: #ffffff !important;
    background-color: #484848 !important; /* Brighter hover background */
}

/* Ensure parent nav item keeps dark background when dropdown is open, EVEN ON HOVER */
body.dark-mode .navbar-default .navbar-nav > .active > a,
body.dark-mode .navbar-default .navbar-nav > .active > a:focus,
body.dark-mode .navbar-default .navbar-nav > .active > a:hover,
body.dark-mode .navbar-default .navbar-nav > .open > a,
body.dark-mode .navbar-default .navbar-nav > .open > a:focus,
body.dark-mode .navbar-default .navbar-nav > .open > a:hover,
body.dark-mode .navbar-default .navbar-nav > .current > a,
body.dark-mode .navbar-default .navbar-nav > .current > a:focus,
body.dark-mode .navbar-default .navbar-nav > .current > a:hover {
    color: #ffffff !important;
    background-color: transparent !important; /* Explicitly keep link background transparent */
    background-image: none !important;
    box-shadow: none !important;
}

/* Override the animated ::before element on dropdown items */
body.dark-mode .header .nav li .dropdown li a::before {
    background: #484848 !important; /* Match the NEW link hover background */
}

/* Ensure PDF icon in dropdown retains color */
body.dark-mode .header .nav li .dropdown li a i.far.fa-file-pdf {
    color: #dc3545 !important; /* Keep Bootstrap's danger red or choose another visible color */
}

/* --- Units/Division Page (Accordion/FAQ) Specific Styles --- */

/* Section Title */
body.dark-mode .why-choose .faq-area .title h2,
body.dark-mode .units_division_page_selector .faq-area .title h2 /* Add a page-specific selector if needed */
{
    color: #e5e5e5;
}
body.dark-mode .why-choose .faq-area .title h2 span,
body.dark-mode .units_division_page_selector .faq-area .title h2 span
{
    color: #8cbced; /* Standard link blue */
}

/* Accordion Panel */
body.dark-mode .faq-area .panel {
    background-color: transparent; /* Let children control color */
    border: none;
    box-shadow: none;
}

/* Accordion Header Link - Collapsed */
body.dark-mode .faq-area .faq-title a.collapsed {
    background-color: #252525 !important; /* Dark inactive header */
    color: #cccccc !important;
    border: 1px solid #444 !important;
    border-radius: 4px; /* Ensure radius on collapsed */
}
body.dark-mode .faq-area .faq-title a.collapsed:hover {
    background-color: #333333 !important;
    color: #ffffff !important;
    border-color: #555 !important;
}

/* Accordion Header Link - Expanded */
body.dark-mode .faq-area .faq-title a {
    background-color: #383838 !important; /* Lighter active header */
    color: #ffffff !important;
    border: 1px solid #555 !important;
    border-radius: 4px 4px 0 0; /* Top radius only */
}

/* Accordion Header Icons (+/-) */
body.dark-mode .faq-area .faq-title a::before { /* Assuming ::before holds the icon */
    color: #cccccc !important; /* Light icon color */
    background: transparent !important; /* Ensure no interfering background */
}
body.dark-mode .faq-area .faq-title a.collapsed::before {
     color: #cccccc !important; /* Keep light for collapsed */
}

/* Accordion Body */
body.dark-mode .faq-area .faq-body {
    background-color: #1f1f1f !important; /* Dark content area */
    color: #cccccc !important;
    border: 1px solid #555 !important; /* Match header border */
    border-top: none !important; /* Remove top border */
    border-radius: 0 0 4px 4px;
}

/* Override inline light backgrounds on specific sections */
body.dark-mode section.why-choose,
body.dark-mode section.c-butions /* Also target c-butions if it has light inline styles */
{
    background-color: #1f1f1f !important; /* Match other section backgrounds */
}

/* --- PIO Details Page Table Specific Styles --- */

/* Target the specific table structure on pio_details.php */
body.dark-mode .about.section .about-content table {
    border-collapse: collapse; /* Override inline style */
    border: 1px solid #444 !important; /* Override embedded border */
    background-color: #1f1f1f; /* Ensure dark background */
}
body.dark-mode .about.section .about-content table th {
    background-color: #181818 !important; /* Override embedded header BG */
    color: #e0e0e0 !important; /* Override embedded header color */
    border: 1px solid #444 !important; /* Override embedded header border */
    text-align: center; /* Keep centered */
}
body.dark-mode .about.section .about-content table td {
    color: #cccccc !important;
    border: 1px solid #444 !important; /* Override embedded cell border */
}
body.dark-mode .about.section .about-content table tr:nth-of-type(odd) {
    background-color: #2a2a2a !important; /* Override embedded odd row BG */
}
body.dark-mode .about.section .about-content table tr:nth-of-type(even) {
    background-color: #1f1f1f !important; /* Ensure even rows match base */
}
body.dark-mode .about.section .about-content table td a {
    color: #8cbced !important; /* Standard link blue */
}
body.dark-mode .about.section .about-content table td a:hover {
    color: #aed5f5 !important;
}

/* Invert specific images in dark mode */
body.dark-mode .dark-img-logo {
    filter: hue-rotate(180deg) invert(1) ; /* First make grayscale, then invert */
}

/* --- Breaking News Specific Styles --- */

/* Keep .news background red in dark mode */
body.dark-mode .breaking-news .news { /* Be specific */
    background-color: #dc3545 !important; /* Force the original red color */
    color: #ffffff !important; /* Ensure text remains white */
}

/* --- Breaking News Specific Styles --- */

/* --- Owl Carousel Specific Styles --- */

body.dark-mode .owl-dots {
    background-color: #252525; /* Dark background for the container */
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5); /* Darker shadow */
    /* border: 1px solid #444; /* Optional border */
}

body.dark-mode .owl-dots .owl-dot span {
    background: #666666; /* Medium gray for inactive dots */
}

body.dark-mode .owl-dots .owl-dot:hover span {
    background: #888888; /* Lighter gray on hover */
}

body.dark-mode .owl-dots .owl-dot.active span {
    background: #ffffff; /* White for active dot */
}

/* Ensure the active dot indicator ::before is styled if it exists */
body.dark-mode .owl-dots .owl-dot span::before {
    border-color: #ffffff; /* Make sure the active border is visible */
}

/* --- Carousel Toggle Button --- */

body.dark-mode #carouselToggle {
    background-color: #383838; /* Match btn-default */
    border-color: #555;
    color: #cccccc; /* Icon color */
}

body.dark-mode #carouselToggle:hover,
body.dark-mode #carouselToggle:focus {
    background-color: #484848;
    border-color: #666;
    color: #ffffff;
}

/* --- Pagination Styles --- */

body.dark-mode .pagination > li > a {
    background-color: #303030; /* Dark background */
    color: #cccccc; /* Light text */
    border: 1px solid #444; /* Dark border */
}

body.dark-mode .pagination > li > a:hover,
body.dark-mode .pagination > li > a:focus {
    background-color: #404040; /* Slightly lighter on hover */
    color: #ffffff;
    border-color: #555;
}

body.dark-mode .pagination > .active > a,
body.dark-mode .pagination > .active > a:hover,
body.dark-mode .pagination > .active > a:focus {
    background-color: #004085; /* Match btn-primary dark bg */
    border-color: #002752; /* Match btn-primary dark border */
    color: #ffffff;
    cursor: default;
}

body.dark-mode .pagination > .disabled > a,
body.dark-mode .pagination > .disabled > a:hover,
body.dark-mode .pagination > .disabled > a:focus {
    background-color: #252525; /* Darker disabled background */
    border-color: #444;
    color: #666666; /* Muted text */
    cursor: not-allowed;
}

/* --- Vigilance Page Specific Styles --- */

/* Ensure tab content pane has base styling */
body.dark-mode .faq-area .tab-content {
    background-color: #1f1f1f; /* Match other tab content */
    border: 1px solid #444;
    border-top: none;
    color: #cccccc;
    padding: 15px; /* Add padding if needed */
}

/* Vigilance Setup/CVO Profile/IEM Headings */
body.dark-mode .vigilance .about-content h3 {
    color: #e5e5e5 !important; /* Use existing heading color */
}
body.dark-mode .vigilance .about-content h3 span {
    color: #8cbced !important; /* Use existing span color */
}
body.dark-mode .vigilance-content h4, 
body.dark-mode .vigilance-content h5 {
    color: #e0e0e0; /* Lighter text for subheadings */
}

/* Vigilance Bordered Boxes (Setup & IEM) */
body.dark-mode .vigilance .bordered {
    background-color: #252525; /* Dark background */
    border: 1px solid #555 !important; /* Darker border for better contrast */
    color: #cccccc; /* Light text */
    padding: 1rem;
}
body.dark-mode .vigilance .bordered p,
body.dark-mode .vigilance .bordered h4 {
    color: inherit; /* Inherit light text */
}
body.dark-mode .vigilance .bordered strong {
    color: #e0e0e0; /* Brighter bold text */
}

/* Vigilance Setup SVG Arrows */
body.dark-mode .vigilance svg path {
    fill: #cccccc; /* Light color for arrows */
}

/* Vigilance Text Content */
body.dark-mode .vigilance-content p {
    color: #cccccc;
}
body.dark-mode .vigilance-content strong {
    color: #e0e0e0;
}

/* Vigilance IEM Links */
body.dark-mode .vigilance-iem a {
    color: #8cbced; /* Standard link blue */
}
body.dark-mode .vigilance-iem a:hover {
    color: #aed5f5;
}

/* Styling for simple link tabs */
body.dark-mode .tab-pane > a {
    color: #8cbced; /* Standard link blue */
    display: block; /* Make block for padding */
    padding: 10px 0;
}
body.dark-mode .tab-pane > a:hover {
    color: #aed5f5;
    text-decoration: underline;
}
body.dark-mode .tab-pane > a span {
    color: #cccccc !important; /* Lighter text for file size/type - Added !important */
}
body.dark-mode .tab-pane > a i.far.fa-file-pdf {
    color: #dc3545 !important; /* Keep PDF icon red */
}

/* Contact Us Tab */
body.dark-mode #contact-us p {
    color: #cccccc;
}
body.dark-mode #contact-us a {
     color: #8cbced;
}
body.dark-mode #contact-us a:hover {
     color: #aed5f5;
}

/* CVO Message Image - Ensure filter is applied */
body.dark-mode #cvo-message img.dark-img-logo {
    filter: grayscale(1) invert(1); /* Re-apply filter if needed */
}

/* Make CVO Profile section background slightly distinct */
body.dark-mode #vgsetup > .row > .col-sm-12 > section.vigilance:nth-of-type(2) {
    background-color: #212121 !important; /* Slightly different dark shade */
}

/* --- Breaking News Specific Styles --- */

/* --- SlickNav Mobile Menu Styles --- */

/* Button */
body.dark-mode .header .slicknav_btn {
    background-color: #252525; /* Match navbar bg */
    border: 1px solid #444;
    border-radius: 4px;
}
body.dark-mode .header .slicknav_btn:hover,
body.dark-mode .header .slicknav_btn:focus {
    background-color: #333333; /* Match navbar toggle hover */
}
body.dark-mode .header .slicknav_icon-bar {
    background-color: #cccccc; /* Light icon bars */
    box-shadow: none;
}

/* Menu */
body.dark-mode .header .slicknav_nav {
    background: #252525; /* Match dropdown bg */
    border: 1px solid #444;
    box-shadow: 0 5px 10px rgba(0, 0, 0, .3);
}

/* Links */
body.dark-mode .header .slicknav_nav a {
    color: #cccccc;
    background: transparent;
    border-bottom: 1px solid #444; /* Divider */
    text-shadow: none;
    box-shadow: none;
}
body.dark-mode .header .slicknav_nav .slicknav_row:hover,
body.dark-mode .header .slicknav_nav a:hover,
body.dark-mode .header .slicknav_nav a:focus {
    background: #383838; /* Match dropdown hover */
    color: #ffffff;
}

/* Submenu Indicator */
body.dark-mode .header .slicknav_nav .slicknav_arrow {
    color: #cccccc; /* Light arrow */
}

/* Ensure no bottom border on last item */
body.dark-mode .header .slicknav_nav li:last-child a {
     border-bottom: none;
}

/* PDF Icon in mobile menu */
body.dark-mode .header .slicknav_nav a i.far.fa-file-pdf {
    color: #dc3545 !important; /* Keep red */
}

/* Invert specific images in dark mode */
body.dark-mode .dark-img-logo {
    filter: hue-rotate(180deg) invert(1) ; /* First make grayscale, then invert */
}