/* Basic styling for the body */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

/* Styling for the main menu bar container */
.menubar {
    background-color: #004d99; /* A clean, professional blue */
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: flex-end; /* Aligns all items to the right */
    align-items: center;
}

/* Styling for the unordered list of menu items */
.menu-items {
    list-style-type: none; /* Removes bullet points */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 25px; /* Adds space between menu items */
}

/* Styling for the links within the menu */
.menu-items li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.menu-items li a:hover {
    background-color: #003366; /* Darker blue on hover */
}


/* Styling for the real-time date and time display */
.datetime-display {
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap; /* Prevents text from wrapping */
}

/* --- TITLE BAR STYLES (Includes size reduction and hamburger support) --- */
.title-bar {
    background-color: #e0f2f7; /* A light blue background for the title bar */
    color: #333; /* Dark text color */
    padding: 10px 20px;
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Pushes items to the ends and center */
    align-items: center; /* Vertically centers items */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow for depth */
}

.title-bar .logo {
    height: 40px; /* **REDUCED LOGO SIZE** */
    width: auto; /* Maintain aspect ratio */
    border-radius: 15px;
}

.title-bar h1 {
    margin: 0; /* Remove default margin */
    font-size: 1.4em; /* **REDUCED TITLE FONT SIZE** */
    color: #004d99; /* A strong blue for the title text */
    text-align: center; /* Ensure text is centered within its flex item */
    flex-grow: 1; /* Allows the title to take up available space */
}

/* Optional: If you want to fine-tune spacing */
.left-logo {
    margin-right: 15px; /* Space between left logo and title */
}

.right-logo {
    margin-left: 15px; /* Space between right logo and title */
}

/* --- HAMBURGER MENU ICON --- */
.hamburger-menu {
    display: none; /* Hidden by default, only shown on mobile */
    cursor: pointer;
    padding: 5px;
    z-index: 100; /* Ensure it's clickable */
    /* Add a small margin to push it away from the edge slightly */
    margin-left: 15px;
}

.hamburger-menu div {
    width: 25px;
    height: 3px;
    background-color: #004d99; /* Matches title bar text color */
    margin: 4px 0;
    transition: 0.4s;
}

/* --- NAVBAR STYLES (Desktop) --- */
.navbar {
    background-color: #007bff; /* A vibrant blue background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 0 20px;
}

/* Menu list styling */
.nav-menu {
    list-style-type: none; /* Removes bullet points */
    margin: 0;
    padding: 0;
    display: flex; /* Desktop: horizontal layout */
    justify-content: space-around; /* Distributes items evenly */
    align-items: center;
    flex-wrap: wrap; 
}

/* Individual menu item styling */
.nav-item {
    padding: 15px 10px;
}

/* Styling for the menu links */
.nav-item a {
    color: white;
    text-decoration: none; /* Removes the underline */
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease; 
}

/* Hover effect for the links */
.nav-item a:hover {
    color: #cce5ff; /* Lighter blue on hover */
}

/* Optional: Adding a divider between items for a different look */
.nav-item:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Dropdown Menu Styling for 'प्रकाशने' (Desktop) --- */
.navbar .nav-menu .nav-item {
    position: relative; 
}

.navbar .nav-menu .dropdown-menu {
    display: none; 
    position: absolute;
    top: 100%; 
    left: 0;
    width: 900px; 
    padding: 15px 20px;
    background-color: #fff; 
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000; 
    list-style: none;
    margin: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
    text-align: left; 
}

.navbar .nav-menu .nav-item.has-dropdown.show-dropdown > .dropdown-menu {
    display: flex; 
}

.navbar .nav-menu .nav-item.has-dropdown.show-dropdown > a {
    background-color: #f0f0f0; 
}

.dropdown-menu .dropdown-column {
    flex-basis: 25%; 
    padding: 0 10px;
    border-right: 1px solid #eee; 
    list-style: none;
    margin: 0;
}

.dropdown-menu .dropdown-column:last-child {
    border-right: none;
}

.dropdown-menu h4 {
    color: #a00; 
    font-size: 1.1em;
    margin: 5px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #a00; 
    font-weight: bold;
}

.dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0; 
}

.dropdown-menu ul li a {
    display: block;
    padding: 4px 0;
    font-size: 0.9em;
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.dropdown-menu ul li a:hover {
    color: #007bff; 
}

/* --- SLIDER STYLES --- */
.slider-container {
    position: relative;
    margin: auto;
    overflow: hidden;
}

.slide {
    display: none;
}

.slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Fading animation */
.fade {
    -webkit-animation-name: fade;
    -webkit-animation-duration: 2.5s;
    animation-name: fade;
    animation-duration: 2.5s;
}

@-webkit-keyframes fade {
    from {
        opacity: .4;
    }
    to {
        opacity: 1;
    }
}

@keyframes fade {
    from {
        opacity: .4;
    }
    to {
        opacity: 1;
    }
}

/* --- FOOTER STYLES --- */
footer {
    background-color: #4b4943;
    color: #fff;
    font-size: 14px;
}

.footer-top {
    display: flex;
    justify-content: space-around;
    padding: 20px 50px;
    border-bottom: 2px solid #5b5952;
}

.footer-column {
    padding: 0 20px;
}

.footer-column h3 {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #d1d1d1;
}

.contact-item p {
    line-height: 1.4;
    margin: 0 0 10px;
}

.contact-item a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #d1d1d1;
    text-decoration: underline;
}

