.header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('images/home.webp');
    background-size: cover;
    background-position: center;
    height: 800px; /* Increased height */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align items to the top */
    color: white;
    transition: height 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-bar {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 30px 50px; /* Increased vertical padding */
    box-sizing: border-box;
    z-index: 10; /* Ensure nav-bar is on top */
}

.logo {
    width: 80px;
    height: auto;
    transition: width 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center; /* Added for vertical alignment */
    position: relative; /* Ensure stacking context for z-index */
}

.nav-links .nav-main-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px; /* Consistent padding for all links */
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    transition: text-shadow 0.3s ease, color 0.3s ease; /* Base transition */
}

.nav-links .nav-main-link:hover {
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff; /* Glow effect for text */
}

.nav-links .nav-main-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff; /* Underline glow */
    transition: width 0.3s ease;
}

.nav-links .nav-main-link:hover::after {
    width: 100%;
}

/* Ensure links retain styling after being clicked */
.nav-links .nav-main-link:visited,
.nav-links .nav-main-link:active {
    color: white !important; /* Force white color */
    text-decoration: none;
    text-shadow: none; /* Remove glow on active/visited if not hovered */
}

/* Re-apply glow on hover for visited/active links */
.nav-links .nav-main-link:visited:hover,
.nav-links .nav-main-link:active:hover {
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff;
}

/* Ensure underline works for visited/active links on hover */
.nav-links .nav-main-link:visited:hover::after,
.nav-links .nav-main-link:active:hover::after {
    width: 100%;
}

/* New styling for the BUY NOW button */
.nav-links .new-buy-button {
    border: 1px solid white;
    padding: 8px 35px;
    border-radius: 3px;
    color: white; /* Initial text color */
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.nav-links .new-buy-button:hover {
    background-color: white; /* Box illuminates by becoming white */
    color: #5A3E36 !important; /* Text becomes dark brown for visibility, force with !important */
    box-shadow: 0 0 10px white, 0 0 20px white, 0 0 30px white; /* Glow effect for the box */
    text-shadow: none; /* Ensure no text glow from .nav-main-link */
}

/* Disable underline for the new BUY NOW button on hover */
.nav-links .new-buy-button:hover::after {
    width: 0 !important;
    content: none !important;
}

/* Hamburger Menu Styles */
.hamburger-menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1003; /* Ensure it's above other content */
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Mobile Navigation Overlay Styles */
.mobile-nav-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Semi-transparent black overlay */
    z-index: 1002;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-nav-overlay .mobile-nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    padding: 10px 20px; /* Adjusted padding for rectangular shape */
    width: 80%;
    text-align: center;
    border: 1px solid white; /* Added border for rectangular effect */
    border-radius: 3px; /* Added border-radius for rounded corners */
    margin-bottom: 10px; /* Added margin for spacing between links */
    transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease; /* Added transitions for glow effect */
}

.mobile-nav-overlay .mobile-nav-link:last-child {
    margin-bottom: 0; /* Remove margin for the last link */
}

.mobile-nav-overlay .mobile-nav-link:hover {
    background-color: white; /* Box illuminates by becoming white */
    color: #5A3E36 !important; /* Text becomes dark brown for visibility */
    box-shadow: 0 0 10px white, 0 0 20px white, 0 0 30px white; /* Glow effect for the box */
}


.header-content {
    text-align: center;
    padding-top: 150px; /* Added padding to push content down */
    max-width: 90%; /* Constrain width */
    margin: 0 auto; /* Center content */
    transition: opacity 0.3s ease, padding-top 0.3s ease;
}

.header-content h1 {
    font-size: 12rem; /* Increased font size */
    margin-bottom: 20px; /* Increased margin */
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff; /* Added glow effect */
}

.header-content h2 {
    font-size: 2.4rem; /* Decreased font size */
    font-weight: 300;
    margin-top: 10px;
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff; /* Added glow effect */
}

.header-content .header-logo {
    width: 200px; /* Adjust size as needed */
    height: auto;
    margin-top: 50px; /* Adjust margin to position the logo */
}

.social-icons {
    display: flex;
    gap: 10px; /* Decreased gap */
    margin-top: 30px; /* Increased margin */
}

