/* ==========================================
   BARRA DE NAVEGACIÓN SUPERIOR - CSS
   Entorno Turístico
   ========================================== */

/* Ocultar barra original del tema */
.mg-menu-full {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.mg-menu-full,
.mg-nav-widget-area-back,
.mg-nav-widget-area,
#mg-sticky-wrapper,
.mg-sticky-wrapper,
.stuck {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.mg-headwidget,
.site-logo {
    display: none !important;
}

/* Barra superior */
#barra-superior-custom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 24px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

body {
    padding-top: 72px;
}

@media (min-width: 769px) {
    body {
        padding-top: 62px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 67px !important;
    }
}

@media (max-width: 768px) {
    body.single {
        padding-top: 47px !important;
    }
}

html, body {
    background-color: #fff !important;
}

html {
    scroll-padding-top: 0;
}

.mg-nav-widget-area-back,
.mg-nav-widget-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

@media (min-width: 769px) {
    #barra-superior-custom {
        will-change: padding;
    }

    #barra-superior-custom.barra-grande {
        padding: 22px 24px;
    }

    #barra-superior-custom.barra-grande .barra-centro img {
        height: 84px;
    }

    #barra-superior-custom .barra-centro img {
        height: 50px;
        transition: height 0.4s ease;
    }
}

#barra-superior-custom .barra-izquierda {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-start;
}

#barra-superior-custom .barra-centro {
    display: flex;
    align-items: center;
    justify-content: center;
}

#barra-superior-custom .barra-centro img {
    height: 50px;
    width: auto;
}

#barra-superior-custom .barra-derecha {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
}

/* Botón hamburguesa */
#barra-superior-custom .btn-hamburguesa {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
}

#barra-superior-custom .btn-hamburguesa span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Overlay */
#menu-custom-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 10000;
}

#menu-custom-overlay.abierto {
    display: block;
}

/* Panel lateral */
#menu-custom-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: #fff;
    z-index: 10001;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    #menu-custom-panel {
        width: 100%;
    }
}

#menu-custom-panel.abierto {
    transform: translateX(0);
}

/* Cabecera del panel */
#menu-custom-panel .panel-cabecera {
    padding: 24px 20px 16px;
    border-bottom: 1px solid #f0f0f0;
}

#menu-custom-panel .panel-cabecera-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

#menu-custom-panel .panel-cabecera-top img {
    height: 36px;
    width: auto;
}

#menu-custom-panel .btn-cerrar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    line-height: 1;
    padding: 0;
}

#menu-custom-panel .btn-cerrar:hover {
    background: #eee;
}

/* Redes sociales en el panel */
#menu-custom-panel .panel-redes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#menu-custom-panel .panel-redes a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f5f5f5;
    border: 1px solid #eee;
    font-size: 12px;
    color: #444;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

#menu-custom-panel .panel-redes a:hover {
    background: #eee;
    color: #000;
}

#menu-custom-panel .panel-redes svg {
    flex-shrink: 0;
}

/* Buscador dentro del panel */
#menu-custom-panel .panel-buscador {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}

#menu-custom-panel .panel-buscador form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 8px 14px;
}

#menu-custom-panel .panel-buscador input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 100%;
    color: #222;
}

#menu-custom-panel .panel-buscador button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: #888;
}

/* Etiqueta de sección */
#menu-custom-panel .panel-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #aaa;
    padding: 16px 20px 6px;
}

/* Menú principal de WordPress */
#menu-custom-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#menu-custom-panel ul li a {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    color: #222;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid #f8f8f8;
    transition: background 0.15s, color 0.15s;
}

#menu-custom-panel ul li a:hover {
    background: #f9f9f9;
    color: #000;
}

#menu-custom-panel ul li ul li a {
    padding-left: 36px;
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

#menu-custom-panel ul li ul li a:hover {
    color: #000;
}

/* Sección secundaria */
#menu-custom-panel .panel-secundario {
    border-top: 1px solid #f0f0f0;
    padding-bottom: 24px;
}

#menu-custom-panel .panel-secundario ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: #555;
    font-size: 14px;
    font-weight: 400;
    border-bottom: 1px solid #f8f8f8;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

#menu-custom-panel .panel-secundario ul li a:hover {
    background: #f9f9f9;
    color: #000;
}

#menu-custom-panel .panel-secundario ul li a svg {
    flex-shrink: 0;
    color: #aaa;
}

/* Íconos redes barra superior */
#barra-superior-custom .barra-derecha a {
    color: #444;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

#barra-superior-custom .barra-derecha a:hover {
    color: #000;
}

/* Buscador barra superior */
#barra-superior-custom .barra-busqueda-wrap {
    display: flex;
    align-items: center;
}

#barra-superior-custom .barra-busqueda-wrap form {
    display: none;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 4px 12px;
    gap: 6px;
}

#barra-superior-custom .barra-busqueda-wrap form.abierto {
    display: flex;
}

#barra-superior-custom .barra-busqueda-wrap input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 160px;
}

#barra-superior-custom .barra-busqueda-wrap button[type="submit"] {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: #444;
}

#barra-superior-custom .btn-busqueda-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: #444;
    transition: color 0.2s;
}

#barra-superior-custom .btn-busqueda-toggle:hover {
    color: #000;
}

@media (max-width: 768px) {
    #barra-superior-custom .barra-derecha a {
        display: none !important;
    }
}

#form-busqueda-barra input[type="search"]::-webkit-search-decoration,
#form-busqueda-barra input[type="search"]::-webkit-search-cancel-button,
#form-busqueda-barra input[type="search"]::-webkit-search-results-button,
#form-busqueda-barra input[type="search"]::-webkit-search-results-decoration {
    display: none;
}

#form-busqueda-barra input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
}

#form-busqueda-barra.abierto ~ .btn-busqueda-toggle,
.barra-busqueda-wrap:has(#form-busqueda-barra.abierto) .btn-busqueda-toggle {
    display: none;
}