.footer-middle {
    background-color: #5d5d5d;
    text-align: center;
    padding: 15px 0;
}

.footer-note p {
    margin: 5px 0;
    line-height: 1.4;
}

.footer-note p:first-child {
    font-size: 13px;
    border-bottom: 1px solid #7c7c7c;
    padding-bottom: 10px;
    width: 80%;
    margin: 0 auto 10px;
}

.footer-bottom {
    background-color: #333;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    margin: 0;
}


.hit-box {
    background-color: #e53e3e;
    padding: 8px 15px;
    border-radius: 5px;
    text-align: center;
}

/* Style for the social media container */
.social-m {
    text-align: center; 
    margin-top: 20px;
}

/* Style for the heading */
.social-m h4 {
    color: white; 
    font-size: 1.2em;
    margin-bottom: 10px;
}

/* Style the list to be horizontal */
.social-m ul {
    list-style: none; 
    padding: 0;
    margin: 0;
    display: flex; 
    justify-content: center; 
    gap: 15px; 
}

/* Style for the list items (icons) */
.social-m ul li {
    display: inline-block; 
}

/* Style for the images (icons) */
.social-m ul li img {
    width: 30px; 
    height: 30px;
    border-radius: 5px; 
    transition: transform 0.3s ease; 
}

/* Hover effect */
.social-m ul li img:hover {
    transform: scale(1.1); 
}

/* --- TENDER NOTICE STYLES --- */
.tender-section {
    padding: 20px;
    text-align: center;
}

.tender-table {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 16px;
}

.tender-table th, .tender-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.tender-table th {
    background-color: #850202;
    color: white;
    text-align: center;
}

.tender-table td {
    text-align: center;
}

.tender-table tbody tr td:nth-child(2) {
    text-align: left;
}

.tender-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.tender-table tr:hover {
    background-color: #ddd;
}

.tender-table a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.tender-table a:hover {
    text-decoration: underline;
}

.table-title {
    color: #333;
    border-bottom: 2px solid #007bff;
    display: inline-block;
    padding-bottom: 5px;
}

/* --- NOTICE CONTAINER STYLES --- */
.notic_container {
    width: 80%;
    margin: 40px auto; 
    padding: 20px 50px; 
    background-color: #e9f5ff; 
    border: 1px solid #a8cde6; 
    border-left: 6px solid #1a73e8; 
    border-radius: 8px; 
    font-family: 'Inter', sans-serif;
    color: #333333;
    line-height: 1.6;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); 
    transition: box-shadow 0.3s ease; 
}

.notic_container:hover {
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1); 
}

.notic_container h3 {
    margin-top: 0;
    color: #1a73e8; 
    font-size: 1.25rem;
    border-bottom: 1px solid #d0e8f7;
    padding-bottom: 8px;
    margin-bottom: 12px;
    text-decoration: none;
}

/* --- GR TABLE STYLES --- */
.gr-main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-header {
    text-align: center;
    color: #004d40; 
    margin-bottom: 10px;
    font-size: 2em;
    border-bottom: 2px solid #e0f2f1;
    padding-bottom: 10px;
}

.sort-info {
    text-align: center;
    color: #616161;
    margin-bottom: 20px;
    font-style: italic;
}

.table-responsive {
    overflow-x: auto; 
    width: 100%;
}

.gr-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.gr-table th, .gr-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.gr-table thead {
    background-color: #004d40; 
    color: #ffffff;
}

.gr-table th {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.gr-table tbody tr:nth-child(even) {
    background-color: #f9f9f9; 
}

.gr-table tbody tr:hover {
    background-color: #e0f2f1; 
    cursor: pointer;
}

.gr-table .date-col {
    width: 100px;
    text-align: center;
    font-weight: 600;
}

.gr-table .download-col {
    width: 120px;
    text-align: center;
}

.download-link {
    color: #004d40;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.download-link:hover {
    color: #00796b; 
    text-decoration: underline;
}

.error-message, .no-data-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.error-message {
    background-color: #ffebee; 
    color: #c62828; 
    border: 1px solid #c62828;
}

.no-data-message {
    background-color: #e3f2fd; 
    color: #1976d2; 
    border: 1px solid #1976d2;
}


/* --- MODAL STYLES --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.7); 
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 90%; 
    max-width: 900px; 
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    animation-name: animatetop;
    animation-duration: 0.4s
}

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    text-align: center;
    color: #004d99; 
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

/* --- HIERARCHY CHART STYLES (for modal) --- */
.hierarchy-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.hierarchy-box {
    background-color: #e0f7fa; 
    border: 2px solid #00bcd4; 
    padding: 10px 15px;
    margin: 5px 0;
    text-align: center;
    font-weight: bold;
    color: #006064; 
    border-radius: 5px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.hierarchy-connector {
    width: 20px; 
    height: 30px; 
    position: relative;
    margin: 0 auto;
}

/* Create the downward arrow using a pseudo-element */
.hierarchy-connector::after {
    content: '\25BC'; 
    font-size: 24px;
    color: #1a237e; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1; 
}

.hierarchy-level {
    display: flex;
    justify-content: center;
    width: 100%;
}

.bottom-level-group {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding-top: 30px; 
    position: relative;
}

/* Line connecting to the three columns (T-junction) */
.bottom-level-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px; 
    background-color: #1a237e;
}

/* Horizontal line connecting the top boxes of the three columns */
.bottom-level-group::after {
    content: '';
    position: absolute;
    top: 30px; 
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: #1a237e;
    z-index: -1; 
}

.hierarchy-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    position: relative;
}

