/* Retain header and navigation styles from main.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #150e11;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: white;
    color: #fe5757;
}

header .logo img {
    margin: 5px 0;
    width: 100px;
    height: auto;
}

header .search-bar {
    display: flex; /* Use flexbox for horizontal layout */
    align-items: center; /* Center items vertically */
    gap: 10px; /* Space between input and button */
}

header .search-bar input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    flex: 1; /* Allow input to take remaining space */
}

header .search-bar button {
    padding: 10px 15px; /* Add padding for the button */
    background-color: #fe5757; /* Button background color */
    color: white; /* Text color for the button */
    border: none; /* Remove border */
    border-radius: 5px; /* Round corners */
    cursor: pointer; /* Change cursor to pointer on hover */
}

header .user-icons a {
    margin-left: 20px;
    color: #fe5757;
    text-decoration: none;
}

header .search-bar button:hover {
    background-color: #ba22a1; /* Change color on hover */
}

header .user-icons i {
    font-size: 32px; /* Increase this value for larger icons */
}

nav {
    background-color: #fe5757;
    padding: 10px 0;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* Authentication Section */
.auth-container {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background-color: #f9f9f9;
    align-items: center;
    flex-direction: column;
}

.search-bar {
    display: flex; /* Keep it visible on larger screens */
    align-items: center; /* Center items vertically */
    gap: 10px; /* Space between input and button */
    transition: all 0.3s ease; /* Smooth transition */
}

#search-icon {
    display: none; /* Hide search icon on larger screens */
}

.hamburger{
    display: none;
}

.login-form, .register-form {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 300px; /* Fixed width for forms */
}

label {
    margin-top: 10px;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px -10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

button {
    background-color: #fe5757;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
}

button:hover {
    background-color: #ba22a1;
}

p {
    margin-top: 10px;
}

p a {
    color: #fe5757;
    text-decoration: none;
}

footer {
    background-color: #150e11;
    color: white;
    text-align: center;
    padding: 15px 0;
    position: relative; /* Ensure footer stays at the bottom */
    bottom: 0; /* Align to the bottom */
    width: 100%; /* Full width of the page */
}

footer a {
    color: #ffa200;
    text-decoration: none;
}

@media screen and (max-width: 768px) {
    /* Ensure body takes full width */
    body {
        overflow-x: hidden; /* Prevent horizontal scrolling */
        width: 100%;
    }

    header .logo img {
        margin: 5px 0;
        width: 80px;
        height: auto;
    }

    header .user-icons i {
        font-size: 20px; /* Decrease the icon size on small screens */
    }

    /* Hamburger Menu */
    .hamburger {
        display: block; /* Show hamburger button */
        background: none;
        border: none;
        font-size: 20px;
        cursor: pointer;
        color: #fe5757; /* Set visible color for the button */
        position: relative;
        right: 0; /* Position the button in the top-right corner */
        z-index: 10; /* Ensure it stays above other elements */
    }

    /* Hide navigation by default */
    nav {
        max-height: 0; /* Collapsed menu */
        overflow: hidden; /* Hide overflowing items */
        background-color: transparent; /* Remove background when collapsed */
        transition: max-height 0.3s ease, background-color 0.3s ease;
    }

    /* Show navigation when toggled */
    nav.open {
        max-height: 350px; /* Adjust based on menu size */
        background-color: #fe5757; /* Add background when expanded */
    }

    nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    nav ul li {
        margin: 10px 0;
    }
    
    .search-bar {
        display: none !important;
    }

    #search-icon {
        display: block; /* Make the icon visible */
        font-size: 24px;
        color: #fe5757;
        cursor: pointer;
        margin-right: 20px;
        position: relative;
        transition: transform 0.3s ease; /* Add smooth transition for transform */
    }

    .search-bar.open {
        display: flex !important; /* Make the search bar appear */
        position: absolute;
        top: 80px; /* Adjust position below the header */
        width: 60%; /* Width of the search bar */
        max-width: 300px; /* Maximum width */
        background-color: white;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        border-radius: 5px;
        opacity: 0; /* Initially invisible */
        transform: scaleX(0); /* Start with no width */
        transform-origin: left center; /* Animate from the left */
        transition: opacity 0.3s ease, transform 0.3s ease; /* Transition for opacity and transform */
    }

    .search-bar.open.show {
        opacity: 1; /* Make it visible */
        transform: scaleX(1); /* Expand the search bar horizontally */
    }

    
    /* Footer remains untouched but properly positioned */
    footer {
        background-color: #150e11;
        color: white;
        text-align: center;
        padding: 15px 0;
        position: relative;
        bottom: 0;
        width: 100%;
    }
}