/* Basic Styles */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Arial', sans-serif;
    background: #f4f4f4; /* Gradient background */
}

body {
    min-height: 100vh;
}

/* Main Layout */
.main-layout {
    display: flex;
    flex-direction: row;
    flex: 1; /* Take up remaining space */
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #ff7e5f, #feb47b); /* Smooth orange gradient */
    color: #f5f6fa; /* Light primary */
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-radius: 0px; /*16px for curvy edges of sidebar*/
    overflow-y: auto; /* Enable scrolling if the content is too tall */
    top: 0; /* Aligns the sidebar to the top of the viewport */
    left: 0; /* Aligns the sidebar to the left of the viewport */
}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 1px;
    cursor: pointer;
}

/* Ensure all sidebar links are white */
.sidebar ul li a {
    text-decoration: none;
    color: #f5f6fa;
    font-size: 14px;
    font-weight: bold;
    padding: 10px 12px;
    display: block;
    border-radius: 6px;
    transition: background 0.3s, padding-left 0.3s;
}

.sidebar ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 18px;
    color: #ffffff;
}

/* Example specific override for the 'Courses' link if needed */
.sidebar ul li a[href*="courses"] {
    color: #f5f6fa; /* Ensure 'Courses' link is white */
}

/* Dropdown menu styling */
.dropdown-menu {
     display: none;
    padding-left: 15px;
    margin-top: 5px;
}

.dropdown-menu li {
    margin: 5px 0; /* Space between items */
}

.dropdown-menu li a {
    font-size: 13px;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s, padding-left 0.3s;
}

.dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.2);
    padding-left: 18px;
    color: #ffffff;
}

/* Content Styling */
.content {
    flex: 1; /* Take up remaining space */
    padding: 20px; /* Padding for content area */
    background-color: #fff; /* Background color for content area */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Shadow for appearance */
}

/* Frame Styling */
iframe {
    border: none; /* Remove default border */
    width: 100%; /* Full width */
    height: calc(100vh - 60px); /* Adjust height to fit the content area */
}

/* Header Styling */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.5); /* Transparent white background */
    border-bottom: 2px solid #ddd;
    width: 100%; /* Full width */
    box-sizing: border-box; /* Include padding in the width */
}

.logo {
    display: flex;
    align-items: center;
    height: 150px; /* Height of the logo container matches the image */
}

.logo img {
    height: 150px; /* Set the height of the logo */
    width: 250px;  /* Set the width of the logo */
    object-fit: contain; /* Ensures the image scales correctly */
}

.nav-container {
    flex-grow: 1; /* Allow the navigation container to grow and take up remaining space */
    text-align: right; /* Align the navigation links to the right */
}

.nav-container nav ul {
    list-style: none;
    display: inline-flex; /* Display navigation links inline */
    margin: 0;
    padding: 0;
}

.nav-container nav ul li {
    margin-left: 20px;
}

.nav-container nav ul li a {
    text-decoration: none;
    color: #333; /* Adjust text color to be visible against the transparent white background */
    font-size: 16px;
    white-space: nowrap; /* Prevent text wrapping */
}


/* Footer Styling */
footer {
    background: #fff;
    padding: 10px 20px;
    border-top: 2px solid #ddd;
    text-align: center;
    flex-shrink: 0; /* Prevents the footer from shrinking */
}

/* Footer Text Styling */
.footer-container p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

/* Container for Centered Elements */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100%;
    text-align: center; /* Center text if needed */
    padding: 20px; /* Optional: Add some padding */
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh; /* Full viewport height */
    text-align: center; /* Center text if needed */
    padding: 20px; /* Optional: Add some padding */
    overflow-y: auto; /* Enables scrolling within the content area */
    
     border-radius: 8px; /* Rounded corners */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Shadow for appearance */
    box-sizing: border-box; /* Ensures padding and border are included in the element's width and height */
}

.login-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    width: 500px;
    max-width: 100%; /* Responsive width */
    display: flex;
    flex-direction: column; /* Ensure children are stacked vertically */
    align-items: center; /* Center items horizontally */
    box-sizing: border-box;
}

.login-box h1 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* Optional: add styles for login form elements */
.textbox {
    margin-bottom: 15px;
    width: 100%; /* Ensure inputs take full width */
}

.textbox input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.error {
    color: red;
    margin-bottom: 15px;
    text-align: center;
}

.success {
    color: green;
    margin-bottom: 15px;
    text-align: center;
}

/* Grid and List View Styling */
.course-list, .course-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Adds space between items */
}

/* Grid View Specific Styles */
.course-grid .course-item {
    flex: 1 1 calc(33.333% - 20px); /* Three items per row with gaps considered */
    max-width: calc(33.333% - 20px); /* Ensure items don’t exceed their width */
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #ddd; /* Add border around each item */
    padding: 10px; /* Add padding inside border */
    box-sizing: border-box; /* Include padding and border in width calculation */
}

.courses-container {
    width: 100%;
    box-sizing: border-box; /* Ensures padding is included in the width */
}