.hierarchy-column .hierarchy-connector.vertical {
    width: 20px;
    height: 30px;
    margin: 5px 0;
}

.hierarchy-column .department-head {
    margin-top: 5px;
}


/* --- MOBILE RESPONSIVE STYLING (max-width: 768px) --- */
@media screen and (max-width: 768px) {

    /* HIDE THE TOP MENU BAR */
    .menubar {
        display: none;
    }

    /* TITLE BAR ADJUSTMENTS */
    .title-bar .right-logo {
        display: none; /* **HIDE RIGHT LOGO** */
    }
    .hamburger-menu {
        display: block; /* **SHOW HAMBURGER BUTTON** */
    }
    .title-bar {
        padding: 10px; 
    }

    /* NAVBAR TOGGLE LOGIC */
    .navbar {
        padding: 0;
        /* Make the navbar full width and stack vertically under the title-bar */
        position: absolute; 
        top: 60px; /* Adjust this based on your title bar height (approx 60px) */
        left: 0;
        width: 100%;
        box-shadow: none; 
        z-index: 99; /* Below the modal, above the main content */
    }
    
    .nav-menu {
        /* Default state: HIDDEN and VERTICAL */
        display: none; 
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        width: 100%;
        background-color: #007bff; 
        padding: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* State when hamburger is clicked - **THE KEY TOGGLE CLASS** */
    .nav-menu.active {
        display: flex; /* **SHOW MENU ON CLICK** */
    }
    
    .nav-item {
        width: 100%;
        padding: 0; 
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-item a {
        display: block; 
        padding: 12px 20px; 
    }
    
    /* Dropdown menu styling for mobile */
    .navbar .nav-menu .dropdown-menu {
        position: static; 
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #0056b3; 
        padding: 0;
        margin-top: 0;
        display: none; /* Must be hidden by default on mobile */
        flex-direction: column;
    }

    .navbar .nav-menu .nav-item.has-dropdown.show-dropdown > .dropdown-menu {
        display: flex; 
    }

    .dropdown-menu .dropdown-column {
        flex-basis: 100%; 
        border-right: none;
        padding: 10px 20px;
    }

    .dropdown-menu ul li a {
        padding: 6px 0;
        color: #f0f0f0;
    }

    .dropdown-menu h4 {
        color: #ffcc00; 
        border-bottom-color: #ffcc00;
        padding-top: 10px;
    }
    
    /* GR Table card view styles */
    .gr-table thead { display: none; }
    .gr-table, .gr-table tbody, .gr-table tr, .gr-table td { display: block; width: 100%; }
    .gr-table tr { margin-bottom: 15px; border: 2px solid #004d40; border-radius: 5px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); padding: 10px 0; }
    .gr-table td { text-align: right; padding-left: 50%; position: relative; border: none; border-bottom: 1px dashed #e0e0e0; }
    .gr-table td:before { content: attr(data-label); position: absolute; left: 15px; width: calc(50% - 30px); padding-right: 10px; white-space: nowrap; text-align: left; font-weight: bold; color: #004d40; }
    .gr-table td:last-child { border-bottom: 0; }
    .gr-table .download-col, .gr-table .date-col { width: 100%; text-align: right; }
    .gr-table .download-col .download-link { display: inline-block; width: 100%; text-align: center; margin-top: 5px; padding: 5px 0; border-radius: 3px; background-color: #e0f2f1; }
    
    /* HIDE THE FOOTER */
    footer {
        display: none;
    }
    
    /* Hierarchy Chart adjustments for smaller screens */
    .bottom-level-group {
        flex-direction: column;
        align-items: center;
        padding-top: 15px;
    }
    .bottom-level-group::before, .bottom-level-group::after {
        display: none; /* Hide complex connecting lines on small screens */
    }
    .hierarchy-column {
        width: 100%;
        margin-bottom: 10px;
    }
    .hierarchy-column .department-head {
        margin-top: 0;
    }
    .hierarchy-connector {
        height: 15px; /* Reduce connector space */
    }
}