/* ============================================
   NAVBAR.CSS - Navegación y Menú Lateral
   ============================================ */

/* WRAPPER STICKY */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--sombra-header);
}

/* BARRA PRINCIPAL */
.main-bar {
    background: var(--nav-bg);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    position: relative;
    z-index: 1002;
    border-bottom: 1px solid #222;
}

.left-group {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    flex-shrink: 0;
}

.hamburger-icon {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.menu-label {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.right-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    justify-content: flex-end;
    overflow: hidden;
}

/* SWITCH GEOLOCALIZACIÓN */
.geo-pill {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 25px;
    display: flex;
    align-items: center;
    padding: 4px 10px;
    gap: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.geo-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.geo-icon {
    font-size: 0.9rem;
}

.geo-text {
    font-size: 0.65rem;
    font-weight: 700;
    color: #cfcfcf;
    text-transform: uppercase;
    transition: all 0.3s ease;
    max-width: 100px;
    opacity: 1;
    overflow: hidden;
}

.geo-pill.hide-labels .geo-text {
    max-width: 0px;
    opacity: 0;
    margin: 0;
}

.geo-text.active {
    color: #fff;
}

.geo-text.active-local {
    color: var(--nav-accent);
}

.switch-toggle {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 34px;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider-round {
    background-color: var(--nav-accent);
}

input:checked+.slider-round:before {
    transform: translateX(16px);
}

/* BUSCADOR */
.search-container {
    display: flex;
    align-items: center;
    position: relative;
    background: transparent;
    border-radius: 20px;
    transition: 0.3s;
}

.search-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    z-index: 2;
}

.search-input-wrapper {
    width: 0;
    overflow: hidden;
    transition: width 0.4s ease;
    background: #222;
    border-radius: 20px 0 0 20px;
    display: flex;
    align-items: center;
    margin-right: -30px;
    padding-right: 30px;
    height: 32px;
    opacity: 0;
}

.search-container.active .search-input-wrapper {
    width: 180px;
    opacity: 1;
    padding-left: 10px;
    border: 1px solid #444;
    border-right: none;
}

.search-container.active .search-btn {
    background: #222;
    border: 1px solid #444;
    border-left: none;
    border-radius: 0 20px 20px 0;
    height: 32px;
    display: flex;
    align-items: center;
}

.search-input-field {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    outline: none;
    font-size: 0.85rem;
}

/* MENÚ LATERAL (DRAWER) */
.nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: #000;
    border-right: 1px solid #222;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
}

.nav-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.drawer-content {
    overflow-y: auto;
    flex-grow: 1;
    padding: 10px 0;
}

.drawer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    color: #ccc;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #111;
    transition: 0.2s;
}

.drawer-item:hover {
    color: #fff;
    background: #111;
    border-left: 4px solid var(--nav-accent);
    padding-left: 16px;
}

.drawer-item.active {
    color: var(--nav-accent);
    border-left: 4px solid var(--nav-accent);
    background: #0a0a0a;
}

.prov-badge {
    font-size: 0.7rem;
    background: #222;
    padding: 2px 6px;
    border-radius: 4px;
    color: #666;
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* BARRA DE TAGS */
.tags-bar {
    background: #000000;
    height: 35px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    overflow-x: auto;
    white-space: nowrap;
    border-bottom: 2px solid var(--nav-accent);
    scrollbar-width: none;
}

.tags-bar::-webkit-scrollbar {
    display: none;
}

.tag-head {
    color: var(--nav-accent);
    font-weight: 900;
    font-size: 0.75rem;
    margin-right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-item {
    color: #999;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 10px;
    padding: 3px 10px;
    background: #222;
    border-radius: 4px;
    transition: 0.2s;
    border: 1px solid #333;
}

.tag-item:hover {
    color: #fff;
    border-color: var(--nav-accent);
}