/* ===== MOBILE-FIRST BASE STYLES ===== */

#navbar {
    width: 100%;
}

.navbar {
    min-height: 60px;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    position: relative;
    z-index: 100;
}

.navbar-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: nowrap;
    position: relative;
}

/* MOBILE: logo left, hamburger right */
.logo {
    flex: 0 0 33%; /* keep 33% */
    max-width: 33%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0.25rem;
    opacity: 1;
}

.logo-img {
    height: 30px;
    width: auto;
    margin-right: 0.5rem;
}

.logo-text {
    font-size: 1.2rem;
    letter-spacing: 0.1rem;
    display: flex;
    align-items: center;
    opacity: 1;
}

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 0.35rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* links - mobile: hidden via opacity/visibility so transitions work */
.navbar a {
    text-transform: uppercase;
    color: var(--text-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 0.9rem;
    padding: 0.25rem;
    width: 100%;
    opacity: 1;
}

.navbar a.active {
    background-color: var(--primary-color);
    outline: 1px solid var(--secondary-color);
    border: 0.5px solid rgba(0,0,0,0.35);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* mobile dropdown (hidden by default) */
.navbar-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    position: absolute;
    top: 40px;
    right: 0;
    background-color: rgba(0, 0, 0, 0.95);
    padding: 0.5rem 2rem;
    z-index: 10;
    max-width: 200px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}

/* when expanded: fully opaque and interactive */
.navbar-links.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* ===== TABLET (768px+) ===== */
@media (min-width: 768px) {
    .navbar {
        padding: 1.2rem;
    }

    .navbar a {
        padding: 0.75rem 0;
        font-size: 1.2rem;
        width: auto;
    }

    .navbar-links {
        top: 70px;
    }

    .logo {
        font-size: 1.3rem;
        flex: 0 0 33%;
        max-width: 33%;
        padding-left: 0;
    }

    .logo-text {
        font-size: 1.6rem;
    }

    .hamburger span {
        width: 30px;
        height: 4px;
    }
}

/* ===== DESKTOP (1024px+) ===== */
@media (min-width: 1024px) {
    .navbar {
        padding: 0 2rem;
    }

    .hamburger {
        display: none;
    }

    .navbar a {
        justify-content: center;
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .navbar-links {
        flex: 0 0 66%;
        max-width: 66%;
        gap: 1rem;
        display: flex;
        flex-direction: row;
        position: static;
        background-color: transparent;
        padding: 0;
        justify-content: center;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        transition: none;
    }

    .logo {
        font-size: 1.5rem;
        flex: 0 0 33%;
    }

    .logo-img {
        height: 35px;
    }
}