/* ==========================================================================
   WhichAIPlan - Shared Top Navbar, Brand & Navigation Tabs
   ========================================================================== */

/* Master Header Container */
header#siteNavbar {
    background: transparent;
    border-bottom: none;
    padding: 14px 24px 4px 24px;
    position: relative;
    z-index: 100;
    max-width: 1200px;
    margin: 0 auto;
}

/* 1. Wide Desktop Layout (> 1080px): Ultra-Compact 1 Single Row (3 Columns) */
@media (min-width: 1081px) {
    header#siteNavbar {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 16px;
    }
    .navbar-brand {
        grid-column: 1;
        justify-self: center;
        padding-left: 0;
    }
    .navbar-toggle-row {
        grid-column: 2;
        justify-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }
    .navbar-right {
        grid-column: 3;
        justify-self: center;
        align-self: center;
        margin-top: 0;
    }
}

/* 2. Laptop & Tablet Layout (681px - 1080px): Clean 2-Row Grid */
@media (max-width: 1080px) and (min-width: 681px) {
    header#siteNavbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        row-gap: 12px;
        column-gap: 16px;
        padding: 12px 20px 4px 20px;
    }
    .navbar-brand {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        padding-left: 0;
    }
    .navbar-right {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        align-self: center;
        margin-top: 0;
    }
    .navbar-toggle-row {
        grid-column: 1 / span 2;
        grid-row: 2;
        justify-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-top: 2px;
    }
}

/* 3. Mobile Layout (<= 680px): Clean 3-Row Centered Stack */
@media (max-width: 680px) {
    header#siteNavbar {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 10px 12px 4px 12px;
    }
    .navbar-brand {
        order: 1;
        justify-content: center;
        text-align: center;
        gap: 0;
    }
    .brand-title {
        font-size: 19px;
        text-align: center;
    }
    .brand-logo-img {
        width: 36px;
        height: 36px;
        margin-right: -4px;
    }
    .navbar-right {
        order: 2;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    .navbar-toggle-row {
        order: 3;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 2px;
    }
}

@media (max-width: 380px) {
    header#siteNavbar {
        padding: 8px 6px 4px 6px;
    }
}

/* Brand & Utility Shared Aesthetics */
.navbar-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    line-height: 1;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.navbar-brand:hover {
    opacity: 0.95;
}

.navbar-brand:active {
    transform: scale(0.99);
}

.brand-logo-img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    object-fit: contain;
    margin-right: -4px;
    transition: transform 0.2s ease;
}

.navbar-brand:hover .brand-logo-img {
    transform: scale(1.05);
}

.brand-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.4px;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.brand-title span {
    color: var(--accent-cyan);
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.navbar-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
