/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navbar starts hidden */
.navbar {
    position: fixed;
    top: -90px; /* Initially hidden */
    left: 0;
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    z-index: 1002;
    transition: top 0.3s ease, opacity 0.3s ease, background-color 0.5s ease;
    background-color: transparent;
    font-family: var(--font-body);
    padding: 0 20px;
    opacity: 0; /* Hidden initially */
}

/* After navbar loads, show it */
.navbar.visible {
    top: 0;
    opacity: 1;
}

.nav-black {
    color: var(--secondary-color)
}


.navbar-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo svg path {
    fill: var(--dark-color);
}

/* Navbar Background on Scroll */
.navbar.scrolled {
    background-color: var(--primary-color);
}

/* Desktop Links */
.nav-links {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

/* Links with Underline Hover Effect */
.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 800;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

/* Underline - starts invisible */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--dark-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

/* Hover - underline grows in */
.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Active link - underline always visible */
.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Exclude button (phone link) from underline effect */
.nav-links .btn-phone::after {
    display: none;
}

/* Phone button in navbar */
.nav-links .btn-phone {
    display: flex;
    align-items: center;
    background-color: var(--dark-color);
    color: var(--secondary-color);
    font-weight: 800;
    padding: 14px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links .btn-phone .phone-icon {
    margin-left: 8px;
    height: 20px;
    width: 20px;
}

/* Hover State - Button changes to white background, black text and icon */
.nav-links .btn-phone:hover {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

/* Container for phone icon and hamburger */
.hamburger-phone-container {
    display: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    position: relative;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.hamburger .bar {
    width: 30px;
    height: 3px;
    border-radius: 10px;
    background-color: var(--dark-color);
    transition: all 0.3s ease;
}

/* Hamburger to X animation */
.hamburger.open .bar:nth-child(1) {
    transform: rotate(45deg);
    position: absolute;
    top: 0;
}

.hamburger.open .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.open .bar:nth-child(3) {
    transform: rotate(-45deg);
    position: absolute;
    top: 0;
}

/* Phone icon next to hamburger (mobile only) */
.hamburger-phone-container svg {
    width: 20px;
    height: 20px;
    margin-right: 24px;
    position: relative;
    top: 2px;
}

.hamburger-phone-container svg path {
    fill: var(--dark-color);
}

/* Mobile Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    min-height: 600px;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    transition: right 0.3s ease;
    font-family: var(--font-body);
}

.side-menu.open {
    right: 0;
}

.side-menu nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.side-menu nav a {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark-color);
    text-decoration: none;
    display: block;
    margin: 35px 0;
    text-transform: uppercase;
    opacity: 1;
    transition: color 0.3s ease;
}

.side-menu nav a:hover {
    color: var(--secondary-color);
}

/* Disable scroll when mobile menu open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Show hamburger and phone icon on mobile */
@media (max-width: 950px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hamburger-phone-icon {
        display: block;
    }

    .hamburger-phone-container {
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

/* Black Background Hero Screens */
.hero-black .nav-links a {
    color: var(--secondary-color);
}
.hero-black .nav-links a::after {
    background-color: var(--secondary-color);
}

.hero-black .nav-links .btn-phone {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

.hero-black .nav-links .btn-phone:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.hero-black .hamburger .bar {
    background-color: var(--secondary-color);
}

.hero-black .hamburger-phone-container svg path {
    fill: var(--secondary-color);
}

.hero-black .navbar.scrolled {
    background-color: var(--dark-color);
}

.hero-black .side-menu {
    background-color: var(--dark-color);
}

.hero-black .side-menu nav a {
    color: var(--secondary-color);
}

.hero-black .side-menu nav a:hover {
    color: var(--primary-color);
}

.hero-black .logo svg path {
    fill: var(--secondary-color);
}


.hero-black .side-menu button.white {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

.hero-black .side-menu button.white:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

/* Black to Green Button for Off-White Heroes */
.hero-location .nav-links .btn-phone:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

/* Underline active links */
.nav-links a.active {
    color: var(--secondary-color); /* Change this to the color you want the active link to be */
}
