/* Global Styles */
html, body {
    background-color: #f5f5f5; /* Light gray background */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Header Image Section */
.header-image img {
    width: 100%;
    height: 500px; /* Slightly reduce the height for balance */
    object-fit: cover; /* Ensure image scales properly */
    margin-bottom: -2rem; /* Pull content closer to the image */
    margin-top: 60px !important;
}

/* Custom Scrollbar Styling */
body::-webkit-scrollbar {
    width: 6px; /* Set scrollbar width */
}

body::-webkit-scrollbar-thumb {
    background-color: #f4f4f4; /* Scrollbar track color */
    border-radius: 3px; /* Rounded scrollbar thumb */
}

body::-webkit-scrollbar-track {
    background-color: #f5f5f5; /* Match background color */
}

.content, .sidebar {
    scrollbar-width: thin; /* Use thin scrollbar for Firefox */
    scrollbar-color: #8A2BE2 #ffff; /* Thumb and track colors for Firefox */
}

/* Content and Sidebar Container Adjustments */
/* Content Section */
.content {
    flex: 3; /* Give more space to the main content */
    background-color: #ffff; /* White background */
    padding: 1.5rem;
}

.content h2 {
    color: #6f42c1; /* Bootstrap purple */
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-align: center;
}

.content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}

/* Sidebar Styling */
.sidebar {
    flex: 1.5; /* Increase flex value for a wider sidebar */
    background-color: #ffff; /* White background */
    padding: 1rem;
    max-width: 350px; /* Optional: Set a maximum width for consistency */
    overflow-y: auto; /* Enable vertical scrolling */
}

/* Sidebar Content */
.sidebar-content {
    background: #ffff;
    border-left: 5px solid #4b0082; /* Dark purple border */
    padding: 1.5rem; /* Increased padding for taller and wider container */
    margin-top: 1rem; /* Increased spacing between items */
    border-radius: 0 5px 5px 5px;
    font-size: 1rem; /* Slightly larger text */
    color: #333;
    line-height: 1.8; /* Adjusted line height for readability */
    width: 100%; /* Ensure the content stretches within the sidebar width */
}

/* Sidebar Items */
.sidebar-item {
    width: 100%;
    text-align: left;
    font-size: 1rem;
    color: #4b0082; /* Dark purple */
    font-weight: bold;
    background: none;
    border: none;
    outline: none;
    padding: 0.7rem 1rem; /* Adjusted padding for a more prominent look */
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px; /* Rounded corners for better design */
    box-shadow: none; /* Default no shadow */
}

.sidebar-item:hover {
    color: #8a2be2; /* Brighter purple for hover */
    background-color: #f0e6f7; /* Subtle background color change */
    transform: translateY(-2px); /* Slight lift effect */
}

/* Dropdown Button */
.dropdown-toggle::after {
    color: #4b0082; /* Dark purple dropdown arrow */
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Sidebar Icons */
.sidebar-item i {
    color: #4b0082; /* Dark purple icon color */
}

.sidebar-item:hover i {
    color: #8a2be2; /* Brighter purple icon color on hover */
}

/* Increase Spacing Between Sidebar Items */
.list-group-item {
    background: transparent;
    border: none;
    padding: 1rem 0; /* Increased vertical padding for spacing */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        flex-direction: column; /* Stack content and sidebar vertically */
    }

    .content,
    .sidebar {
        width: 100%; /* Full width for smaller screens */
    }
}

/* Adjust Navbar Title Styling */
.navbar-title {
    font-size: 1.2rem; /* Adjust font size if needed */
    font-weight: bold;
    color: #4b0082; /* Dark purple */
    text-align: center; /* Center-align the text */
    line-height: 4.2; /* Reduce the line height */
    margin: 0; /* Remove extra spacing around the title */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Container adjustments for smaller screens */
    .container {
        flex-direction: column; /* Stack content and sidebar vertically */
        padding: 1rem; /* Reduce padding for better spacing on small screens */
    }

    .header-image img {
        height: auto; /* Allow the image to scale naturally */
        object-fit: contain; /* Ensure the entire image fits within the space */
        margin-top: 117px !important;
    }

    /* Content Section */
    .content {
        width: 100%; /* Full width on mobile */
        padding: 1rem; /* Adjust padding for mobile */
    }

    .content p {
        font-size: 1rem; /* Slightly smaller text for better readability */
        line-height: 1.5; /* Adjust line height */
    }

    .content h3 {
        font-size: 1.2rem; /* Reduce heading size for smaller screens */
        margin-bottom: 1rem;
    }

    /* Sidebar Styling */
    .sidebar {
        width: 100%; /* Full width on mobile */
        margin-top: 2rem; /* Add space between content and sidebar */
        padding: 1rem;
    }

    /* Sidebar Items */
    .sidebar-item {
        font-size: 0.9rem; /* Adjust sidebar button text size */
        padding: 0.5rem; /* Reduce padding for smaller buttons */
    }

    .sidebar-content {
        font-size: 0.9rem; /* Adjust sidebar content text size */
        line-height: 1.5;
        padding: 1rem; /* Reduce padding for better fit */
    }

    /* Sidebar Icons */
    .sidebar-item i {
        font-size: 0.8rem; /* Reduce icon size */
    }

    /* Dropdown Button */
    .dropdown-toggle::after {
        font-size: 0.7rem; /* Smaller dropdown arrow */
    }
}

