/* Base Reset & Typography */
@font-face {
    font-family: 'Kalimati';
    src: url('assets/fonts/Kalimati.ttf') format('truetype'),
        url('assets/fonts/Kalimati.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Mukta", Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    background-color: #f7f7f7;
}

body.lang-ne {
    font-family: 'Kalimati', "Mukta", Arial, sans-serif;
}

.container {
    width: 100%;
    max-width: 1100px;
    /* Standard gov width */
    margin: 0 auto;
    padding: 0 10px;
}

a {
    text-decoration: none;
    color: #003893;
}

a:hover {
    text-decoration: underline;
}

/* Top Strip */
.top-strip {
    background-color: #f1f1f1;
    border-bottom: 1px solid #ddd;
    padding: 5px 0;
    font-size: 11px;
}

.top-strip .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a {
    color: #555;
    margin: 0 5px;
}

/* Main Header */
.main-header {
    background-color: #fff;
    padding: 12px 0;
    border-bottom: 4px solid #DC143C;
    /* Nepal Red */
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.flag-section {
    /* No absolute positioning needed for default flex behavior */
}

@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        align-items: flex-start;
        /* Align items to the left on mobile if desired, or center */
        gap: 15px;
        padding-bottom: 10px;
    }

    .flag-section {
        align-self: flex-end;
        /* Move download button to right on mobile if vertical stack */
        /* Or keep it standard flow */
        align-self: center;
    }
}

.logo-section {
    display: flex;
    align-items: center;
    /* Vertically center logo and text */
}

.logo-section a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    /* Ensure no underline on container */
}

