@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar menu styles */
.sidebar {
    width: 16em; /* Reduced from 20em */
    background-color: #fff; /* Dark background for sidebar */
    color: black;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2); /* Sidebar shadow */
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin; /* For Firefox */
    /* scrollbar-color: #259800 #f1f1f1;  */
    /* For Firefox */
}

.sidebar h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #445566;
}

.sidebar a {
    color: black; /* Default link color */
    text-decoration: none;
    display: block;
    padding: 10px ;
    border-radius: 4px; /* Rounded corners */
    transition: all 0.3s ease; /* Smooth hover effect */
}

.sidebar a:hover {
    background-color: #259800; /* Green hover color */
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Highlight shadow */
}

.main-menu {
    list-style: none;
    padding-left: 0px !important;
}

.main-menu li {
    margin-bottom: 5px;
}

.sidebar .main-menu .active > a {
    background-color: #259800; /* Green background for active item */
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Highlight shadow */
}

.submenu {
    color: #000; /* Default submenu color */
    list-style: none;
    margin-left: 20px;
    display: none; /* Hide submenus by default */
}

/* Submenu link styles */
.submenu a {
    color: black; /* Change submenu link text color to black */
    text-decoration: none;
    display: block;
    padding: 8px 15px;
    margin-top: 5px;
    border-radius: 4px; /* Rounded corners */
    transition: all 0.3s ease; /* Smooth hover effect */
}

.submenu a:hover {
    background-color: #259800; /* Green hover color */
    color: white; /* Ensure text turns white on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow on hover */
}

.has-submenu.active > .submenu {
    display: block; /* Show submenu when active */
}

.content {
    flex: 1;
    background: #f5f5f5;
}

.content section {
    /* margin-bottom: 30px; */
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.content h1, .content h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Hamburger Menu Styles */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px; /* Changed from left to right */
    z-index: 1000;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
    
}

/* Hamburger Icon Styles */
.hamburger {
    display: block;
    width: 20px; /* Reduced from 24px */
    height: 1.5px; /* Reduced from 2px */
    background: #333;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 20px; /* Reduced from 24px */
    height: 1.5px; /* Reduced from 2px */
    background: #333;
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Active States */
.sidebar-toggle.active .hamburger {
    background: transparent;
}

.sidebar-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.sidebar-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        right: -250px; /* Match the width */
        top: 0;
        height: 100vh;
        width: 250px; /* Reduced from 280px */
        transition: right 0.3s ease; /* Changed from left to right */
        z-index: 999;
        box-shadow: -2px 0 8px rgba(0,0,0,0.1); /* Changed shadow direction */
    }

    .sidebar.active {
        right: 0; /* Changed from left to right */
    }

    .content {
        margin-right: 0;
        width: 100%;
        /* padding: 20px; */
    }
}

/* Custom scrollbar styles for WebKit browsers (Chrome, Safari, Edge) */
.sidebar::-webkit-scrollbar {
    width: 6px;
    display: none; /* Hide scrollbar */
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    /* background: #259800; */
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #1b7100;
}
.sidebar {
  overflow-y: auto;              /* Keeps scrolling enabled */
  scrollbar-width: none;         /* For Firefox */
  -ms-overflow-style: none;      /* For Internet Explorer and Edge */
}


  .view-image {
    margin-top: 1rem;
    width: 100%;
    max-width: 600px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
  }
  .view-image img {
    width: 100%;
    border: 4px solid rgb(160, 157, 157);
    border-radius: 4px;
  }