/* General Reset and Body Styles */
body {
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
    background: linear-gradient(to left, #ffffff, #f5d7a4);
}

a {
    text-decoration: none;
}

.main_header_name a {
    color: whitesmoke;
}

.header_name{
    font-size: 36px;
    font-family: 'Poppins';
}

/* Header Styles */
.site-header {
    color: #fff;
    position: relative;
}

/* Header Container */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden; /* Hide overflow */
}

/* Menu Toggle Button */
.menu-toggle {
    display: none; /* Hidden by default on larger screens */
    background: #444;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1rem;
    position: relative; /* Position relative to header container */
    z-index: 99; /* Ensure it stays above other content */
    transition: background 0.3s ease;
}

.menu-toggle:hover {
    background: #555;
}

.menu-toggle .menu-icon {
    display: block;
    width: 30px;
    height: 3px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.menu-toggle .menu-icon::before,
.menu-toggle .menu-icon::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background: #fff;
    position: absolute;
    left: 0;
}

.menu-toggle .menu-icon::before {
    top: -8px;
}

.menu-toggle .menu-icon::after {
    top: 8px;
}

/* Header Content */
.header-content {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between logo and site name */
}

.main_header_logo img {
    max-width: 100%; /* Ensure logo scales down with the viewport */
    height: 100px; /* Maintain aspect ratio */
    width: auto; /* Adjust based on your design needs */
}

.main_header_name h1 {
    margin: 0;
    font-size: 36px; /* Adjust font size based on viewport width */
}

/* Primary Menu Container */
.primary-menu-container {
    display: flex;
    align-items: center;
}

/* Primary Menu */
.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row; /* Horizontal layout on larger screens */
    justify-content: center;
}

.primary-menu li {
    margin: 0 10px;
}

.primary-menu a {
    color: rgb(102, 102, 102);
    text-decoration: none; /* Remove underline */
    padding: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    display: inline-block;
    transition: background 0.3s ease;
}

.primary-menu a:hover {
    background-color: #f5d7a4;
    border-radius: 4px;
}

/* Responsive Styles */

/* For tablets and smaller desktops */
@media (max-width: 1024px) {
    .main_header_logo img {
        width: 15vw; /* Scale logo size for tablets */
    }

    .main_header_name h1 {
        font-size: 3rem; /* Scale header text */
    }

    .primary-menu {
        display: none; /* Hide menu items by default */
        flex-direction: column; /* Stack items vertically on mobile */
        width: 98%;
        position: absolute; /* Position it over other content */
        top: 100%; /* Align it directly below the header */
        right: 0;
        transition: max-height 0.3s ease-out;
        padding: 0 10px; /* Add padding to ensure menu items don't get cut off */
    }

    .primary-menu.active {
        display: flex; /* Show menu items when active */
    }
    
    .menu-toggle {
        display: block; /* Show the menu toggle button */
        font-size: 0; /* To remove span text from menu button */
        left: 0; /* To keep the menu button on the right */
        align-items: flex-end !important;
    }

    .primary-menu li {
        margin: 0;
        z-index: 1;
        width: 100%;
        opacity: 90%;
        text-align: center;
        border-radius: 1%;
        border-bottom: 1px solid #222; /* Add separation between items */
    }

    .primary-menu a {
        width: 95%;
        z-index: 1;
        background-color: #f5d7a4;
        padding: 12px; /* Adjust padding for readability */
    }

}

/* For mobile devices */
@media (max-width: 768px) {
    
    .main_header_logo img {
        width: 60px !important; /* Scale logo size for tablets */
        height: 60px;
        padding-right: 2px;
    }

    .main_header_name h1 {
        font-size: 1rem !important; /* Scale header text */
    }

    .primary-menu {
        display: none; /* Hide menu items by default */
        flex-direction: column; /* Stack items vertically on mobile */
        width: 98%;
        position: absolute; /* Position it over other content */
        top: 100%; /* Align it directly below the header */
        left: 0;
        transition: max-height 0.3s ease-out;
        padding: 0 10px; /* Add padding to ensure menu items don't get cut off */
    }

    .primary-menu.active {
        display: flex; /* Show menu items when active */
    }
    
    .menu-toggle {
        display: block; /* Show the menu toggle button */
        font-size: 0; /* To remove span text from menu button */
        left: 0; /* To keep the menu button on the right */
    }

    .primary-menu li {
        margin: 0;
        z-index: 1;
        width: 100%;
        opacity: 90%;
        text-align: center;
        border-radius: 1%;
        border-bottom: 1px solid #222; /* Add separation between items */
    }

    .primary-menu a {
        width: 95%;
        z-index: 1;
        background-color: #f5d7a4;
        padding: 12px; /* Adjust padding for readability */
    }
}

/* For very small devices (e.g., smartphones in portrait mode) */
@media (max-width: 480px) {
    .menu-toggle {
        font-size: 0.9rem;
        right: 15px;
        top: 0; /* Reset top to 0 if needed */
    }

    .main_header_logo img {
        width: 40vw; /* Further adjust logo size */
    }

    .main_header_name h1 {
        font-size: 1.5rem; /* Scale header text */
    }

    .primary-menu a {
        padding: 10px; /* Adjust padding for readability */
    }

    .primary-menu li {
        margin-bottom: 5px;
    }
}