.header-logo {
    height: 50px;
    width: auto;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-text h1 {
    color: #003893;
    font-size: 24px;
    font-weight: bold;
    line-height: 0.8;
}

.header-text p {
    color: #DC143C;
    /* Nepal Blue */
    font-size: 14px;
    font-weight: bold;
}

.header-text small {
    color: #666;
    font-size: 12px;
}

.header-cta {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background-color: #DC143C;
    color: white;
    padding: 6px 15px;
    text-decoration: none;
    border: 1px solid #b91c1c;
    line-height: 1.2;
}

.header-cta:hover {
    background-color: #b91c1c;
    text-decoration: none;
    color: white;
}

.header-cta small {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.9;
}

.header-cta span {
    font-weight: bold;
    font-size: 13px;
}

/* Navigation */
.main-nav {
    background-color: #003893;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.main-nav li {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.main-nav a {
    display: block;
    color: #fff;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: bold;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: #DC143C;
    text-decoration: none;
}

/* Marquee */
.notice-marquee {
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    padding: 8px 0;
    display: flex;
    align-items: center;
    font-size: 13px;
}

.notice-marquee .container {
    display: flex;
    align-items: center;
}

.notice-label {
    background: #DC143C;
    color: white;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 10px;
    white-space: nowrap;
}

/* Layout Grid */
.main-content-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    /* Main content vs Sidebar */
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .main-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Content Styling */
.hero-box,
.services-box,
.sidebar-widget {
    background: #fff;
    border: 1px solid #ccc;
    margin-bottom: 15px;
}

.hero-title-bar,
.box-header,
.widget-header {
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
    padding: 8px 15px;
    border-left: 4px solid #003893;
}

.hero-title-bar h3,
.box-header h3,
.widget-header h3 {
    font-size: 14px;
    color: #003893;
    font-weight: bold;
    text-transform: uppercase;
}

.hero-body {
    padding: 25px;
}

/* Only apply bg image on home page if needed, or specific class */
body.home-page .hero-body {
    background: linear-gradient(to right, #ffffff 45%, rgba(255, 255, 255, 0.9) 60%, rgba(255, 255, 255, 0) 75%), url('assets/images/solution-found.webp');
    background-position: right center;
    background-size: contain;
    background-repeat: no-repeat;
    min-height: 320px;
    display: flex;
    align-items: flex-start;
}

.hero-split {
    display: block;
    width: 100%;
}

@media (max-width: 600px) {
    body.home-page .hero-body {
        background: #fff;
        min-height: auto;
    }

    .hero-split {
        flex-direction: column;
    }

    body:not(.home-page) .hero-split {
        display: flex;
    }
}

/* For other pages, revert to flex */
body:not(.home-page) .hero-body {
    background: none;
    min-height: auto;
    display: block;
}

body:not(.home-page) .hero-split {
    display: flex;
    gap: 20px;
}

@media (max-width: 600px) {
    body:not(.home-page) .hero-split {
        flex-direction: column-reverse;
    }
}

.hero-text {
    max-width: 65%;
    font-size: 14px;
    text-align: justify;
    position: relative;
    z-index: 2;
    margin-top: 0;
}

.hero-text p {
    margin-top: 0;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .hero-text {
        max-width: 100%;
    }
}

/* Removed hero-image-box styles as it's no longer used */


/* Download Buttons */
.download-section {
    margin-top: 20px;
    border-top: 1px dotted #ccc;
    padding-top: 15px;
}

.download-section h4 {
    font-size: 13px;
    color: #333;
    margin-bottom: 10px;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #003893;
    color: white;
    border: 1px solid #002360;
    padding: 6px 12px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    border-radius: 0 !important;
    /* Force square */
    box-shadow: none !important;
}

.download-btn:hover {
    background: #DC143C;
}

.download-btn svg {
    fill: currentColor;
}

/* Tables */
.services-table-container {
    padding: 10px;
}

.services-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.services-table th,
.services-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.services-table th {
    background: #f9f9f9;
    font-weight: bold;
    color: #333;
}

.services-table tr:nth-child(even) {
    background: #fcfcfc;
}

.services-table tr:hover {
    background: #fffbe6;
}

.service-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.table-icon {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #eee;
}

.status-active {
    color: green;
    font-weight: bold;
    font-size: 11px;
}

.status-pending {
    color: #999;
    font-size: 11px;
    font-style: italic;
}

/* Sidebar */
.sidebar-widget {
    padding-bottom: 0;
}

.stats-list,
.sidebar-links {
    list-style: none;
    padding: 10px;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dotted #ddd;
    padding: 6px 0;
    font-size: 12px;
}

.stats-list li:last-child {
    border-bottom: none;
}

.sidebar-links li {
    margin-bottom: 6px;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.sidebar-links li::before {
    content: "» ";
    color: #DC143C;
    display: inline-block;
    margin-right: 5px;
}

.sidebar-links a {
    font-size: 12px;
    display: inline-block;
    color: #333;
}

.personnel-card {
    padding: 10px;
    font-size: 12px;
}

/* Footer */
.main-footer {
    background: #003893;
    color: white;
    padding-top: 20px;
    border-top: 5px solid #DC143C;
    font-size: 12px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 20px;
}

.footer-col h5 {
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
    margin-bottom: 10px;
    color: #fff;
}

.footer-col p,
.footer-col a {
    color: #e0e0e0;
    margin-bottom: 5px;
    display: block;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    background: #002360;
    padding: 10px 0;
    text-align: center;
    font-size: 11px;
    color: #aaa;
}

/* --- Accessibility Features --- */
.access-dropdown {
    display: inline-block;
    position: relative;
}

.access-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 5px;
    z-index: 1000;
    min-width: 140px;
    display: none;
}

.access-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    font-family: inherit;
}

.access-menu button:hover {
    background: #eee;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    /* Reduced margin from 15% */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    /* Limit height */
    overflow-y: auto;
    /* Enable vertical scrolling within modal */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    color: #003893;
    border-bottom: 2px solid #DC143C;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-body {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    text-align: justify;
}

/* High Contrast Mode */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast .main-header,
body.high-contrast .top-strip,
body.high-contrast .hero-box,
body.high-contrast .services-box,
body.high-contrast .sidebar-widget,
body.high-contrast .main-footer,
body.high-contrast .footer-bottom,
body.high-contrast .notice-marquee,
body.high-contrast .access-menu,
body.high-contrast .modal-content {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

body.high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.high-contrast .header-text h1,
body.high-contrast .header-text p,
body.high-contrast .header-text small,
body.high-contrast .notice-label,
body.high-contrast .hero-title-bar h3,
body.high-contrast .box-header h3,
body.high-contrast .widget-header h3,
body.high-contrast .footer-col h5,
body.high-contrast .services-table th,
body.high-contrast .modal h2,
body.high-contrast .modal-body {
    color: #fff !important;
    background: #333 !important;
}

body.high-contrast .btn-group .download-btn,
body.high-contrast .header-cta {
    background-color: #333 !important;
    border: 2px solid #fff !important;
    color: #fff !important;
}

body.high-contrast table,
body.high-contrast th,
body.high-contrast td {
    border-color: #fff !important;
    color: #fff !important;
    background: #000 !important;
}

body.high-contrast .access-menu button {
    color: #fff !important;
}

body.high-contrast .access-menu button:hover {
    background: #333 !important;
}

/* Font Scaling */
body.font-large {
    font-size: 15px !important;
    /* Base increase */
}

body.font-large .hero-text,
body.font-large .header-text p,
body.font-large .main-nav a,
body.font-large .hero-title-bar h3,
body.font-large .box-header h3,
body.font-large .widget-header h3,
body.font-large .notice-marquee,
body.font-large .services-table,
body.font-large .footer-col p,
body.font-large .footer-col a,
body.font-large .modal-body {
    font-size: 1.15em !important;
    /* Scale up relative items */
}

body.font-xl {
    font-size: 17px !important;
}

body.font-xl .hero-text,
body.font-xl .header-text p,
body.font-xl .main-nav a,
body.font-xl .hero-title-bar h3,
body.font-xl .box-header h3,
body.font-xl .widget-header h3,
body.font-xl .notice-marquee,
body.font-xl .services-table,
body.font-xl .footer-col p,
body.font-xl .footer-col a,
body.font-xl .modal-body {
    font-size: 1.3em !important;
}