/* Estilos generales de la Barra */
.bn-header {
    width: 100%;
    height: 80px;
    background-color: #333333;
    border-bottom: 1px solid #1a1a1a;
    position: absolute; /* Cambiado a absoluto para que suba con el scroll natural de la página */
    top: 0;
    left: 0;
    z-index: 9999;
    box-sizing: border-box;
    font-family: 'Oswald', sans-serif;
}

/* Espaciados para la barra de administración de WordPress */
body.admin-bar .bn-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .bn-header {
        top: 46px;
    }
}

.bn-container {
    max-width: 1300px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* --- SECTOR IZQUIERDO --- */
.bn-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bn-logo-link {
    display: flex;
    align-items: center;
}

.bn-logo {
    height: 24px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.bn-logo:hover {
    transform: scale(1.05);
}

.bn-separator {
    color: #ffe900;
    font-size: 22px;
    font-weight: 300;
    user-select: none;
}

.bn-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bn-socials a {
    display: flex;
    align-items: center;
}

.bn-socials img {
    height: 20px;
    width: auto;
    filter: brightness(0) invert(1); /* Pone los iconos blancos por defecto */
    transition: transform 0.2s ease, filter 0.2s ease;
}

.bn-socials img:hover {
    transform: scale(1.15);
    filter: none; /* Recupera su color original (o puedes dejarlos amarillos en hover) */
}

/* --- SECTOR DERECHO --- */
.bn-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.bn-nav-desktop {
    display: block;
}

.bn-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 22px;
}

.bn-menu-list > li > a {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 0;
    display: block;
    transition: color 0.2s ease;
}

.bn-menu-list > li > a:hover {
    color: #ffe900;
}

/* --- DROPDOWN (TEXTOS) --- */
.bn-has-dropdown {
    position: relative;
}

.bn-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333333;
    border: 1px solid #222;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    width: 260px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 15px;
    z-index: 10000;
}

.bn-has-dropdown:hover .bn-dropdown {
    opacity: 1;
    visibility: visible;
    margin-top: 5px;
}

.bn-dropdown-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bn-dropdown-grid li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.bn-dropdown-grid li a:hover {
    background-color: #ffe900;
    color: #000000;
    font-weight: bold;
}

/* --- BUSCADOR DESKTOP --- */
.bn-search-wrapper {
    display: block;
}

.bn-search-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bn-icon-search {
    height: 20px;
    width: auto;
    filter: brightness(0) invert(1);
}

.bn-icon-close-x {
    display: none;
    color: #ffe900;
    font-size: 28px;
    line-height: 1;
}

/* Estados al activar buscador */
.bn-header.search-active .bn-icon-search {
    display: none;
}

.bn-header.search-active .bn-icon-close-x {
    display: inline-block;
}

.bn-search-bar-dropdown {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: #333333;
    border-bottom: 2px solid #ffe900;
    padding: 15px 0;
    z-index: 9998;
}

.bn-search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.bn-search-form {
    display: flex;
    gap: 10px;
}

.bn-search-input {
    flex: 1;
    background-color: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 10px 15px;
    font-size: 15px;
    outline: none;
    border-radius: 4px;
}

.bn-search-input:focus {
    border-color: #ffe900;
}

