﻿/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    transition: margin-left 0.3s ease;
}

/* Header Section */
header {
    background-color: #1a1a1a;  /* Dark background */
    color: #fff;
    padding: 10px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.logo {
    width: 120px; /* Adjust the logo size */
}

h1 {
    font-size: 24px;
    margin-left: 20px;
    flex-grow: 1;
}

/* Hamburger Menu for Mobile */
input[type=checkbox] {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    width: 30px;
    height: 25px;
    cursor: pointer;
    position: absolute;
    top: 50px; /* Position the hamburger icon below the logo */
    left: 20px; /* Align it to the left, next to the logo */
}

.hamburger span {
    width: 100%;
    height: 4px;
    background-color: #fff;
    border-radius: 2px;
}

/* Sidebar (Mobile View) */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #333;
    transition: left 0.3s ease-in-out;
    padding-top: 50px;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar li {
    margin: 20px 0;
}

.sidebar a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    display: block;
    padding: 10px 20px;
    transition: background-color 0.3s ease;
}

.sidebar a:hover {
    background-color: #77aa77; /* Green hover effect */
}

/* Horizontal Navbar for Larger Screens */
.navbar-desktop {
    display: none;
}

.navbar-desktop ul {
    list-style-type: none;
    display: flex;
}

.navbar-desktop li {
    margin: 0 15px;
}

.navbar-desktop a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 15px;
    display: block;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.navbar-desktop a:hover {
    background-color: #77aa77; /* Green hover effect */
}

/* Main Content */
main {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 22px;
    margin-bottom: 15px;
}

/* Footer Section */
footer {
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Show hamburger menu */
    .hamburger {
        display: flex;
    }

    /* Show sidebar when checkbox is checked */
    input[type=checkbox]:checked + .hamburger + .sidebar {
        left: 0;
    }

    /* Body shifts to the right to make room for the sidebar */
    input[type="checkbox"]:checked ~ main {
        margin-left: 250px;
    }

    /* Hide the horizontal navbar for small screens */
    .navbar-desktop {
        display: none;
    }
}

@media (min-width: 769px) {
    /* Horizontal navbar for larger screens */
    .navbar-desktop {
        display: block;
    }

    /* Hide the sidebar on larger screens */
    .sidebar {
        display: none;
    }
}