/* Sticky Navigation Bar Styles */
.nav-bar.sticky {
    height: 80px; /* Smaller height for sticky nav bar */
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
    padding: 10px 50px; /* Adjusted padding to move links up and fit better */
    transition: height 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
    -webkit-backdrop-filter: blur(8px); /* For Safari */
    backdrop-filter: blur(8px); /* Glass effect */
}

.nav-bar.sticky .logo {
    width: 50px; /* Smaller logo for sticky nav bar */
    transition: width 0.3s ease;
}

/* Hide header content when nav-bar is sticky */
.header.header-scrolled .header-content {
    opacity: 0; /* Hide header content when nav-bar is sticky */
    padding-top: 0; /* Remove padding */
    pointer-events: none; /* Disable interactions */
}

/* Professional Page Specific Styles */
.header#professional-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('images/ZENspaPRO2.webp');
    background-size: cover;
    background-position: center;
}

/* Personal Page Specific Styles */
.header#personal-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('images/ZENspaPER.webp');
    background-size: cover;
    background-position: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header {
        height: 500px; /* Further adjusted height */
        padding: 15px; /* Further adjusted padding */
    }

    .nav-bar {
        flex-direction: column;
        align-items: center;
        padding: 15px; /* Further adjusted padding */
    }

    .nav-links {
        margin-top: 15px; /* Adjusted margin */
        gap: 15px; /* Adjusted gap */
    }

    .nav-links a {
        padding: 5px 0; /* Adjusted padding */
    }

    /* Ensure the new-buy-button also scales */
    .nav-links .new-buy-button {
         padding: 5px 20px; /* Adjusted padding */
    }

    .header-content {
        padding-top: 100px; /* Adjusted padding */
        max-width: 95%; /* Further constrain width on smaller screens */
    }

    .header-content h1 {
        font-size: 5rem; /* Adjusted font size for tablets */
    }

    .header-content h2 {
        font-size: 1.5rem; /* Adjusted font size for tablets */
    }

    .social-icons {
        margin-top: 20px; /* Adjusted margin */
    }

    .mobile-nav-overlay .mobile-nav-link {
        font-size: 1.5rem; /* Adjusted font size for tablets */
    }

    .mobile-nav-overlay .new-buy-button {
        font-size: 1.2rem; /* Adjusted font size for tablets */
    }
}

@media (max-width: 1063px) {
    .nav-links {
        display: none; /* Hide regular nav links */
    }

    .hamburger-menu {
        display: flex; /* Show hamburger menu */
    }

    .nav-bar {
        padding: 20px 30px; /* Adjust padding for smaller screens */
        justify-content: center;
        align-items: center;
    }

    .logo {
        display: none;
    }

    .header-content::before {
        content: "";
        display: block;
        background-image: url(images/logoZEN.png);
        background-size: contain;
        background-repeat: no-repeat;
        width: 100px;
        height: 100px;
        margin: 0 auto 1rem;
    }

    /* Hide hamburger menu when nav-bar is sticky */
    .nav-bar.sticky .hamburger-menu {
        display: flex;
    }
}

@media (min-width: 769px) and (max-width: 1063px) {
    .header-content::before {
        width: 150px;
        height: 150px;
        margin-bottom: 0;
    }

    .header-content {
        padding-top: 100px;
    }

    .header-content h1 {
        font-size: 8rem;
    }
}


@media (max-width: 480px) {
    .header {
        height: 400px; /* Even smaller height for very small screens */
    }

    .header-content h1 {
        font-size: 3.5rem; /* Smaller font size for very small screens */
    }

    .header-content h2 {
        font-size: 1.2rem; /* Smaller font size for very small screens */
    }

    .nav-bar {
        padding: 10px; /* Smaller padding for very small screens */
    }

    .nav-links {
        gap: 10px; /* Smaller gap for very small screens */
    }

    .nav-links .nav-main-link,
    .nav-links .new-buy-button {
        font-size: 0.9rem; /* Smaller font size for nav links */
        padding: 5px 10px; /* Smaller padding for buttons */
    }

    .mobile-nav-overlay .mobile-nav-link {
        font-size: 1.2rem; /* Adjusted font size for mobile */
    }

    .mobile-nav-overlay .new-buy-button {
        font-size: 1rem; /* Adjusted font size for mobile */
    }
}
