html {
    scroll-behavior: smooth;
}

/* Top Horizontal Navbar for Desktop */
.top-navbar {
    display: none; /* Hidden by default */
    background-color: #404040;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #ddd;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1060; /* Ensure it stays above other elements */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-navbar .navbar-logo {
    height: 40px; /* Logo height for desktop */
}

/* Center text styling */
.navbar-title {
    font-weight: bold;
    margin: 0 auto; /* Center the title */
    color: white; /* White text for desktop */
}

/* Sidebar Styling */
.sidebar-custom {
    background-color: #397d7d;
    width: 200px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: -200px; /* Hidden by default */
    transition: all 0.3s;
    z-index: 1050;
    padding-top: 5rem; /* Adjust padding to accommodate the top navbar */
    padding-left: 1rem;
}

/* Show sidebar and top navbar on larger screens */
@media (min-width: 992px) {
    .sidebar-custom {
        left: 0;
    }
    .top-navbar {
        display: flex; /* Show top navbar on desktop */
        align-items: center;
    }
}

.sidebar-custom.show {
    left: 0;
}

/* Sidebar Link Styling */
.sidebar-custom .nav-link {
    color: #ffffff;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.9rem 0; /* Adjusted vertical padding */
    text-align: center;
    font-size: 1rem;
}

.sidebar-custom .nav-link:hover {
    background-color: #FFCF51;
    color: #fff;
}

/* Icon styling */
.sidebar-custom .nav-link .icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* Sidebar Logo Styling */
.sidebar-logo {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.sidebar-logo img,
.navbar-brand img {
    height: 40px;
    margin-right: 10px;
    padding-left: 10%;
}

/* Responsive Logo for Mobile */
@media (max-width: 991px) {
    .sidebar-logo img,
    .navbar-brand img {
        height: 20px;
    }

    .navbar-title {
        color: black; /* Black text for mobile */
    }
}

/* Overlay to dim content when sidebar is open */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1040;
}

.overlay.show {
    display: block;
}

/* Adjust content when sidebar is open */
.content {
    margin-left: 200px;
    padding-top: 55px; /* Padding to avoid overlap with the top navbar */
}

@media (max-width: 991px) {
    .content {
        margin-left: 0;
        padding-top: 0;
    }
}