/* List View Specific Styles */
.course-list .course-item {
    width: 100%; /* Full width for list view */
    display: flex;
    align-items: center;
    gap: 15px;
      margin: 0; /* Ensure no margin affecting layout */
    box-sizing: border-box; /* Ensure padding and border are included in width */
    border: 1px solid #ddd; /* Add border around each item */
    padding: 10px; /* Add padding inside border */
}

/* Ensure Images Fit Within Their Containers */
.course-item img {
    max-width: 100%; /* Ensure images do not exceed their container width */
    height: auto; /* Maintain aspect ratio */
    border-radius: 4px; /* Optional: Add rounded corners */
}

/* Fixed Width for Images in Both Views */
.course-list .course-item img {
    width: 100px; /* Set a fixed width for thumbnail */
    height: auto; /* Maintain aspect ratio */
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .course-grid .course-item img {
        width: 250px; /* Set fixed width for images on medium screens */
        height: 250px; /* Set fixed height for images on medium screens */
    }
}

@media (max-width: 768px) {
    .course-grid .course-item {
        flex: 1 1 calc(50% - 20px); /* Two items per row on medium screens */
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .course-grid .course-item {
        flex: 1 1 calc(100% - 20px); /* One item per row on small screens */
        max-width: calc(100% - 20px);
    }
}

/* Form Styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group select,
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group input[type="radio"],
.form-group input[type="checkbox"] {
    margin-right: 5px;
}

#options-container div {
    margin-bottom: 10px;
}

/* Container for Logo */
.logo-container {
    text-align: center; /* Center the logo */
    margin-bottom: 20px; /* Space below the logo */
}

/* Logo Styling */
.logo {
    max-width: 100%; /* Ensure logo scales responsively */
    height: 100px; /* Maintain aspect ratio */
    background-color: transparent; /* Ensure background is transparent */
}

/* Navbar Toggle Button */
#courses-toggle {
    cursor: pointer;
    color: #f5f6fa; /* Light primary */
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: none;
    background: none;
    font-size: 1rem;
}

/* JavaScript Styles for Toggle */
#nav-toggle:checked ~ #nav-header {
    width: calc(250px - 16px); /* Adjusted for sidebar width */
}

#nav-toggle:checked ~ #nav-content, #nav-toggle:checked ~ #nav-footer {
    width: 250px; /* Adjusted for sidebar width */
}

#nav-toggle:checked ~ #nav-header #nav-title {
    opacity: 0;
    pointer-events: none;
    transition: opacity .1s;
}

#nav-toggle:checked ~ label[for="nav-toggle"] {
    left: calc(50% - 8px);
    transform: translate(-50%);
}

#nav-toggle:checked ~ #nav-content .nav-button span {
    opacity: 0;
    transition: opacity .1s;
}

#nav-toggle:checked ~ #nav-content .fas {
    min-width: calc(100% - 16px);
}

#nav-toggle:checked ~ #nav-footer #nav-footer-avatar {
    margin-left: 0;
    left: 50%;
    transform: translate(-50%);
}

#nav-toggle:checked ~ #nav-footer #nav-footer-titlebox, #nav-toggle:checked ~ label[for="nav-footer-toggle"] {
    opacity: 0;
    transition: opacity .1s;
    pointer-events: none;
}

#nav-toggle:not(:checked) ~ #nav-footer-toggle:checked + #nav-footer {
    height: 30%;
    min-height: 54px;
}

#nav-footer-content {
    margin: 0 16px 16px 16px;
    border-top: solid 1px #f5f6fa; /* Light primary */
    padding: 16px 0;
    color: #f5f6fa; /* Light primary */
    font-size: .8rem;
    overflow: auto;
}

#nav-footer-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#nav-footer-content::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background-color: #D62929; /* Custom scrollbar color */
}
select {
    color: #000; /* Set the text color to black */
    background-color: #fff; /* Ensure the background is white */
}

option {
    color: #000; /* Ensure the text color in the options is black */
    background-color: #fff; /* Ensure the background color of the options is white */
}

.student-form {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.student-form form {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-right: 20px;
}

.form-group:last-child {
    margin-right: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.menu-list {
    list-style-type: none;
    padding-left: 0;
}

.menu-list > li {
    margin-bottom: 20px; /* Add spacing between each menu item */
}

.menu-list > li > a {
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.menu-list > li > a .icon-spacing {
    margin-left: 10px; /* Spacing between text and the icon */
}

.menu-list .dropdown-menu {
    list-style-type: none;
    padding-left: 20px; /* Indent submenu slightly */
    margin-top: 10px; /* Space between menu item and its submenu */
}

.menu-list .dropdown-menu li {
    margin-bottom: 10px; /* Add spacing between submenu items */
}

.menu-list .dropdown-menu li a {
    font-weight: normal;
    text-decoration: none;
    color: #555; /* Slightly lighter color for submenu items */
}

.menu-list .dropdown-menu li a:hover {
    color: #000; /* Darker color on hover */
}