/* Import Google Fonts: Poppins for Latin scripts and Noto Sans Devanagari for Hindi */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* General Body & Top Bar Styling */
body {
    /* Default to Poppins for English and other Latin-based languages */
    font-family: "Poppins", "Noto Sans Devanagari", sans-serif;
    margin: 0;
    padding: 0;

}

/*
 * Explicitly set Noto Sans Devanagari for Hindi content.
 * This ensures that when the language is 'hi', the browser prioritizes the font with Hindi characters.
 */
html[lang="hi"] body,
html[lang="hi"] .btn, html[lang="hi"] input, html[lang="hi"] textarea, html[lang="hi"] select, html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] h4, html[lang="hi"] h5, html[lang="hi"] h6, html[lang="hi"] p, html[lang="hi"] a, html[lang="hi"] span, html[lang="hi"] div {
    font-family: 'Noto Sans Devanagari', "Poppins", sans-serif;
}

.top-bar {
    background: linear-gradient(135deg, #003366 0%, #001f3f 100%);
    padding: 0.5rem 0;
    font-size: 0.875rem;

}


.top-bar a {
    color: #e3e3e3;
    text-decoration: none;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.top-bar a:hover {
    color: #d1d1d1;
}





/* Main Navbar Styling */
.main-navbar {
    transition: all 0.3s ease;
}

.main-navbar .navbar-brand {
    font-size: 1.5rem;
    color: #003366;
}

.main-navbar .nav-item {
    margin: 0 0.5rem; /* Adds horizontal margin between nav items */
}

.main-navbar .nav-link {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 0.5rem 1rem;
    position: relative;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: #001f3f;
    transform: translateY(-2px);
}

.main-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: #0056b3;
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
}

.main-navbar .nav-link:hover::after,
.main-navbar .nav-link.active::after {
    transform: scaleX(1);
}

/* Prevent underline hover effect on dropdown toggles by removing the pseudo-element */
.main-navbar .nav-link.dropdown-toggle::after {
    content: none;
}

/* Login Button in Navbar */
.btn-primary-login {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #fff;
    border-radius: 8px; /* Reduced radius */
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary-login:hover {
    color: #fff;
    background-color: #004494;
    border-color: #004494;
    transform: translateY(-2px);
}

/* Hero Section Styling */
.hero-section {
    background: linear-gradient(135deg, #003366 0%, #001f3f 100%);
    color: #fff;
    padding: 4rem 0;
    min-height: auto;
    display: flex;
    align-items: center;
}

.hero-section .text-content h2 {
    font-weight: 400;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    font-size: clamp(1.8rem, 4vw, 2.8rem); /* Responsive font size */
}

.hero-section .text-content .lead {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.hero-section .text-content .description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 90%;
}

/* Hero Buttons */
.btn-primary-hero {
    background-color: #0056b3; /* A slightly darker blue */
    border-color: #0056b3;
    color: #fff;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary-hero:hover {
    background-color: #004494;
    border-color: #004494;
    transform: translateY(-2px);
}

.btn-outline-hero {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.btn-outline-hero:hover {
    background-color: #fff;
    color: #001f3f;
    transform: translateY(-2px);
}

/* Hero Image Card */
.hero-card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hero-card img {
    max-height: 300px;
    width: 100%;
    object-fit: cover;
    border-bottom: 1px solid #e9ecef;
}

.hero-card-body {
    padding: 1.5rem;
    text-align: center;
}

.hero-card .card-title {
    color: #212529;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.hero-card .card-text {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .hero-section {
        text-align: center;
    }
    .hero-section .text-content .description {
        max-width: 100%;
    }
}

/* Online Services Section */
.online-services-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.online-services-section .section-title {
    text-align: center;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
    font-size: 2.25rem;
}

.section-description {
    text-align: center;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.15rem;
    line-height: 1.6;
}

.service-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e7f3ff; /* Light blue background */
    color: #0056b3; /* Blue icon color */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    font-size: 2rem;
    flex-shrink: 0;
}

.service-title {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.75rem;
}

.service-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.draft-group-icon-wrapper {
    margin: 0 auto 1.25rem auto;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.draft-group-icon-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/*
* Specific styling for the "Access Service" button in the online services section.
* Using !important to ensure this rule overrides any conflicting Bootstrap styles.
*/
.online-services-section .service-card .btn-primary {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
}

.online-services-section .service-card .btn-primary:hover {
    background-color: #004494 !important;
    border-color: #003d82 !important;
}

/* New, specific class for the "Access Service" buttons to override Bootstrap defaults */
/* Make the selector more specific to override Bootstrap's default transparent background for <a> tags with .btn class */
a.btn-access-service {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    color: #fff !important; /* Ensure text is white */
}

a.btn-access-service:hover {
    color: #fff !important;
    background-color: #004494 !important;
    border-color: #003d82 !important;
}

/* Create Draft Section */
/* ... (rest of the file remains the same) ... */

/* Create Draft Section */
.create-draft-section {
    padding: 5rem 0;
    background-color: #fff; /* White background for contrast */
}

.create-draft-section .section-title {
    text-align: center;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
    font-size: 2.25rem;
}

.draft-group-card {
    border: 1px solid #e0e5ec;
    border-radius: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.draft-group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 9, 41, 0.08);
    border-color: #0056b3;
}

.draft-group-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.draft-group-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #001f3f;
}

.draft-group-card .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.draft-group-card .btn-primary {
    background-color: #0056b3;
    border-color: #0056b3;
}

.draft-group-card .btn-primary:hover {
    background-color: #004494;
    border-color: #003d82;
    transform: translateY(-1px);
}

/* Draft Template Modal Styling */
.modal-group-header h4 {
    color: #001f3f;
    font-weight: 600;
}

/* Ensure template cards in modal have a consistent height */
.modal .draft-group-card.h-100 .card-body {
    align-items: center;
    text-align: center;
}
.modal .draft-group-card .card-title {
    font-size: 1rem; /* Slightly smaller title for modal cards */
}

/* Modal Scroll Behavior Upgrade */
.modal-dialog.modal-xl .modal-content {
    /* Set a maximum height relative to the viewport height */
    max-height: 90vh;
    /* Use flexbox to control the layout of header, body, and footer */
    display: flex;
    flex-direction: column;
}

.modal-body {
    /* Allow the modal body to grow and scroll if its content overflows */
    overflow-y: auto;
}

/* Why Choose Us Section */
.why-choose-us-section {
    padding: 5rem 0;
    background-color: #f8f9fa; /* Light gray background to alternate with white */
}

.why-choose-us-section .section-title {
    text-align: center;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
    font-size: 2.25rem;
}

.feature-item {
    text-align: center;
    padding: 2.5rem 2rem;
    background-color: #fff;
    border-radius: 15px;
    height: 100%;
    border: 1px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: #cde4fe;
}

.feature-icon {
    font-size: 2.5rem;
    color: #0056b3;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-title {
    font-weight: 600;
    color: #001f3f;
    margin-bottom: 0.75rem;
}

.feature-text {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Footer Section */
.footer-section {
    background-color: #001f3f; /* Dark Navy Blue */
    color: #adb5bd;
    padding-top: 4rem;
    font-size: 0.95rem;
}

.footer-heading {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #0056b3;
}

.footer-text {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-links li, .footer-contact li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 5px;
}

.footer-contact i {
    margin-right: 0.75rem;
    color: #0056b3;
    width: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    margin-right: 0.5rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

/* Dropdown on Hover */
@media (min-width: 992px) { /* Apply hover effect only on larger screens */
    .main-navbar .dropdown-menu {
        border-radius: 12px;
        border: 1px solid #e9ecef;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        padding: 0.5rem 0;
        margin-top: 0.5rem;
        border-top: none;
    }

    .main-navbar .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0.5rem; /* Creates a small gap */
        animation: fadeIn 0.2s ease-in-out;
    }

    .main-navbar .dropdown-item {
        padding: 0.6rem 1.5rem;
        font-weight: 500;
        color: #343a40;
        transition: all 0.2s ease-in-out;
    }
    .main-navbar .dropdown-item:hover, .main-navbar .dropdown-item:focus {
        background-color: #e7f3ff;
        color: #0056b3;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}