/* ================= NAVBAR ================= */

.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 999;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.navbar-logo img {
    height: 50px;
    transition: transform 0.3s ease;
}
.navbar-logo img:hover {
    transform: scale(1.05);
}

/* Text wordmark logo (used until a real logo image is supplied) */
.navbar-logo-text {
    font-family: var(--heading-font);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--primary) !important;
    transition: color 0.3s ease;
}
.navbar-logo-text::after {
    content: "";
}
.navbar-logo-text:hover {
    color: var(--gold) !important;
}

/* Menu */
.navbar-menu {
    list-style: none;
    display: flex;
    gap: 30px;
}
.navbar-menu li {
    position: relative;
}
.navbar-menu a {
    font-family: var(--body-font);
    font-weight: 500;
    color: var(--dark);
    padding: 8px 0;
    transition: color 0.3s ease;
}
.navbar-menu a:hover {
    color: var(--gold);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    display: none;
    flex-direction: column;
    min-width: 200px;
    padding: 10px 0;
}
.dropdown:hover .dropdown-menu {
    display: flex;
}
.dropdown-menu li {
    padding: 8px 20px;
}
.dropdown-menu a {
    color: var(--dark);
}
.dropdown-menu a:hover {
    color: var(--primary);
}

/* Logged-in navbar state: "Account" keeps the standard .btn-secondary
   pill, but a second solid-gold pill right next to it for "Logout" is
   visually loud for a low-frequency action — style it as a quieter text
   link instead so "Account" stays the one clear call to action. */
.navbar-right .navbar-logout {
    background: transparent;
    color: var(--dark, #1c1c1c);
    padding: 0.75rem 0.4rem;
    box-shadow: none;
}
.navbar-right .navbar-logout:hover {
    background: transparent;
    color: var(--gold, #c7a66a);
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

/* Right Side */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Profile icon (top-right, shown after login) + its dropdown menu */
.navbar-profile {
    position: relative;
}
.navbar-profile-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: box-shadow 0.2s ease;
}
.navbar-profile-trigger:hover,
.navbar-profile-trigger[aria-expanded="true"] {
    box-shadow: 0 0 0 3px rgba(35, 83, 71, 0.18);
}
.navbar-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary, #235347);
    color: #fff;
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}
.navbar-profile-avatar-lg {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    flex-shrink: 0;
}
.navbar-profile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: var(--white, #fff);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.16);
    padding: 8px;
    z-index: 1000;
}
.navbar-profile-menu.is-open {
    display: flex;
}
.navbar-profile-menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 6px;
}
.navbar-profile-menu-id {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.navbar-profile-menu-id strong {
    color: var(--dark, #1c1c1c);
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-profile-menu-id span {
    color: #8a8a8a;
    font-size: 0.78rem;
}
.navbar-profile-menu a {
    padding: 10px;
    border-radius: 8px;
    color: var(--dark, #1c1c1c);
    font-size: 0.92rem;
    font-weight: 500;
}
.navbar-profile-menu a:hover {
    background: rgba(35, 83, 71, 0.08);
    color: var(--primary, #235347);
}
.navbar-profile-menu-logout,
.navbar-profile-logout {
    color: #b3413c !important;
}
.navbar-profile-menu-logout:hover,
.navbar-profile-logout:hover {
    background: rgba(179, 65, 60, 0.08) !important;
    color: #b3413c !important;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}
.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: var(--white);
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px;
}
.mobile-menu ul {
    list-style: none;
    padding: 20px;
}
.mobile-menu li {
    margin-bottom: 15px;
}
.mobile-menu a {
    color: var(--dark);
    font-weight: 500;
}
.mobile-menu a:hover {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 992px) {
    .navbar-menu {
        display: none;
    }
    .navbar-right {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .mobile-menu {
        display: none;
    }
    .mobile-menu.active {
        display: block;
    }
}
