/* estilos.css - Arquitectura Visual AntenaDigital.es */

/* --- ARQUITECTURA FLEXBOX VERTICAL --- */
html, body {
    height: 100%; 
    margin: 0; 
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex; 
    flex-direction: column;
    overflow: hidden; 
    width: 100%;
}

/* Contenedor central entre cabecera y pie */
.contenedor-principal {
    display: flex; 
    flex-grow: 1;
    position: relative; 
    width: 100%; 
    overflow: visible !important; 
}

/* --- ESTILOS NAVBAR HORIZONTAL (PC) --- */
.navbar-horizontal {
    width: 100%; 
    height: 60px; 
    background-color: #1a252f; 
    color: white;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 0 20px; 
    box-sizing: border-box; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 5000; 
    position: relative;
}

.navbar-logo h1 { margin: 0; font-size: 18px; color: #3498db; display: inline-block; vertical-align: middle; }
.navbar-logo span { font-size: 11px; color: #bdc3c7; margin-left: 10px; display: inline-block; vertical-align: middle; }

.nav-links-horizontal { display: flex; list-style: none; margin: 0; padding: 0; }
.dropdown-h { position: relative; } 

.nav-item-h { color: #ecf0f1; text-decoration: none; font-size: 14px; padding: 21px 15px; display: block; cursor: pointer; }
.nav-item-h:hover { background-color: #2c3e50; color: #3498db; }

/* Primer nivel de submenú */
.dropdown-content-h {
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0;
    background-color: #1a252f; 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    min-width: 170px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    z-index: 9999; 
}

/* Segundo nivel de submenú: Abre a la izquierda */
.submenu-h { position: relative; }
.submenu-content-h {
    display: none;
    position: absolute;
    top: 0;
    left: -100%; 
    background-color: #111a22;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 160px;
    box-shadow: -4px 4px 10px rgba(0,0,0,0.4); 
    z-index: 10000;
}

/* Acciones dinámicas de Hover */
.dropdown-h:hover > .dropdown-content-h { display: block; }
.submenu-h:hover > .submenu-content-h { display: block; }

/* Botones de acción dentro de la interfaz superior */
.dropdown-content-h button, .dropdown-content-h a {
    color: #ecf0f1; padding: 12px 16px; text-decoration: none; display: block;
    width: 100%; text-align: left; background: none; border: none; font-size: 13px; cursor: pointer;
    box-sizing: border-box;
}
.dropdown-content-h button:hover, .dropdown-content-h a:hover {
    background-color: #2c3e50; color: #3498db;
}
.dropdown-content-h button.activo {
    color: #2ecc71 !important;
    font-weight: bold;
}

.sub-comunidad { font-weight: bold; color: #e67e22 !important; }

/* --- MENÚ LATERAL Y BOTÓN EN MÓVILES --- */
.mobile-menu-btn {
    display: none; 
    position: absolute; 
    top: 12px; 
    right: 15px; 
    z-index: 3000; 
    background-color: #1a252f; 
    color: white; 
    border: none;
    padding: 8px 12px; 
    border-radius: 4px; 
    font-size: 15px; 
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.menu-overlay { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 2400; }

.sidebar-navigation {
    position: absolute; right: 0; top: 0; width: 280px; height: 100%;
    background-color: #1a252f; z-index: 2500; transform: translateX(100%); transition: transform 0.3s ease;
    display: flex; flex-direction: column; box-shadow: -2px 0 5px rgba(0,0,0,0.3);
}
.sidebar-navigation.movil-abierto { transform: translateX(0); }
.sidebar-logo { padding: 20px; background-color: #111a22; border-bottom: 1px solid #2c3e50; }
.sidebar-logo h2 { margin: 0; font-size: 16px; color: #3498db; }

.nav-links-vertical { padding: 15px 0; overflow-y: auto; flex-grow: 1; }
.nav-item-v, .dropdown-v-btn {
    display: block; width: 100%; padding: 12px 20px; color: #ecf0f1; text-decoration: none;
    font-size: 14px; text-align: left; background: none; border: none; cursor: pointer; box-sizing: border-box;
}
.nav-item-v:hover, .dropdown-v-btn:hover { background-color: #2c3e50; }

.dropdown-v-content { background-color: #111a22; padding: 10px 0; }
.sub-block { padding: 5px 0 10px 0; border-bottom: 1px solid #1a252f; }
.block-title { display: block; font-size: 11px; color: #e67e22; font-weight: bold; padding: 5px 20px; }

.sidebar-navigation .btn-red-mapa {
    display: block; width: 100%; background: none; border: none; color: #bdc3c7;
    padding: 8px 30px; font-size: 13px; text-align: left; cursor: pointer;
}
.sidebar-navigation .btn-red-mapa:hover { color: white; background-color: #1a252f; }
.sidebar-navigation .btn-red-mapa.activo { color: #2ecc71; font-weight: bold; }

.menu-seccion-v { display: block; padding: 10px 20px; font-size: 14px; color: #3498db; font-weight: bold; text-transform: uppercase; }

/* --- VISOR DE MAPAS --- */
#map { 
    flex-grow: 1; 
    height: 100%; 
    width: 100%; 
    z-index: 1; 
}

/* --- PANEL LATERAL DE SERVICIOS --- */
.sidebar-servicios {
    position: absolute; top: 0; right: -400px; width: 360px; height: 100%;
    background-color: #ffffff; box-shadow: -2px 0 10px rgba(0,0,0,0.2); z-index: 1500;
    transition: right 0.3s ease; display: flex; flex-direction: column; padding: 20px; box-sizing: border-box;
}
.sidebar-servicios.abierto { right: 0; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #ecf0f1; padding-bottom: 10px; margin-bottom: 15px; }
.sidebar-header h2 { margin: 0; font-size: 18px; color: #2c3e50; }
.btn-cerrar { background: none; border: none; font-size: 22px; font-weight: bold; color: #7f8c8d; cursor: pointer; }
.sidebar-contenido { overflow-y: auto; flex-grow: 1; }

.tabla-servicios { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla-servicios th { background-color: #f4f6f7; text-align: left; padding: 8px; color: #34495e; }
.tabla-servicios td { padding: 8px; border-bottom: 1px solid #f2f4f4; vertical-align: middle; }
.logo-servicio { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; background-color: #f8f9fa; margin-right: 8px; }
.info-tecnica { font-size: 11px; color: #7f8c8d; }
.enlace-popup { color: #3498db; font-weight: bold; text-decoration: underline; cursor: pointer; }
.icono-personalizado { background: none; border: none; }

/* --- PIE DE PÁGINA (40px) --- */
.site-footer {
    height: 40px; 
    width: 100%; 
    background-color: #111a22; 
    color: #bdc3c7;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 0 20px; 
    box-sizing: border-box; 
    font-size: 12px; 
    border-top: 1px solid #2c3e50; 
    z-index: 2000;
}
.footer-left a { color: #3498db; text-decoration: none; margin-left: 15px; }
.footer-left a:hover { text-decoration: underline; }
.footer-right { color: #95a5a6; }

/* --- ADAPTACIONES RESPONSIVAS MÓVILES --- */
@media (max-width: 768px) {
    .navbar-horizontal { display: none; }
    .mobile-menu-btn { display: block; }
    .sidebar-servicios { width: 100%; right: -100%; }
}
/* Asegurar que el enlace del logo no altere el diseño flex */
.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    vertical-align: middle;
}

.logo-link:hover {
    text-decoration: none;
    color: inherit;
}