body {
    transition: background-color 0.3s, color 0.3s;
    padding-top: 56px; /* Adjust for fixed navbar height */
}

.navbar {
    background-color: #e9ecef; /* Light theme - Darker gray */
}

[data-bs-theme="dark"] .navbar {
    background-color: #343a40; /* Dark theme - Unchanged */
}

.navbar-brand {
    font-weight: bold;
}

@media (min-width: 992px) {
    .navbar-nav {
        margin-left: 2rem; /* Increase spacing between navbar-brand and menu in desktop */
    }
}

.nav-link {
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
    color: #000; /* Light theme text color */
}

[data-bs-theme="dark"] .nav-link {
    color: #fff; /* Dark theme text color - Changed to white */
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px; /* Thicker underline */
    bottom: -2px;
    left: 0;
    background-color: #f1c40f; /* Light theme hover underline color */
    transform: scaleX(0); /* Start from zero width */
    transform-origin: left;
    animation: slideRight 0.3s ease forwards; /* Slide from left to right */
}

[data-bs-theme="dark"] .nav-link:hover::after {
    background-color: #f39c12; /* Dark theme hover underline color */
}

@keyframes slideRight {
    to {
        transform: scaleX(1); /* Expand to full width */
    }
}

.nav-link i {
    font-size: 1rem; /* Equal size for all nav icons */
}

.theme-icon {
    font-size: 1.5rem;
    cursor: pointer;
}

.light-theme-icon {
    color: #f1c40f; /* Sun icon color - Light theme */
}

.dark-theme-icon {
    color: #6c757d; /* Moon icon color - Light theme */
}

[data-bs-theme="dark"] .light-theme-icon {
    color: #f39c12; /* Sun icon color - Dark theme */
}

[data-bs-theme="dark"] .dark-theme-icon {
    color: #adb5bd; /* Moon icon color - Dark theme */
}

[data-bs-theme="light"] .dark-theme-icon {
    display: inline-block;
}

[data-bs-theme="light"] .light-theme-icon {
    display: none;
}

[data-bs-theme="dark"] .light-theme-icon {
    display: inline-block;
}

[data-bs-theme="dark"] .dark-theme-icon {
    display: none;
}

@media (max-width: 991px) {
    .theme-icon-mobile {
        padding: 0;
        border: none;
        background: none;
        line-height: 1;
    }
}

.card {
    margin-bottom: 2rem; /* Increased spacing between cards */
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .card {
    border-color: #6c757d;
    background-color: #343a40;
    color: #fff;
}

.card-link {
    color: #f1c40f; /* Light theme link color */
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

[data-bs-theme="dark"] .card-link {
    color: #f39c12; /* Dark theme link color */
}

footer {
    border-top: 1px solid #dee2e6;
    background-color: #e9ecef; /* Light theme - Darker gray */
}

[data-bs-theme="dark"] footer {
    border-top: 1px solid #6c757d;
    background-color: #343a40; /* Dark theme - Unchanged */
}