:root {
    --dorado: #ffcc00;
    --fondo-menu: hsl(0, 0%, 7%);
    --ancho-lateral: 300px;
}

* {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

body {
    background-color: #000000;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
}

/*ENCABEZADO GLOBAL*/
.encabezado_global {
    width: 100%;
    background-color: var(--fondo-menu);
    border-bottom: 1px solid #333;
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* El título va a la izquierda/centro y el botón a la derecha */
    box-sizing: border-box;
    z-index: 110;
}

/*Logotipo*/
.marco_logo{
    width:55px;
    height:55px;
    background-color:#ffcc00;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    overflow:hidden;
    padding:5px;
}

.grupo_titulo{
    display:flex;
    align-items:center;
    gap:12px; /* separación entre logo y texto */
}

.imagen_logo{
    width:100%;
    height:100%;
    object-fit:contain;
}

.encabezado_global h2 {
    font-size: 1.4rem;
    letter-spacing: 3px;
    margin: 0;
    color: white;
}

.contenedor_botones{
    display:flex;
    align-items:center;
    gap:10px;
}

.btn-volver{
    display:inline-flex;
    align-items:center;
    text-align: center;
    padding:6px 12px;
    min-height:34px;
    font-size:0.8rem;
    font-weight:bold;
    line-height:1;
    text-decoration:none;
    background:var(--dorado);
    color:#000;
    border:1px solid transparent;
    border-radius:5px;
    box-sizing:border-box;
    cursor:pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-volver:hover{
    background:#000;
    color:var(--dorado);
    border-color:var(--dorado);
}

.texto-boton{
    display:inline;
}

.icono-boton{
    display:none;
}

/* NUEVO CONTENEDOR DE CONTENIDO INFERIOR */
.interfaz_principal {
    display: flex;
    flex-direction: row;
    flex-grow: 1; /* Ocupa todo el espacio restante debajo del encabezado */
    width: 100%;
    height: calc(100dvh - 60px);
    overflow: hidden;
}

/* BARRA LATERAL DEL CONTENEDOR DEL MENÚ */
.contenedor_menu {
    width: var(--ancho-lateral); 
    background-color: var(--fondo-menu);
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

.encabezado_menu {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.encabezado_menu h2 {
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin: 0;
}

/* LISTA DE OPCIONES */
.lista_zonas {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.opcion_menu {
    position: relative;
    display: flex;
    flex-direction: column; /* Alineación vertical para que el submenú despliegue hacia abajo */
    padding: 15px 20px;
    text-decoration: none;
    color: #ccc;
    border-bottom: 1px solid #222;
    transition: 0.3s;
    cursor: pointer;
}

.opcion_menu:hover {
    background-color: #1a1a1a;
    color: var(--dorado);
}

/* Contenedor interno del número y el texto */
.bloque_titulo {
    display: flex;
    align-items: center;
    width: 100%;
}

/* EL CÍRCULO DEL NÚMERO EN EL MENÚ */
.numero {
    width: 25px; 
    height: 25px;
    border: 1px solid var(--dorado);
    border-radius: 32%;
    display: flex; 
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 0.8rem;
    color: var(--dorado);
    flex-shrink: 0;
}

/* ÁREA DEL MAPA */
.visor_principal {
    flex-grow: 1;
    overflow: auto;
    background-color: #080808;
    position: relative;
    align-items: safe center;
    justify-content: safe center;
    z-index: 1;
}

.contenedor_cr {
    position: relative;
    min-width: 900px;
    padding: 40px;
    margin: auto;
}

.contenedor_cr img {
    width: 100%;
    display: block;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* PUNTOS SOBRE EL CROQUIS */
.punto_mapa {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: white;
    color: black;
    border-radius: 32%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    text-decoration: none;
    box-shadow: 0 0 10px var(--dorado);
    border: 2px solid var(--dorado);
    transition: transform 0.2s;
    cursor: pointer;
    z-index: 50;
}

.punto_mapa:hover {
    transform: scale(1.2);
    background-color: var(--dorado);
    z-index: 200;
}

/* UBICACIONES DE LOS PUNTOS EN EL CROQUIS */
#pt1 { top: 40%; left: 18%; }
#pt2 { top: 29%; left: 27%; }
#pt3 { top: 24%; left: 42%; }
#pt4 { top: 44%; left: 43%; }
#pt5 { top: 40%; left: 53%; }
#pt6 { top: 65%; left: 49%; }
#pt7 { top: 58%; left: 62%; }

.volver_link {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
}

/*ESTILOS SUBMENÚS*/

.submenu_flotante {
    background-color: #121212 !important;
    border: 1px solid #333 !important;
    border-radius: 6px;
    padding: 10px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    display: none; /* Escondido por defecto */
}

/* Botones internos */
.submenu_flotante button {
    display: block !important;
    width: 100% !important;
    background-color: #1a1a1a !important;
    color: #eee !important;
    border: 1px solid #252525 !important;
    padding: 10px 12px !important;
    margin-bottom: 5px !important;
    border-radius: 4px !important;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.85rem !important;
    text-align: left !important;
    cursor: pointer;
    transition: 0.2s;
}

.submenu_flotante button:last-child {
    margin-bottom: 0 !important;
}

.submenu_flotante button:hover {
    background-color: var(--dorado) !important;
    color: #000 !important;
    font-weight: bold !important;
    border-color: var(--dorado) !important;
}

/*REGLAS DE DESPLIEGUE*/

/* 1. Submenú Lateral: Ahora despliega abajo de la zona para evitar que el mapa lo tape */
.submenu_flotante.lateral {
    position: relative; /* Cambiado a relativo para empujar el contenido verticalmente */
    width: 100% !important;
    box-sizing: border-box;
    margin-top: 10px;
    box-shadow: none; /* Evita sombras excesivas internamente */
}

.opcion_menu:hover .submenu_flotante.lateral {
    display: block;
}

/* 2. Submenú Mapa: Mantiene su estructura flotando a un lado del círculo */
.submenu_flotante.mapa {
    position: absolute;
    width: 210px !important;
    top: -10px;
    left: 32px;
    z-index: 500;
}

.punto_mapa:hover .submenu_flotante.mapa {
    display: block;
    color: white;
}

/* Mantiene activo el menú si interactúas con él */
.submenu_flotante:hover {
    display: block !important;
}

/* COMPORTAMIENTO MÓVIL */
@media (max-width: 768px) {

    /*Botones*/
    .texto-boton{
        display:none;
    }

    .icono-boton{
        display:block;
        font-size:1.2rem;
    }

    .btn-volver,
    .btn-info{
        width:42px;
        height:42px;
        padding:0;

        display:flex;
        justify-content:center;
        align-items:center;
    }
    
    /*General*/
    body {
        overflow: hidden; /*Evita que toda la pantalla tenga scroll general*/
    }

    .interfaz_principal {
        flex-direction: column !important; /*fuerza a que se apilen verticalmente*/
        height: calc(100vh - 60px) !important; /*Ajusta el espacio disponible real*/
    }

    .contenedor_menu {
        width: 100% !important;
        height: 30vh !important; /*Fija el menú superior*/
        max-height: 30vh !important;
        border-right: none;
        border-bottom: 1px solid #333;
        overflow: hidden; /*No permite que el contenedor se estire*/
    }

    .lista_zonas {
        height: 100%;
        overflow-y: auto; /*El scroll ocurre solo dentro de las opciones del menú*/
    }

    /*Ajuste para que los submenús en móvil no rompan el contenedor*/
    .submenu_flotante.lateral {
        position: relative;
        margin-top: 5px;
        box-shadow: none;
    }

    .visor_principal {
        width: 100% !important;
        height: 60vh !important; /*Fija el mapa estrictamente al 60% restante*/
        max-height: 60vh !important;
        overflow: auto; /*Permite mover el mapa libremente*/
        background-color: #080808;
    }

    .encabezado_global {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 20px !important; /*Un poco más compacto*/
    }

    .encabezado_global h2 { /*Centrar el 360°*/
        text-align: center !important; 
        margin: 0 !important;
        flex-grow: 1 !important; 
    }
}