.bn-search-submit {
    background-color: #ffe900;
    border: none;
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.bn-search-submit:hover {
    background-color: #ffffff;
}

/* --- ELEMENTOS MÓVILES (Ocultos por defecto en Desktop) --- */
.bn-mobile-trigger,
.bn-mobile-share-trigger {
    display: none;
}

/* --- RESPONSIVO (Pantallas <= 1024px) --- */
@media screen and (max-width: 1024px) {
	
	.bn-logo {
		height: 28px;
	}
	
    .bn-header {
        height: 60px;
    }
    
    .bn-container {
        padding: 0 15px;
        position: relative;
    }

    .bn-logo-link {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .bn-nav-desktop,
    .bn-search-wrapper,
    .bn-separator,
    .bn-socials {
        display: none !important;
    }

    /* Gatillo menú móvil */
    .bn-mobile-trigger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 22px;
        height: 16px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10001;
    }

    .bn-hamburger-line {
        width: 100%;
        height: 2px;
        background-color: #ffffff;
        transition: all 0.3s ease;
    }

    /* Animación del menú hamburguesa al activarse */
    .bn-mobile-trigger.active .bn-hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
        background-color: #ffe900;
    }
    .bn-mobile-trigger.active .bn-hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .bn-mobile-trigger.active .bn-hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
        background-color: #ffe900;
    }

    /* Icono de compartir móvil (derecha) */
    .bn-mobile-share-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #ffffff;
        cursor: pointer;
        padding: 5px;
        z-index: 10001;
    }

    .bn-share-svg {
        transition: opacity 0.2s ease;
    }

    .bn-share-close-x {
        display: none;
        color: #ffe900;
        font-size: 26px;
        line-height: 1;
    }

    .bn-mobile-share-trigger.active .bn-share-svg {
        display: none;
    }

    .bn-mobile-share-trigger.active .bn-share-close-x {
        display: block;
    }
}

/* --- MENÚ LATERAL IZQUIERDO (MÓVIL) --- */
.bn-mobile-sidebar {
    position: fixed;
    top: 60px;
    left: -280px;
    width: 280px;
    height: calc(100vh - 60px);
    background-color: #333333;
    z-index: 9998;
    transition: left 0.3s ease;
    box-sizing: border-box;
    overflow-y: auto;
    border-right: 1px solid #1a1a1a;
    font-family: 'Oswald', sans-serif;
}

body.admin-bar .bn-mobile-sidebar {
    top: 106px;
    height: calc(100vh - 106px);
}

.bn-mobile-sidebar.active {
    left: 0;
}

.bn-sidebar-content {
    padding: 25px 20px;
}

.bn-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bn-sidebar-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    text-transform: uppercase;
    display: block;
    letter-spacing: 0.5px;
}

/* Acordeón interno */
.bn-sidebar-has-accordion .bn-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.bn-accordion-arrow {
    color: #ffe900;
    font-size: 14px;
    transition: transform 0.3s ease;
    padding: 12px 20px; /* Área de toque cómoda (Touch Target recomendado de 48px) */
    cursor: pointer;
    user-select: none;
    margin-right: -10px; /* Compensa el padding visualmente */
}

.bn-sidebar-has-accordion.open .bn-accordion-arrow {
    transform: rotate(180deg);
}

.bn-accordion-content {
    display: none;
    list-style: none;
    padding: 10px 0 0 5px;
    margin: 0;
    flex-direction: column;
    gap: 6px;
}

.bn-accordion-content li a {
    color: #ffffff;
    background-color: #111;
    text-decoration: none;
    font-size: 15px;
    display: block;
    padding: 10px 15px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.bn-accordion-content li a:hover,
.bn-accordion-content li a:active {
    background-color: #ffe900;
    color: #000000;
    font-weight: bold;
}

/* --- MENÚ LATERAL DERECHO / REDES (MÓVIL) --- */
.bn-mobile-share-bar {
    position: fixed;
    top: 60px;
    right: -80px;
    width: 80px;
    height: calc(100vh - 60px);
    background-color: #333333;
    border-left: 1px solid #1a1a1a;
    z-index: 9998;
    transition: right 0.3s ease;
    box-sizing: border-box;
}

body.admin-bar .bn-mobile-share-bar {
    top: 106px;
    height: calc(100vh - 106px);
}

.bn-mobile-share-bar.active {
    right: 0;
}

.bn-share-icons-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding-top: 40px;
}

.bn-share-icons-vertical img {
    width: 30px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
}

.bn-share-icons-vertical img:hover {
    transform: scale(1.1);
}

/* --- BACKDROP DE ENFOQUE --- */
.bn-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bn-overlay.active {
    opacity: 1;
    visibility: visible;
}