:root {
    --primary-color: #2E7D32;
    /* Green */
    --primary-hover: #1B5E20;
    --secondary-color: #F57C00;
    /* Orange */
    --secondary-hover: #E65100;
    --accent-color: #FFC107;
    /* Amber */
    --light-bg: #F8F9FA;
    --white: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --navbar-height: 70px;
    --transition-speed: 0.3s;
    scroll-behavior: smooth;
}

[data-theme="dark"] {
    --primary-color: #81C784;
    --primary-hover: #66BB6A;
    --secondary-color: #FFB74D;
    --secondary-hover: #FFA726;
    --light-bg: #121212;
    --white: #1E1E1E;
    --text-dark: #E0E0E0;
    --text-muted: #B0BEC5;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .bg-white,
[data-theme="dark"] article.bg-white,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .accordion-button {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}

[data-theme="dark"] .bg-light,
[data-theme="dark"] .alert-secondary {
    background-color: #2D2D2D !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #2D2D2D !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e0e0e0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.2) 0%, rgba(245, 124, 0, 0.1) 100%);
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: rgba(46, 125, 50, 0.2);
    color: var(--primary-color) !important;
}

[data-theme="dark"] .list-group-item {
    background-color: transparent !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}

[data-theme="dark"] .alert-success {
    background-color: rgba(46, 125, 50, 0.2) !important;
    border-color: var(--primary-color) !important;
    color: #81C784 !important;
}

[data-theme="dark"] .footer {
    border-top: 1px solid #333;
    background-color: #151515 !important;
}

.article-img {
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 400px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.img-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: -10px;
    margin-bottom: 20px;
    font-style: italic;
}

body {
    font-family: 'Noto Sans Devanagari', sans-serif;
    color: var(--text-dark);
    background-color: var(--light-bg);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    padding-top: var(--navbar-height);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main,
.main-content {
    flex: 1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: color var(--transition-speed);
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: var(--card-shadow);
    height: var(--navbar-height);
    transition: background-color var(--transition-speed);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1) 0%, rgba(245, 124, 0, 0.1) 100%);
    padding: 80px 0;
    border-radius: 0 0 50px 50px;
    margin-bottom: 40px;
}

.hero-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
    transition: all var(--transition-speed);
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    color: #fff;
}

/* Cards */
.feature-card {
    background-color: var(--white);
    border-radius: 20px;
    padding: 30px;
    border: none;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    /* height: 100%; */
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(46, 125, 50, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Footer */
.footer {
    background-color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.footer h5 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-link {
    display: block;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer-link:hover {
    color: var(--primary-color);
}

/* Dark Mode Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Utilities */
.text-primary-custom {
    color: var(--primary-color);
}

.text-secondary-custom {
    color: var(--secondary-color);
}

.section-padding {
    padding: 60px 0;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(46, 125, 50, 0.1);
}

/* Eligibility Result */
#resultMessage {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
}

.eligible {
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.not-eligible {
    background-color: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
    border: 1px solid #d32f2f;
}

/* Sticky Navbar fix */
.navbar.sticky-top {
    top: 0;
    z-index: 1020;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
}