/* Enlaces dentro de los textos: más claros y subrayados para que se lean sobre el fondo azul/león */
#tm-main :is(p, li, td) a:not([class*="uk-button"]),
#tm-main .uk-panel > a:not([class*="uk-button"]) {
    color: #8fd3f0;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 3px;
}
#tm-main :is(p, li, td) a:not([class*="uk-button"]):hover,
#tm-main .uk-panel > a:not([class*="uk-button"]):hover {
    color: #fff;
}

/* Pie de página: enlaces con el mismo estilo que los del contenido (sin franja de fondo) */
footer a:not(.uk-totop):not([class*="uk-button"]) {
    color: #8fd3f0;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 3px;
}
footer a:not(.uk-totop):not([class*="uk-button"]):hover {
    color: #fff;
}

/* Esquema "ancho completo": el tema solo pinta la imagen de fondo en "en caja", así que la reproducimos aquí
   con una capa fija (funciona también en iOS). En "en caja" (existe .tm-page-container) no se aplica. */
html:not(:has(.tm-page-container)) {
    background-color: #264f86;
}
html:not(:has(.tm-page-container))::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(rgba(8, 20, 45, 0.1), rgba(8, 20, 45, 0.1)), url("/images/fondo.png") center center / cover no-repeat;
}


/* Barra de servicios (módulo "Navegación servicios", posición top): botones legibles sobre el fondo del león */
.uk-subnav.leman-servicios {
    margin-left: 0;
    gap: 8px;
    justify-content: center;
}
.uk-subnav.leman-servicios > * {
    padding-left: 0;
}
.uk-subnav.leman-servicios > li > a {
    display: block;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 999px;
    background: rgba(8, 20, 45, .55);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-transform: none;
    text-decoration: none;
    transition: background-color .15s, border-color .15s;
}
.uk-subnav.leman-servicios > li > a:hover,
.uk-subnav.leman-servicios > li > a:focus-visible {
    background: rgba(255, 255, 255, .22);
    border-color: #fff;
    color: #fff;
}
.uk-subnav.leman-servicios > li.uk-active > a {
    background: #0077B0;
    border-color: #0077B0;
    color: #fff;
    font-weight: 700;
}

/* Panel oscuro semitransparente: para formularios u otros bloques que van sobre el fondo del león */
.leman-panel {
    background: rgba(8, 20, 45, .62);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 14px;
    padding: 24px 28px;
}
@media (max-width: 640px) {
    .leman-panel {
        padding: 12px 8px;
    }
}

/* En móvil, los párrafos de la sección de contacto van alineados a la izquierda (la justificación estira teléfonos y correos) */
@media (max-width: 640px) {
    #contacto p {
        text-align: left;
    }
}

/* Listado de noticias: el resumen va justificado; el titular, a la izquierda */
.leman-news .el-content {
    text-align: justify;
}

/* Barra superior: fondo oscurecido con opacidad, contenido a la derecha y más grande */
.tm-toolbar { background: rgba(0, 0, 0, 0.19); }
.tm-toolbar > .uk-container { padding-top: 6px; padding-bottom: 6px; }
.tm-toolbar .uk-margin-auto-left { margin-left: auto; }
.tm-toolbar p { margin: 0; font-size: 1.0625rem; line-height: 1.5; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 22px; }
.tm-toolbar a { font-size: 1.0625rem; }
.tm-toolbar .leman-flags { display: inline-flex; align-items: center; gap: 8px; }
.tm-toolbar .leman-flags img { width: 24px; height: auto; }
/* Barra superior: ocupa todo el ancho, más estrecha, y con más aire por debajo */
.tm-toolbar { width: auto !important; margin: 0 -15px 18px -15px !important; padding-top: 9px !important; padding-bottom: 9px !important; }
.tm-toolbar > .uk-container { padding-top: 0; padding-bottom: 0; }
/* Barra superior: distintivo de servicio 24 h junto al teléfono */
.tm-toolbar .leman-tel { display: inline-flex; align-items: center; gap: 10px; }
.tm-toolbar .leman-24h { font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; padding: 1px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); color: #fff; font-weight: 500; white-space: nowrap; }
/* Botón fijo "Llamar" en móvil y tableta (lo inserta el plugin lemanseo); en escritorio ya está el teléfono en la barra superior */
.leman-call { display: none; }
@media (max-width: 959px) {
    .leman-call { display: flex; align-items: center; justify-content: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 980; padding: 11px 12px calc(11px + env(safe-area-inset-bottom)); background: #0077B0; color: #fff; font-size: .875rem; white-space: nowrap; text-decoration: none; box-shadow: 0 -2px 12px rgba(0, 0, 0, .3); }
    .leman-call:hover, .leman-call:focus { color: #fff; text-decoration: none; }
    .leman-call svg { width: 18px; height: 18px; flex: none; }
    .leman-call strong { font-size: 1rem; font-weight: 700; }
    body { padding-bottom: 50px; }
}

/* Selector de idioma (barra superior): idioma activo resaltado */
.tm-toolbar .leman-flags a { display: inline-flex; line-height: 0; }
.tm-toolbar .leman-flags img { opacity: .6; transition: opacity .15s; }
.tm-toolbar .leman-flags a:hover img, .tm-toolbar .leman-flags a:focus-visible img, .tm-toolbar .leman-flags img.active { opacity: 1; }
.tm-toolbar .leman-flags img.active { outline: 1px solid rgba(255, 255, 255, .75); outline-offset: 2px; }

/* Selector de idioma en el menú móvil */
.leman-idiomas-movil { margin-top: 24px; }
.leman-idiomas-movil .leman-flags { display: inline-flex; align-items: center; gap: 18px; }
.leman-idiomas-movil a { display: inline-flex; line-height: 0; padding: 6px 0; }
.leman-idiomas-movil img { width: 32px; height: auto; opacity: .6; }
.leman-idiomas-movil img.active { opacity: 1; outline: 1px solid rgba(255, 255, 255, .75); outline-offset: 2px; }

/* Alemán y francés: palabras largas; el partido de palabras evita huecos en el texto justificado */
html[lang="de-de"] .uk-text-justify, html[lang="de-de"] .uk-text-lead,
html[lang="fr-fr"] .uk-text-justify, html[lang="fr-fr"] .uk-text-lead { -webkit-hyphens: auto; hyphens: auto; }

/* Textos fijos con versión en cada idioma (pie): se muestra solo la del idioma de la página */
html:not([lang="es-es"]) .leman-lang-es,
html:not([lang="en-gb"]) .leman-lang-en,
html:not([lang="de-de"]) .leman-lang-de,
html:not([lang="fr-fr"]) .leman-lang-fr { display: none !important; }

/* Grúas Leman: en pantallas de ordenador la web se ve como al 80% del navegador (el diseño se hizo así).
   Móvil y tableta no cambian. Para ajustar el tamaño, cambiar 0.8 */
@media (min-width: 1200px) {
    html { zoom: 0.8; }
}

/* Grúas Leman: globo del mapa de las delegaciones (texto oscuro sobre fondo blanco) */
.leaflet-popup-content .el-title,
.leaflet-popup-content .el-meta { color: #333 !important; }
.leaflet-popup-content a.el-link { color: #1e5aa8 !important; font-weight: 700; text-decoration: underline; }