/* Mobile Sidebar Styling */
.mobile-sidebar {
    background-color: #f5f5f5; /* Light background color for the sidebar */
    padding: 1rem;
}

.mobile-list-group {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 0.5rem; /* Add spacing between buttons */
    list-style: none; /* Remove default list styling */
    padding: 0; /* Remove padding */
    margin: 0; /* Remove margin */
}

.mobile-list-group-item {
    background-color: #f5f5f5; /* Button background */
    border: 1px solid #ddd; /* Button border */
    border-radius: 5px; /* Rounded corners */
    padding: 0.5rem 1rem; /* Inner padding */
    font-size: 0.9rem; /* Adjust font size for mobile */
    display: flex; /* Flex layout for alignment */
    justify-content: space-between; /* Align text and icon */
    align-items: center; /* Vertically center items */
}

.mobile-dropdown-toggle {
    background: none; /* No background for the toggle */
    border: none; /* Remove border */
    color: #333; /* Text color */
    text-align: left; /* Align text to the left */
    width: 100%; /* Full-width button */
}

.mobile-dropdown-toggle i {
    font-size: 1rem; /* Adjust icon size */
    margin-right: 0.5rem; /* Space between icon and text */
}

.mobile-sidebar-content {
    font-size: 0.9rem; /* Adjust text size for collapsible content */
    line-height: 1.5;
    padding: 0.5rem; /* Padding around the content */
}

/* Hide the desktop sidebar on mobile */
@media (max-width: 768px) {
    .sidebar {
        display: none; /* Hide the desktop sidebar */
    }
}

/* Hide the mobile sidebar on desktop */
@media (min-width: 768px) {
    .mobile-sidebar {
        display: none; /* Hide the mobile sidebar */
    }
}

/* Mobile Content Section */
.mobile-container {
    display: flex;
    flex-direction: column;
    padding: 1rem; /* Add spacing */
    background-color: #f5f5f5; /* Ensure a white background for readability */
    margin-top: -73px; /* Move content closer to the image */
}

.mobile-content {
    width: 100%; /* Full width on mobile */
    font-size: 1rem; /* Adjust font size */
    line-height: 1.6; /* Add proper line height for readability */
    padding: 1rem;
    background-color: #f5f5f5; /* Light background for contrast */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.mobile-content h3 {
    color: #4B0082; /* Deep purple headings */
    font-size: 1.2rem; /* Adjust heading size */
    margin-top: 1rem;
}

.mobile-content p {
    margin-bottom: 1rem; /* Space between paragraphs */
    color: #333; /* Dark text color for better contrast */
}

/* Hide the desktop content on mobile */
@media (max-width: 768px) {
    .content {
        display: none;
    }
}

/* Hide the mobile content on desktop */
@media (min-width: 768px) {
    .mobile-container {
        display: none;
    }
}

/* Sidebar Item Active State */
.sidebar-item.active {
    color: #fff; /* Change text color to white */
    background-color: #4b0082; /* Deep purple background for active item */
    border-radius: 5px; /* Ensure rounded corners for the active item */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Add shadow for depth */
    transform: scale(1.02); /* Slightly enlarge the active item */
    transition: all 0.3s ease; /* Smooth transition effect */
}

.sidebar-item.active i {
    color: #fff; /* Change icon color to white */
}

/* Remove hover effect when active */
.sidebar-item.active:hover {
    transform: none;
}

/* Adjust the collapse content when active */
.sidebar-content.active {
    border-left-color: #4b0082; /* Match the left border color with the active background */
    font-weight: bold; /* Optional: Make the active text bold */
}

/* X Button Styling */
.close-btn {
    margin-left: 10px; /* Add space between the title and button */
    color: #dc3545; /* Red color for the close button */
    font-weight: bold;
    border: none; /* Remove default button border */
    background: transparent; /* Transparent background */
    cursor: pointer; /* Change cursor to pointer */
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #ff0000; /* Bright red on hover */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .close-btn {
        margin-left: 5px; /* Adjust spacing for smaller screens */
    }
}
