
/* ==========================================================
   UPAM3D · HOJA DE ESTILOS GENERAL
   Hospital General Universitario Gregorio Marañón

   ESTILOS COMPARTIDOS:
   - Versión española
   - Versión inglesa

   ORGANIZACIÓN DEL ARCHIVO:

   01. Variables y estilos generales
   02. Cabecera y navegación
   03. Botones
   04. Portada principal
   05. Portadas interiores

   Las siguientes secciones se añadirán a continuación:
   - Tarjetas y secciones generales
   - Proceso interactivo
   - Seis demostraciones interactivas
   - Organización y equipo
   - Biografías individuales
   - Casos clínicos
   - Formularios y contacto
   - Instagram y pie de página
   - Adaptación a móviles
========================================================== */


/* ==========================================================
   01. VARIABLES Y ESTILOS GENERALES
========================================================== */

/* Paleta de colores de UPAM3D */

:root {

    /* Colores principales */

    --azul: #163e60;

    --azul-claro: #197d9f;

    --turquesa: #45b6bd;

    --turquesa-suave: #e9f6f7;


    /* Fondos */

    --fondo: #f5f8fa;

    --blanco: #ffffff;


    /* Textos */

    --texto: #20394b;

    --gris: #5a6d7b;


    /* Bordes y elementos */

    --borde: #dfe9ee;

    --radio: 10px;

    --sombra: 0 8px 30px rgba(35, 62, 84, 0.08);

}


/* Reinicio básico */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--blanco);
    color: var(--texto);
    font-family: "DM Sans", Arial, sans-serif;
    line-height: 1.6;
}


/* Tipografía de títulos */

h1,
h2,
h3,
h4,
h5 {
    font-family: "Manrope", sans-serif;
    line-height: 1.25;
}


/* Enlaces */

a {
    color: inherit;
    text-decoration: none;
}


/* Imágenes */

img {
    max-width: 100%;
}


/* Botones */

button {
    font: inherit;
    cursor: pointer;
}


/* Elementos ocultos */

[hidden] {
    display: none !important;
}


/* Accesibilidad del teclado */

:focus-visible {
    outline: 3px solid var(--turquesa);
    outline-offset: 3px;
}


/* Contenedor principal */

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}


/* Texto visualmente oculto */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* Iconos SVG generales */

.ico {
    width: 1.25em;
    height: 1.25em;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}


/* ==========================================================
   02. CABECERA Y NAVEGACIÓN
========================================================== */


/* Franja superior azul */

.topbar {
    background: var(--azul);
    color: var(--blanco);
    padding: 9px 5%;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 1.5px;
}


/* Cabecera */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--blanco);
    box-shadow: 0 3px 20px rgba(24, 52, 75, 0.08);
}


/* Contenedor del menú */

.navbar {
    width: min(1500px, 96%);
    min-height: 88px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
    padding: 4px 0;
}


/* Logotipo UPAM3D */

.logo-img {
    display: block;
    width: auto;
    height: 100px;
    max-width: 100%;
    object-fit: contain;
}


/* Navegación principal */

.menu {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* Enlaces */

.menu > a:not(.instagram-menu):not(.hospital-menu) {
    color: var(--texto);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;

    transition: color 0.2s ease;
}


/* Enlace activo y efecto hover */

.menu > a:hover,
.menu > a.active {
    color: var(--azul-claro);
}


/* ==========================================================
   MENÚ DESPLEGABLE EN MÓVILES
========================================================== */


/* Botón hamburguesa */

.menu-toggle {
    display: none;

    width: 48px;
    height: 48px;

    align-items: center;
    justify-content: center;

    background: transparent;
    border: 1.5px solid var(--borde);
    border-radius: 10px;

    color: var(--azul);
}


/* Icono del menú */

.menu-toggle .ico {
    width: 26px;
    height: 26px;
}


/* ==========================================================
   INSTAGRAM EN EL MENÚ
========================================================== */

.instagram-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    flex-shrink: 0;

    color: var(--azul-claro);
    border-radius: 9px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


/* Icono de Instagram */

.instagram-menu svg {
    width: 21px;
    height: 21px;
}


/* Hover Instagram */

.instagram-menu:hover {
    background: var(--turquesa-suave);
    color: var(--azul);
}


/* ==========================================================
   SELECTOR DE IDIOMAS ES / EN
========================================================== */

.lang {
    display: inline-flex;
    align-items: center;

    border: 1.5px solid var(--borde);
    border-radius: 999px;

    overflow: hidden;

    font-size: 12px;
    font-weight: 800;

    flex-shrink: 0;
    white-space: nowrap;
}


/* Idiomas */

.lang a,
.lang span {
    display: inline-block;
    padding: 7px 12px;
    letter-spacing: 1px;
}


/* Idioma seleccionado */

.lang span {
    background: var(--azul);
    color: var(--blanco);
}


/* Idioma disponible */

.lang a {
    color: var(--azul-claro);
}


/* Hover */

.lang a:hover {
    background: var(--turquesa-suave);
}


/* ==========================================================
   LOGOTIPO DEL HOSPITAL EN EL MENÚ
========================================================== */

.hospital-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: 12px;

    flex-shrink: 0;
}


/* Imagen del hospital */

.hospital-menu img {
    display: block;

    width: 190px;
    height: auto;
    max-height: 90px;

    object-fit: contain;
}


/* Hover */

.hospital-menu:hover {
    opacity: 0.8;
}


/* ==========================================================
   03. BOTONES GENERALES
========================================================== */


/* Botón principal */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 14px 26px;
    min-height: 48px;

    background: var(--azul-claro);
    color: var(--blanco);

    border: 2px solid var(--azul-claro);
    border-radius: 6px;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;

    text-align: center;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


/* Efecto al pasar el ratón */

.btn:hover {
    background: var(--azul);
    border-color: var(--azul);
    transform: translateY(-2px);
}


/* Botón blanco */

.btn-light {
    background: var(--blanco);
    color: var(--azul);
    border-color: var(--blanco);
}

.btn-light:hover {
    background: var(--turquesa-suave);
    color: var(--azul);
    border-color: var(--turquesa-suave);
}


/* Botón transparente con borde blanco */

.btn-outline {
    background: transparent;
    color: var(--blanco);
    border-color: var(--blanco);
}

.btn-outline:hover {
    background: var(--blanco);
    color: var(--azul);
    border-color: var(--blanco);
}


/* Botón secundario */

.btn-sec {
    background: transparent;
    color: var(--azul-claro);
}

.btn-sec:hover {
    color: var(--blanco);
}


/* Botón fantasma */

.btn-ghost {
    background: transparent;
    color: var(--azul-claro);
}

.btn-ghost:hover {
    color: var(--blanco);
}


/* ==========================================================
   04. PORTADA PRINCIPAL
========================================================== */


/* Imagen y degradado de la portada */

.hero {
    display: flex;
    align-items: center;

    min-height: 540px;

    color: var(--blanco);

    background:
        linear-gradient(
            90deg,
            rgba(12, 42, 66, 0.96) 0%,
            rgba(12, 42, 66, 0.84) 45%,
            rgba(12, 42, 66, 0.35) 100%
        ),
        url("../imagenes/portada.jpg") center / cover;

    background-color: #174460;
}


/* Contenido de la portada */

.hero-content {
    width: min(700px, 100%);
    padding: 70px 0;
}


/* Texto pequeño superior */

.eyebrow {
    color: #94e1e5;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.5px;
}


/* Título principal */

.hero h1 {
    font-size: clamp(34px, 5vw, 60px);

    margin: 20px 0;

    letter-spacing: -1.5px;
    line-height: 1.2;
}


/* Descripción */

.hero p {
    max-width: 560px;

    color: #e0ecf1;

    font-size: 17px;
    line-height: 1.8;
}


/* Botones de la portada */

.hero-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;
    margin-top: 28px;
}



/* ==========================================================
   PORTADA EN INGLÉS
========================================================== */

.hero .hero-content:has(.titulo-ingles) {
    width: min(1100px, 100%);
}

.hero .titulo-ingles {
    font-size: clamp(32px, 4.2vw, 58px);
    line-height: 1.2;
    letter-spacing: -1.5px;
}

.hero .titulo-ingles span {
    display: block;
    white-space: nowrap;
}

/* Adaptación a móviles */

@media (max-width: 900px) {
    .hero .titulo-ingles {
        font-size: clamp(27px, 5vw, 44px);
    }

    .hero .titulo-ingles span {
        white-space: normal;
    }
}


/* ==========================================================
   05. PORTADAS INTERIORES
========================================================== */


/* Portadas de equipo, casos y biografías */

.hero-casos {
    min-height: 0;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            #163e60,
            #197d9f
        );
}


/* Contenido centrado */

.hero-casos .hero-content {
    margin: 0 auto;
    padding: 56px 0 64px;
}


/* Descripción centrada */

.hero-casos p {
    margin-left: auto;
    margin-right: auto;
}


/* Portadas individuales del equipo */

.perfil-hero .hero-content {
    padding: 55px 0;
}

/* ==========================================
   IMAGEN DE FONDO DEL BANNER PRINCIPAL
========================================== */

.hero {
    position: relative;

    background-image:
        linear-gradient(
            90deg,
            rgba(10, 36, 57, 0.92) 0%,
            rgba(10, 36, 57, 0.78) 45%,
            rgba(10, 36, 57, 0.30) 100%
        ),
        url("../imagenes/banner-principal-quirofano.jpg");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Mantener el texto por delante del fondo */

.hero .container {
    position: relative;
    z-index: 1;
}

/* ==========================================================
   06. CARACTERÍSTICAS PRINCIPALES
   Las tres características debajo de la portada
========================================================== */

/* Contenedor de las características */

.features {
    padding: 30px 0;
    border-bottom: 1px solid #e4eaee;
}

/* Distribución en tres columnas */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

/* Cada característica */

.feature {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

/* Fondo del icono */

.feature-icon {
    display: grid;
    place-items: center;

    width: 54px;
    height: 54px;

    flex-shrink: 0;

    background: var(--turquesa-suave);
    color: var(--azul-claro);

    border-radius: 12px;
}

/* Tamaño de los iconos */

.feature-icon .ico {
    width: 26px;
    height: 26px;
}

/* Título */

.feature strong {
    display: block;
    font-size: 14px;
    color: var(--texto);
}

/* Descripción */

.feature p {
    margin: 4px 0 0;

    font-size: 13px;
    line-height: 1.5;
    color: var(--gris);
}


/* ==========================================================
   07. SECCIONES GENERALES DE LA WEB
========================================================== */

/* Espaciado de las secciones */

section.content {
    padding: 84px 0;
    scroll-margin-top: 110px;
}

/* Fondo gris claro */

.bg-light {
    background: var(--fondo);
}

/* Encabezado de cada sección */

.section-heading {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

/* Etiquetas pequeñas sobre los títulos */

.tag {
    color: var(--azul-claro);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Títulos de sección */

.section-heading h2 {
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -1px;
    margin: 12px 0;
    color: var(--texto);
}

/* Descripciones */

.section-heading p {
    margin: 0;

    font-size: 15px;
    line-height: 1.8;
    color: var(--gris);
}

/* ==========================================================
   QUIÉNES SOMOS?
========================================================== */

/* ==========================================
   RED MULTIDISCIPLINAR UPAM3D
   ESPAÑOL E INGLÉS - 7 DISCIPLINAS
========================================== */

.red-upam {
    background: #ffffff;
    padding: 95px 0;
    overflow: hidden;
}

/* ENCABEZADO */

.red-encabezado {
    max-width: 1000px;
    margin: 0 auto 55px;
    text-align: center;
}

.red-encabezado .tag {
    color: #1299aa;
    letter-spacing: 2px;
    font-weight: 800;
}

.red-encabezado h2 {
    max-width: 980px;
    margin: 18px auto;
    color: #173b56;
    font-size: clamp(30px, 3.5vw, 48px);
    line-height: 1.2;
}

.red-encabezado p {
    max-width: 850px;
    margin: 0 auto;
    color: #607d90;
    font-size: 17px;
    line-height: 1.8;
}

/* ==========================================
   CONTENEDOR DEL ESQUEMA
========================================== */

.red-interactiva {
    position: relative;
    display: block;
    width: 100%;
    max-width: 1120px;
    height: 650px;
    margin: 0 auto 35px;
    isolation: isolate;
}

/* CÍRCULO EXTERIOR */

.red-interactiva::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 540px;
    height: 540px;
    border: 1.5px solid #d6eaf0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================
   LÍNEAS DE CONEXIÓN
========================================== */

.red-conexiones {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
}

/* Evitar dos círculos exteriores */

.red-conexiones .red-anillo {
    display: none;
}

.red-linea {
    fill: none;
    stroke: #c5dfe8;
    stroke-width: 2;
    opacity: 0.65;
    transition:
        stroke 0.3s ease,
        opacity 0.3s ease,
        stroke-width 0.3s ease;
}

.red-linea.activa {
    stroke: #1baab8;
    stroke-width: 3.5;
    opacity: 1;
}

/* CIRCULITOS FINALES */

.red-punto {
    fill: #a1cbd8;
    opacity: 0.9;
    transition:
        fill 0.3s ease,
        opacity 0.3s ease;
}

.red-punto.activo {
    fill: #17afbc;
    opacity: 1;
}

/* ==========================================
   FOTOGRAFÍA CENTRAL
========================================== */

.red-interactiva .red-centro {
    position: absolute;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;

    width: 36%;
    max-width: 390px;
    height: auto;
    aspect-ratio: 1;

    transform: translate(-50%, -50%);

    border: 5px solid #ffffff;
    outline: 2px solid #79ccd5;
    border-radius: 50%;

    overflow: hidden;
    background: #eaf2f5;

    box-shadow: 0 12px 42px rgba(17, 63, 91, 0.12);
    z-index: 2;
}

.red-centro img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.red-centro-sello {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);

    min-width: 135px;
    padding: 10px 18px 14px;

    border-radius: 14px 14px 0 0;
    background: rgba(20, 62, 89, 0.91);

    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    text-align: center;
}

/* ==========================================
   BOTONES DE LAS DISCIPLINAS
========================================== */

.red-interactiva .red-nodo {
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;

    width: 215px;
    min-width: 0;
    gap: 13px;
    padding: 0;

    background: transparent;
    border: none;

    color: #173b56;
    font: inherit;
    text-align: left;
    cursor: pointer;

    opacity: 0.48;
    filter: saturate(0.65);

    transform: translate(-50%, -50%);
    z-index: 5;

    transition:
        opacity 0.3s ease,
        filter 0.3s ease;
}

.red-nodo:hover,
.red-nodo:focus-visible,
.red-nodo.activo {
    opacity: 1;
    filter: saturate(1);
}

.red-nodo:focus-visible {
    outline: 2px solid #1baab8;
    outline-offset: 8px;
    border-radius: 12px;
}

/* ICONOS */

.red-nodo-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 76px;
    height: 76px;

    border: 2px solid #c9e5ec;
    border-radius: 50%;
    background: #eaf4f7;
    color: #679db2;

    box-shadow: 0 6px 20px rgba(24, 77, 105, 0.05);
}

.red-nodo-icono svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.red-nodo.activo .red-nodo-icono {
    background: linear-gradient(135deg, #20b8c5, #137f9c);
    border-color: #20b8c5;
    color: white;
    box-shadow: 0 8px 25px rgba(25, 157, 177, 0.22);
}

/* TEXTOS */

.red-nodo-texto {
    position: relative;
    display: flex;
    flex-direction: column;

    min-width: 0;
    gap: 3px;
    z-index: 6;
}

.red-nodo-texto small {
    color: #1a9dad;
    font-size: 13px;
    font-weight: 800;
}

.red-nodo-texto strong {
    color: #173b56;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
}

.red-nodo-texto > span {
    color: #638092;
    font-size: 12px;
    line-height: 1.45;
}

/* ==========================================
   DISTRIBUCIÓN DE LAS 7 DISCIPLINAS
   ORDENADOR
========================================== */

@media (min-width: 701px) {

    /* 01 - ARRIBA IZQUIERDA */
    .red-interactiva .red-ingenieria {
        left: 15%;
        top: 24%;
    }

    /* 02 - ARRIBA DERECHA */
    .red-interactiva .red-academia {
        left: 85%;
        top: 24%;
    }

    /* 03 - CENTRO IZQUIERDA */
    .red-interactiva .red-radiologia {
        left: 10%;
        top: 52%;
    }

    /* 04 - CENTRO DERECHA */
    .red-interactiva .red-enfermeria {
        left: 90%;
        top: 52%;
    }

    /* 05 - ABAJO IZQUIERDA */
    .red-interactiva .red-tsid {
        left: 23%;
        top: 82%;
    }

    /* 06 - ABAJO DERECHA */
    .red-interactiva .red-serviciosclinicos {
        left: 77%;
        top: 82%;
    }

    /* 07 - ARRIBA EN EL CENTRO */
    .red-interactiva .red-prescriptores {
        left: 50%;
        top: 7%;
        width: 225px;
    }
}

/* ==========================================
   PANEL DE INFORMACIÓN
========================================== */

.red-panel {
    display: grid;
    grid-template-columns: 1fr 1.35fr auto;
    align-items: center;
    gap: 32px;

    margin-top: 15px;
    padding: 32px 42px;

    border-radius: 18px;
    background: #edf7fa;
}

.red-panel-titulo {
    padding-left: 20px;
    border-left: 2px solid #16adbb;
}

.red-panel-titulo > span {
    color: #149eaf;
    font-size: 18px;
    font-weight: 800;
}

.red-panel-titulo h3 {
    margin: 5px 0;
    color: #173b56;
    font-size: 29px;
    line-height: 1.2;
}

.red-panel-titulo p {
    margin: 0;
    color: #59798c;
    font-size: 14px;
}

#red-descripcion {
    margin: 0;
    color: #4c6e82;
    font-size: 15px;
    line-height: 1.8;
}

/* FLECHAS E INDICADORES */

.red-controles {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.red-controles button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border: 1px solid #c4dce5;
    border-radius: 50%;
    background: transparent;

    color: #317e9d;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.red-controles button:hover {
    background: #dceef3;
}

.red-indicadores {
    display: flex;
    gap: 7px;
}

.red-indicadores span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c6e0e8;
}

.red-indicadores span.activo {
    background: #16a9b7;
}

/* ==========================================
   FOTO Y PRESENTACIÓN DEL EQUIPO
========================================== */

.red-upam .upam-equipo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 55px;

    width: 100%;
    max-width: 1100px;
    margin: 85px auto 0;
    padding: 0 20px;
}

.red-upam .upam-equipo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 15px;
}

.red-upam .upam-equipo-texto {
    min-width: 0;
}

.red-upam .upam-equipo-texto h3 {
    margin: 15px 0 20px;
    color: #173b56;
    font-size: clamp(27px, 3vw, 39px);
    line-height: 1.3;
}

.red-upam .upam-equipo-texto p {
    margin-bottom: 25px;
    color: #647d8e;
    line-height: 1.9;
}

/* ==========================================
   PANTALLAS INTERMEDIAS
========================================== */

@media (min-width: 701px) and (max-width: 1100px) {

    .red-interactiva {
        height: 560px;
    }

    .red-interactiva::before {
        width: 420px;
        height: 420px;
    }

    .red-interactiva .red-centro {
        width: 34%;
        max-width: 315px;
    }

    .red-interactiva .red-nodo {
        width: 160px;
        gap: 8px;
    }

    .red-nodo-icono {
        width: 55px;
        height: 55px;
    }

    .red-nodo-icono svg {
        width: 26px;
        height: 26px;
    }

    .red-nodo-texto strong {
        font-size: 13px;
    }

    .red-nodo-texto > span {
        font-size: 10px;
    }

    .red-interactiva .red-prescriptores {
        width: 190px;
    }

    .red-panel {
        grid-template-columns: 1fr 1.5fr;
    }

    .red-controles {
        grid-column: 1 / -1;
    }
}

/* ==========================================
   MÓVIL - CÍRCULO COMPACTO
========================================== */

@media (max-width: 700px) {

    .red-upam {
        padding: 55px 0;
    }

    .red-encabezado {
        margin-bottom: 30px;
    }

    .red-encabezado h2 {
        font-size: clamp(26px, 6vw, 32px);
        line-height: 1.25;
    }

    .red-encabezado p {
        font-size: 14px;
        line-height: 1.7;
    }

    .red-interactiva {
        position: relative;
        display: block;
        width: 100%;
        max-width: 390px;
        height: 450px;
        padding: 0;
        margin: 20px auto 35px;
        overflow: visible;
    }

    /* CÍRCULO EXTERIOR EN MÓVIL */

    .red-interactiva::before {
        display: block;
        left: 50%;
        top: 49%;
        width: 70%;
        height: auto;
        aspect-ratio: 1;
        transform: translate(-50%, -50%);
        border: 1.5px solid #d6eaf0;
        border-radius: 50%;
    }

    /* CONEXIONES */

    .red-conexiones {
        display: block;
        width: 100%;
        height: 100%;
        overflow: visible;
    }

    /* FOTO CENTRAL */

    .red-interactiva .red-centro {
        position: absolute;
        left: 50%;
        top: 49%;
        right: auto;
        bottom: auto;

        width: 45%;
        height: auto;
        max-width: none;
        aspect-ratio: 1;
        margin: 0;

        transform: translate(-50%, -50%);
        z-index: 2;
    }

    .red-centro-sello {
        min-width: 75px;
        padding: 5px 10px 8px;
        font-size: 10px;
    }

    /* BOTONES ALREDEDOR DEL CÍRCULO */

    .red-interactiva .red-nodo {
        position: absolute;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        width: 100px;
        min-width: 0;
        min-height: 0;
        height: auto;
        padding: 2px;
        gap: 4px;

        border: none;
        border-radius: 0;
        background: transparent;

        text-align: center;
        transform: translate(-50%, -50%);
        z-index: 5;
    }

    .red-interactiva .red-nodo.activo {
        border: none;
        background: transparent;
    }

    .red-nodo-icono {
        width: 43px;
        height: 43px;
    }

    .red-nodo-icono svg {
        width: 22px;
        height: 22px;
    }

    .red-nodo-texto {
        align-items: center;
        gap: 1px;
        width: 100%;
    }

    .red-nodo-texto small {
        font-size: 10px;
    }

    .red-nodo-texto strong {
        font-size: 11px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .red-nodo-texto > span {
        font-size: 9px;
        line-height: 1.2;
    }

    /* 01 INGENIERÍA */

    .red-interactiva .red-ingenieria {
        left: 18%;
        top: 22%;
        width: 100px;
    }

    /* 02 ACADEMIA */

    .red-interactiva .red-academia {
        left: 82%;
        top: 22%;
        width: 100px;
    }

    /* 03 RADIOLOGÍA */

    .red-interactiva .red-radiologia {
        left: 13%;
        top: 53%;
        width: 95px;
    }

    /* 04 ENFERMERÍA */

    .red-interactiva .red-enfermeria {
        left: 87%;
        top: 53%;
        width: 95px;
    }

    /* 05 TSID */

    .red-interactiva .red-tsid {
        left: 26%;
        top: 83%;
        width: 100px;
    }

    /* 06 SERVICIOS CLÍNICOS */

    .red-interactiva .red-serviciosclinicos {
        left: 74%;
        top: 83%;
        width: 110px;
    }

    /* 07 PRESCRIPTORES */

    .red-interactiva .red-prescriptores {
        left: 50%;
        top: 7%;
        width: 130px;
    }

    /* PANEL INFERIOR */

    .red-panel {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 24px 20px;
    }

    .red-panel-titulo h3 {
        font-size: 23px;
    }

    #red-descripcion {
        font-size: 14px;
    }

    .red-controles {
        justify-content: center;
    }

    /* EQUIPO */

    .red-upam .upam-equipo {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-top: 60px;
        padding: 0 10px;
    }

    .red-upam .upam-equipo-texto h3 {
        font-size: 28px;
    }
}

/* ==========================================
   MÓVILES MUY ESTRECHOS
========================================== */

@media (max-width: 380px) {

    .red-interactiva {
        height: 405px;
    }

    .red-interactiva .red-nodo {
        width: 88px;
    }

    .red-interactiva .red-nodo-icono {
        width: 37px;
        height: 37px;
    }

    .red-nodo-texto strong {
        font-size: 10px;
    }

    .red-nodo-texto > span {
        font-size: 8px;
    }

    .red-interactiva .red-prescriptores {
        width: 115px;
    }
}

/* ==========================================
   ACCESIBILIDAD
========================================== */

@media (prefers-reduced-motion: reduce) {

    .red-nodo,
    .red-linea,
    .red-punto,
    .red-centro img,
    .red-nodo-icono {
        transition: none;
    }
}



/* ==========================================================
   08. TARJETAS GENERALES
   ¿QUÉ HACEMOS? / CASOS CLÍNICOS DESTACADOS
========================================================== */

/* Cuadrícula de tres tarjetas */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Tarjeta individual */

.card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    overflow: hidden;

    background: var(--blanco);
    border-radius: var(--radio);
    box-shadow: var(--sombra);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* Animación al pasar el ratón */

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(35, 62, 84, 0.15);
}

/* Imagen superior */

.card img {
    display: block;

    width: 100%;
    height: 210px;

    object-fit: cover;

    background: #dce9ef;
}

/* Tarjeta con imagen no disponible */

.card img.sin-foto {
    background: linear-gradient(
        135deg,
        var(--azul),
        #2b8cad
    );
    color: transparent;
    font-size: 0;
}

/* Contenido inferior */

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;

    padding: 24px;
}

/* Título */

.card-body h3 {
    font-size: 19px;
    color: var(--texto);
    margin: 0 0 12px;
}

/* Descripción */

.card-body p {
    color: var(--gris);

    font-size: 14px;
    line-height: 1.75;

    margin: 0 0 8px;
}

/* Enlaces: Descubrir más, Ver caso... */

.card-body > a {
    display: inline-block;

    margin-top: auto;
    padding-top: 16px;

    color: var(--azul-claro);
    font-size: 13px;
    font-weight: 800;

    transition: color 0.2s ease;
}

.card-body > a:hover {
    color: var(--azul);
}


/* ==========================================================
   09. CASOS CLÍNICOS DESTACADOS EN INICIO
========================================================== */

/* Categoría sobre el título del caso */

.caso-categoria {
    color: var(--azul-claro);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.5px;
    text-transform: uppercase;

    margin-bottom: 10px;
}

/* Botón para ver todos los casos clínicos */

.casos-ver-todos {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-top: 42px;
}


/* ==========================================================
   10. ¿QUIÉNES SOMOS?
   Imagen a la izquierda y texto a la derecha
========================================================== */

/* Distribución principal */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

    gap: 60px;
    align-items: center;
}

/* Fotografía */

.about-grid > img {
    display: block;

    width: 100%;
    height: 420px;

    object-fit: cover;

    border-radius: var(--radio);
    background: #dce9ef;
}

/* Título */

.about-grid h2 {
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.3;
    letter-spacing: -1px;

    color: var(--texto);
    margin: 14px 0 20px;
}

/* Párrafos */

.about-grid p {
    color: var(--gris);

    font-size: 15px;
    line-height: 1.85;

    margin: 0 0 16px;
}

/* Botones de Quiénes somos */

.botones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 24px;
}


/* ==========================================
   UPAM3D · UNIDAD INTERACTIVA
========================================== */

.upam-unidad {
    background: #f7fafc;
}

.upam-explorador {
    max-width: 1150px;
    margin: 0 auto 65px;
    padding: 35px;
    border: 1px solid #dbe8ef;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 40px rgba(16, 44, 67, 0.06);
}

.upam-centro {
    max-width: 410px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #123550, #176786);
    text-align: center;
    color: white;
}

.upam-centro span {
    color: #8ce6ed;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.upam-centro h3 {
    margin: 10px 0;
    color: white;
    font-size: 42px;
}

.upam-centro p {
    margin: 0;
    color: #d6ebf1;
}

.upam-ayuda {
    margin: 28px 0;
    text-align: center;
    color: #657e90;
}

.upam-areas {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.upam-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px 15px;
    border: 1px solid #d7e5ec;
    border-radius: 14px;
    background: #f8fbfc;
    color: #173b56;
    text-align: left;
    cursor: pointer;
    transition: 0.2s ease;
}

.upam-area:hover {
    border-color: #20abb5;
    transform: translateY(-3px);
}

.upam-area.activa {
    border-color: #16a6b1;
    background: #e2f5f3;
}

.upam-area span {
    color: #1597a9;
    font-weight: 800;
}

.upam-area strong {
    font-size: 17px;
}

.upam-area small {
    color: #668394;
    line-height: 1.5;
}

.upam-detalle {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin-top: 22px;
    padding: 28px;
    border-left: 5px solid #21acb4;
    border-radius: 12px;
    background: #edf7fa;
}

.upam-detalle-icono {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 55px;
    height: 55px;
    border-radius: 12px;
    background: #164363;
    color: white;
    font-weight: 800;
}

.upam-detalle h3 {
    margin: 0 0 10px;
    color: #143c58;
    font-size: 24px;
}

.upam-detalle p {
    margin: 0 0 10px;
    color: #536f81;
    line-height: 1.8;
}

.upam-area-extra {
    font-weight: 700;
    color: #138d9e !important;
}

.upam-equipo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 55px;
}

.upam-equipo img {
    width: 100%;
    border-radius: 15px;
}

.upam-equipo h3 {
    margin: 15px 0;
    font-size: clamp(28px, 3vw, 39px);
    color: #173b56;
}

.upam-equipo p {
    color: #647d8e;
    line-height: 1.9;
    margin-bottom: 25px;
}

@media (max-width: 950px) {
    .upam-areas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .upam-equipo {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 600px) {
    .upam-explorador {
        padding: 18px;
    }

    .upam-areas {
        grid-template-columns: 1fr;
    }

    .upam-detalle {
        padding: 18px;
        gap: 13px;
    }

    .upam-centro h3 {
        font-size: 32px;
    }
}


/* ==========================================
   FOTOGRAFÍA Y PRESENTACIÓN DEL EQUIPO
========================================== */

.red-upam .upam-equipo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 55px;

    width: 100%;
    max-width: 1100px;
    margin: 85px auto 0;
    padding: 0 20px;
}

.red-upam .upam-equipo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

.red-upam .upam-equipo-texto {
    min-width: 0;
}

.red-upam .upam-equipo-texto h3 {
    margin: 15px 0 20px;
    color: #173b56;
    font-size: clamp(27px, 3vw, 39px);
    line-height: 1.3;
}

.red-upam .upam-equipo-texto p {
    margin-bottom: 25px;
    color: #647d8e;
    line-height: 1.9;
}

/* Adaptación a móvil */

@media (max-width: 800px) {

    .red-upam .upam-equipo {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-top: 60px;
        padding: 0 15px;
    }

    .red-upam .upam-equipo-texto h3 {
        font-size: 28px;
    }
}

/* ==========================================================
   11. TARJETAS DE ORGANIZACIÓN
   Estructura, calidad y normativa
========================================================== */

/* Cuadrícula general */

.coord-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;

    gap: 24px;
    align-items: stretch;
}

/* Dos columnas en Organización y calidad */

.org-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* Tarjeta */

.coord-card {
    min-width: 0;

    padding: 28px;

    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio);

    box-shadow: var(--sombra);
}

/* Títulos */

.coord-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 18px;
    margin: 0 0 14px;
}

/* Iconos */

.coord-card h3 .ico {
    color: var(--azul-claro);
}

/* Texto y listas */

.coord-card p,
.coord-card li {
    color: var(--gris);
    font-size: 14px;
    line-height: 1.7;
}

/* Listas */

.coord-card ul {
    margin: 0;
    padding-left: 18px;
}

.coord-card li {
    margin-bottom: 8px;
}

/* Enlace a certificado */

.coord-card a.enlace {
    display: inline-block;

    color: var(--azul-claro);
    font-size: 13px;
    font-weight: 700;

    margin-top: 8px;
}

.coord-card a.enlace:hover {
    color: var(--azul);
    text-decoration: underline;
}


/* ==========================================================
   12. DATOS DESTACADOS DE ORGANIZACIÓN
   2015 · 1.000+ CASOS · ISO 13485...
========================================================== */

/* Cuatro bloques */

.coord-datos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 16px;
    margin-top: 24px;
}

/* Cada dato */

.dato {
    min-width: 0;

    padding: 22px;

    background: var(--azul);
    color: var(--blanco);

    border-radius: var(--radio);
}

/* Número principal */

.dato b {
    display: block;

    font-family: "Manrope", sans-serif;
    font-size: 26px;
    font-weight: 800;

    letter-spacing: -0.5px;
    color: #9ae6ec;
}

/* Texto explicativo */

.dato span {
    display: block;

    margin-top: 4px;

    font-size: 13px;
    line-height: 1.5;
    color: #d5e5ed;
}


/* ==========================================================
   13. ETIQUETAS DE NORMATIVA
   ISO 13485 · MDR · RD 192/2023
========================================================== */

/* Contenedor */

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin: 12px 0 0;
    padding: 0;

    list-style: none;
}

/* Etiquetas */

.badges li {
    margin: 0;

    padding: 5px 12px;

    background: var(--turquesa-suave);
    color: var(--azul);

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
}


/* ==========================================================
   14. CÓMO TRABAJAMOS
   PROCESO INTERACTIVO DE UPAM3D

   Esta sección incluye:

   01. Necesidad clínica
   02. Análisis del caso
   03. Desarrollo de la solución
   04. Evaluación y mejora

   Los juegos interactivos aparecen en la etapa 02.

   Estilos compartidos por:
   - index.html (español)
   - en/index.html (inglés)
========================================================== */


/* ==========================================================
   14.1. CUATRO ETAPAS DEL PROCESO
========================================================== */

/* Contenedor de las etapas */

.process {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 14px;
    margin-bottom: 22px;
}


/* Cada botón de etapa */

.step {
    display: block;

    width: 100%;
    min-width: 0;
    min-height: 90px;

    padding: 20px;

    background: var(--blanco);
    color: var(--texto);

    border: 1px solid var(--borde);
    border-radius: 8px;

    text-align: left;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}


/* Número de etapa */

.step strong {
    display: block;

    margin-bottom: 8px;

    color: var(--azul-claro);

    font-family: "Manrope", sans-serif;
    font-size: 22px;
    font-weight: 800;
}


/* Efecto al pasar el ratón */

.step:hover {
    border-color: var(--turquesa);
    transform: translateY(-2px);
}


/* Etapa seleccionada */

.step.active {
    background: var(--azul);
    color: var(--blanco);
    border-color: var(--azul);
}


/* Número de la etapa seleccionada */

.step.active strong {
    color: #9ae6ec;
}


/* ==========================================================
   14.2. CONTENIDO DE LA ETAPA SELECCIONADA
========================================================== */

/* Tarjeta blanca bajo las cuatro etapas */

.process-detail {
    padding: 28px;

    background: var(--blanco);

    border-left: 5px solid var(--turquesa);
    border-radius: 8px;

    box-shadow: var(--sombra);
}


/* Título de la explicación */

.process-detail h3 {
    margin: 0 0 12px;

    color: var(--azul);
    font-size: 22px;
}


/* Texto explicativo */

.process-detail p {
    color: var(--gris);

    font-size: 15px;
    line-height: 1.8;

    margin: 0;
}


/* ==========================================================
   14.3. IMÁGENES DE LAS ETAPAS
========================================================== */

/*
   Distribución:
   Texto a la izquierda
   Imagen a la derecha
*/

.step-contenido-visual {
    display: grid;

    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(250px, 0.7fr);

    gap: 35px;
    align-items: center;
}


/* Cuando la etapa no tiene imagen */

.step-contenido-visual.sin-imagen {
    grid-template-columns: 1fr;
}


/* Columna del texto */

.step-contenido-texto {
    min-width: 0;
}


/* Título dentro de la columna */

.step-contenido-texto h3 {
    margin-top: 0;
}


/* Imagen de cada fase */

.step-imagen {
    display: block;

    width: 100%;
    height: 210px;

    object-fit: cover;

    border-radius: 14px;
    border: 1px solid #e1eaf0;

    background: #edf4f7;
}


/* Imagen oculta */

.step-imagen[hidden] {
    display: none !important;
}


/* ==========================================================
   15. SOLUCIONES DE INGENIERÍA
   TARJETAS DE ACCESO A LOS SEIS JUEGOS
========================================================== */


/* Contenedor de las soluciones */

.soluciones-posibles {
    margin-top: 30px;
    padding-top: 25px;

    border-top: 1px solid #dce7ed;
}


/* Título de la sección */

.soluciones-posibles h4 {
    color: var(--azul);

    font-size: 19px;
    font-weight: 800;

    margin: 0 0 10px;
}


/* Texto introductorio */

.soluciones-posibles .soluciones-intro {
    color: var(--gris);

    font-size: 15px;
    line-height: 1.7;

    margin: 0 0 22px;
}


/* ==========================================================
   15.1. CUADRÍCULA DE LAS SEIS TECNOLOGÍAS
========================================================== */

/*
   Las seis tarjetas son:

   1. Impresión 3D médica
   2. Realidad aumentada
   3. Electrónica aplicada a la salud
   4. Planificación quirúrgica digital
   5. Prótesis personalizadas
   6. Hidrogeles
*/


.soluciones-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 14px;
}


/* Diseño general de cada tarjeta */

.solucion-item {
    display: flex;
    flex-direction: column;

    gap: 9px;

    width: 100%;
    min-width: 0;

    padding: 20px;

    background: #f5f9fb;

    border: 1px solid #dce7ed;
    border-radius: 10px;

    color: var(--texto);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* Efecto al pasar el ratón */

.solucion-item:hover {
    border-color: var(--turquesa);
    background: #edf7f8;

    transform: translateY(-2px);

    box-shadow: 0 8px 18px rgba(22, 62, 96, 0.07);
}


/* Nombre de la tecnología */

.solucion-item strong {
    color: var(--azul);

    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
}


/* Descripción */

.solucion-item span {
    color: var(--gris);

    font-size: 13px;
    line-height: 1.7;
}


/* ==========================================================
   15.2. TARJETAS CLICABLES
========================================================== */

/* Cuando la tarjeta es un botón */

.solucion-boton {
    appearance: none;

    font: inherit;
    text-align: left;

    cursor: pointer;
}


/* Texto «PROBAR DEMO» */

.solucion-boton em {
    display: block;

    margin-top: auto;
    padding-top: 8px;

    color: var(--azul-claro);

    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}


/* Enlace al pasar el ratón */

.solucion-boton:hover em {
    color: var(--azul);
}


/* Accesibilidad */

.solucion-boton:focus-visible {
    outline: 3px solid var(--turquesa);
    outline-offset: 3px;
}


/* ==========================================================
   15.3. BOTÓN PARA REGRESAR A LAS TECNOLOGÍAS
========================================================== */

/*
   Los seis juegos comparten este botón:

   ← Volver a las tecnologías
   ← Back to technologies
*/

.demo-ra-volver {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding: 8px 0;

    background: transparent;

    border: none;

    color: var(--azul-claro);

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition: color 0.2s ease;
}


/* Hover */

.demo-ra-volver:hover {
    color: var(--azul);
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* Contenedor superior del botón */

.demo-ra-top {
    margin-bottom: 14px;
}


/* ==========================================================
   15.4. ESTILOS COMPARTIDOS POR LOS JUEGOS
========================================================== */

/* Etiqueta INTERACTIVO / INTERACTIVE DEMO */

.demo-ra-tag {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--azul-claro);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.6px;
    text-transform: uppercase;
}


/* Encabezado de demostración */

.demo-ra-info {
    margin-bottom: 20px;
}


/* Título */

.demo-ra-info h4 {
    color: var(--azul);

    font-size: 28px;
    font-weight: 800;

    margin: 0 0 12px;
}


/* Descripción */

.demo-ra-info p {
    color: var(--gris);

    font-size: 15px;
    line-height: 1.7;

    margin: 0 0 10px;
}


/* Avisos de simulación educativa */

.demo-ra-nota {
    color: #7a8c98 !important;

    font-size: 12px;
    line-height: 1.6;

    margin-top: 12px !important;
}


/* ==========================================================
   15.5. ESTILOS GENERALES DE LOS PANELES INTERACTIVOS
========================================================== */

/*
   Cada demostración conserva sus clases originales
   para que JavaScript pueda seguir identificándola.

   En las próximas partes se definirá
   su diseño individual.
*/


/* Margen superior de cada juego */

.demo-ra-wrap,
.imp-demo,
.demo-electronica-wrap,
.plan-demo,
.prot-demo,
.hidro-demo {
    margin-top: 24px;
}


/* Marcos generales de los juegos */

.demo-ra-box,
.imp-panel,
.demo-electronica-box,
.plan-panel,
.prot-panel,
.hidro-panel {
    background: var(--blanco);

    border: 1px solid #dce7ed;
    border-radius: 18px;

    padding: 28px;

    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.06);
}


/* Botón de regreso cuando está directamente
   dentro del contenedor del juego */

.imp-demo > .demo-ra-volver,
.plan-demo > .demo-ra-volver,
.prot-demo > .demo-ra-volver,
.hidro-demo > .demo-ra-volver {
    margin-bottom: 18px;
}


/* ==========================================================
   15.6. ELEMENTOS OCULTOS DE LOS JUEGOS
========================================================== */

/*
   JavaScript controla qué juego aparece.

   El atributo hidden impide que se muestren
   las demos que todavía no están seleccionadas.
*/

.soluciones-posibles[hidden],
.demo-ra-wrap[hidden],
.imp-demo[hidden],
.demo-electronica-wrap[hidden],
.plan-demo[hidden],
.prot-demo[hidden],
.hidro-demo[hidden] {
    display: none !important;
}


/* Elementos ocultos dentro de los juegos */

.demo-ra-wrap [hidden],
.imp-demo [hidden],
.demo-electronica-wrap [hidden],
.plan-demo [hidden],
.prot-demo [hidden],
.hidro-demo [hidden] {
    display: none !important;
}


/* ==========================================================
   15.7. ANIMACIÓN DE ÉXITO COMPARTIDA
========================================================== */

@keyframes aparecerExito {

    from {
        opacity: 0.5;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* ==========================================================
   16. JUEGO INTERACTIVO DE REALIDAD AUMENTADA

   El usuario debe arrastrar un hígado digital
   hasta la zona indicada sobre el paciente.

   Compartido por español e inglés.
========================================================== */


/* ==========================================================
   16.1. CONTENEDOR DEL JUEGO
========================================================== */

.demo-ra-wrap {
    margin-top: 24px;
}

/* Panel principal */

.demo-ra-box {
    background: var(--blanco);
    border: 1px solid #dce7ed;
    border-radius: 18px;

    padding: 22px;

    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.06);
}


/* ==========================================================
   16.2. INSTRUCCIONES Y ESTADO
========================================================== */

/* Instrucción principal */

.demo-ra-instruccion {
    color: var(--azul) !important;
    font-weight: 700;
}

/* Cuadro de información */

.demo-ra-status {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    margin-top: 18px;
    padding: 14px 16px;

    background: #f2f8fa;

    border: 1px solid #d9e6ec;
    border-radius: 12px;

    color: var(--azul);
    line-height: 1.6;
}

/* Icono del mensaje */

.demo-ra-status span:first-child {
    font-size: 18px;
    line-height: 1;
}


/* ==========================================================
   16.3. ESCENA DEL PACIENTE
========================================================== */

/* Marco que contiene el SVG */

.demo-ra-scene {
    background: #eef6f9;

    border: 1px solid #d6e4ea;
    border-radius: 16px;

    overflow: hidden;
}

/* Escena SVG */

.demo-ra-scene svg {
    display: block;

    width: 100%;
    height: auto;

    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Hígado que puede arrastrarse */

#ra-higado {
    cursor: grab;
}

/* Mientras se arrastra */

#ra-higado:active {
    cursor: grabbing;
}


/* ==========================================================
   16.4. ETIQUETAS DEL SVG
========================================================== */

/* Etiquetas principales */

.ra-svg-label {
    fill: #a6d6e6;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.8px;
}

/* Etiquetas pequeñas */

.ra-svg-small {
    fill: #c9e2ec;
    font-size: 9px;
}

/* Etiquetas intermedias */

.ra-svg-mid {
    fill: #8ceaf3;

    font-size: 10px;
    font-weight: 700;
}


/* ==========================================================
   16.5. BOTÓN PARA REINICIAR
========================================================== */

.demo-ra-actions {
    display: flex;
    justify-content: flex-end;

    margin-top: 18px;
}

/* Botón */

.demo-ra-reset {
    padding: 10px 16px;

    background: var(--azul);
    color: var(--blanco);

    border: none;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition: background 0.2s ease;
}

/* Hover */

.demo-ra-reset:hover {
    background: var(--azul-claro);
}


/* ==========================================================
   16.6. MENSAJE DE ÉXITO
========================================================== */

/* Cuando el hígado está colocado */

.demo-ra-status.ra-exito {
    background: #dcfce7;
    border: 2px solid #4ade80;

    color: #166534;

    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.12);

    animation: aparecerExito 0.4s ease;
}

/* Texto de éxito */

.demo-ra-status.ra-exito span {
    color: #166534;
    font-weight: 700;
}


/* ==========================================================
   17. JUEGO INTERACTIVO DE IMPRESIÓN 3D

   ETAPAS DEL JUEGO:

   01. Explorar imágenes de TAC
   02. Crear un biomodelo digital
   03. Simular una impresión 3D
========================================================== */


/* ==========================================================
   17.1. CONTENEDOR PRINCIPAL
========================================================== */

.imp-demo {
    margin-top: 24px;
}

/* Panel */

.imp-panel {
    background: var(--blanco);

    border: 1px solid #dce7ed;
    border-radius: 18px;

    padding: 28px;

    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.06);
}


/* ==========================================================
   17.2. ENCABEZADO
========================================================== */

.imp-encabezado h4 {
    color: var(--azul);

    font-size: 27px;
    font-weight: 800;

    margin: 0 0 12px;
}

.imp-encabezado p,
.imp-pantalla > p {
    color: var(--gris);

    font-size: 15px;
    line-height: 1.7;
}


/* ==========================================================
   17.3. INDICADOR DE LAS TRES ETAPAS
========================================================== */

.imp-etapas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 8px;
    margin: 25px 0;
}

/* Etapa */

.imp-etapa {
    padding: 12px 8px;

    background: #edf3f6;
    color: #687e8c;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

/* Etapa activa */

.imp-etapa.activa {
    background: var(--azul);
    color: var(--blanco);
}

/* Etapa completada */

.imp-etapa.completada {
    background: #dff5ee;
    color: #247958;
}


/* ==========================================================
   17.4. PANTALLAS E INSTRUCCIONES
========================================================== */

/* Títulos de cada fase */

.imp-pantalla h5 {
    color: var(--azul);

    font-size: 21px;

    margin: 10px 0;
}

/* Texto */

.imp-pantalla > p {
    margin-bottom: 18px;
}


/* ==========================================================
   17.5. VISOR DE TOMOGRAFÍA (TAC)
========================================================== */

/* Marco oscuro */

.imp-visor {
    max-width: 550px;

    margin: 20px auto;

    background: #111d2b;

    border: 1px solid #425b6d;
    border-radius: 14px;

    overflow: hidden;
}

/* Cabecera y pie del visor */

.imp-visor-cabecera,
.imp-visor-pie {
    display: flex;
    justify-content: space-between;
    align-items: center;

    flex-wrap: wrap;
    gap: 10px;

    padding: 13px 16px;

    color: #9cd8e5;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
}

/* Canvas donde aparece el TAC */

#imp-tac-canvas {
    display: block;

    width: 100%;
    height: auto;

    background: #090f17;
}


/* ==========================================================
   17.6. CONTROL PARA CAMBIAR EL CORTE DEL TAC
========================================================== */

/* Etiqueta */

.imp-deslizador-label {
    display: block;

    margin: 18px 0 10px;

    color: var(--azul);
    font-weight: 700;
}

/* Deslizador */

#imp-corte {
    display: block;

    width: 100%;

    accent-color: #168b9d;
    cursor: pointer;
}

/* Botón para avanzar */

.imp-avanzar {
    margin-top: 24px;
}


/* ==========================================================
   17.7. RECONSTRUCCIÓN DIGITAL DEL BIOMODELO
========================================================== */

/* Escena */

.imp-modelo-escena {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 280px;

    margin-top: 22px;

    background:
        radial-gradient(
            circle at center,
            #254d69,
            #10283f 75%
        );

    color: #bdebf3;

    border-radius: 14px;
    overflow: hidden;
}

/* Etiqueta superior */

.imp-modelo-etiqueta {
    padding-top: 16px;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

/* SVG del biomodelo */

#imp-modelo-svg {
    width: 100%;
    max-width: 340px;
    height: 250px;

    filter: drop-shadow(
        0 0 15px rgba(56, 220, 233, 0.4)
    );
}

/* Figura anatómica */

#imp-modelo-figura {
    transform-origin: center;
    animation: imp-modelo-flotar 3s ease-in-out infinite;
}

/* Movimiento suave del modelo */

@keyframes imp-modelo-flotar {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }

}

/* Nombre del modelo */

#imp-modelo-nombre {
    padding-bottom: 18px;

    font-size: 12px;
    font-weight: 700;
}


/* ==========================================================
   17.8. MENSAJE DE MODELO CREADO
========================================================== */

.imp-completado {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-top: 18px;
    padding: 15px;

    background: #e9f8f4;
    color: #236e55;

    border-radius: 10px;
}

/* Icono */

.imp-completado span {
    font-size: 24px;
    font-weight: 800;
}

/* Texto */

.imp-completado p {
    margin: 0;
    font-size: 14px;
}


/* ==========================================================
   17.9. SIMULACIÓN DE IMPRESORA 3D
========================================================== */

/* Fondo del simulador */

.imp-impresora {
    max-width: 570px;

    margin: 20px auto;
    padding: 15px;

    background: #10283f;
    border-radius: 15px;
}

/* Imagen SVG de la impresora */

.imp-impresora svg {
    display: block;
    width: 100%;
    height: auto;
}


/* ==========================================================
   17.10. BARRA DE PROGRESO DE LA IMPRESIÓN
========================================================== */

/* Texto superior */

.imp-progreso-texto {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 10px;
    margin: 12px 5px;

    color: #d2edf2;
    font-size: 13px;
}

/* Fondo de la barra */

.imp-barra {
    height: 9px;

    background: #34556a;

    border-radius: 30px;
    overflow: hidden;
}

/* Barra animada por JavaScript */

#imp-barra-interior {
    width: 0%;
    height: 100%;

    background: #4bdfd7;

    transition: width 0.12s linear;
}


/* ==========================================================
   17.11. BOTONES DE CONTROL
========================================================== */

/* Distribución */

.imp-controles {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;
    margin-top: 18px;
}

/* Botón de reinicio */

.imp-reiniciar {
    padding: 11px 16px;

    background: #e9f1f5;
    color: var(--azul);

    border: none;
    border-radius: 9px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition: background 0.2s ease;
}

/* Hover */

.imp-reiniciar:hover {
    background: #d8e9f0;
}


/* ==========================================================
   17.12. MENSAJE FINAL DE ÉXITO
========================================================== */

.imp-exito {
    margin-top: 24px;
    padding: 20px;

    background: #dcfce7;
    border: 2px solid #4ade80;
    border-radius: 12px;

    color: #166534;

    animation: aparecerExito 0.4s ease;
}

/* Título */

.imp-exito strong {
    display: block;

    margin-bottom: 9px;

    font-size: 17px;
}

/* Descripción */

.imp-exito p {
    margin: 0;
    line-height: 1.7;
}


/* ==========================================================
   17.13. AVISO INFORMATIVO
========================================================== */

.imp-nota {
    margin-top: 25px;

    color: #82929d;

    font-size: 12px;
    line-height: 1.6;
}


/* ==========================================================
   18. JUEGO INTERACTIVO DEL PULSIOXÍMETRO

   FUNCIONAMIENTO:
   1. Arrastrar el dedo.
   2. Colocarlo en el pulsioxímetro.
   3. Visualizar una medición simulada.

   Compatible con las versiones ES y EN.
========================================================== */


/* ==========================================================
   18.1. CONTENEDOR GENERAL
========================================================== */

.demo-electronica-wrap {
    margin-top: 28px;
}

.demo-electronica-box {
    background: var(--blanco);

    border: 1px solid #d9e4ea;
    border-radius: 24px;

    padding: 30px;

    box-shadow: 0 10px 30px rgba(11, 46, 74, 0.06);
}

.demo-electronica-wrap .oxi-demo {
    margin-top: 24px;
}


/* ==========================================================
   18.2. INSTRUCCIONES DEL JUEGO
========================================================== */

.demo-electronica-wrap .oxi-instruccion {
    margin: 0 0 18px;

    color: var(--azul);

    font-size: 24px;
    font-weight: 800;
}

.demo-electronica-wrap .oxi-demo > p {
    color: var(--gris);
    line-height: 1.7;
}


/* Mensaje de estado */

.demo-electronica-wrap .oxi-mensaje {
    margin-bottom: 22px;
    padding: 16px 18px;

    background: #eef4f7;
    border: 1px solid #d5e2e8;
    border-radius: 16px;

    color: #355265;
    line-height: 1.6;

    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}


/* Cuando se coloca el dedo correctamente */

.demo-electronica-wrap .oxi-mensaje.ok {
    background: #e4f6ea;
    border-color: #a8dcb8;

    color: #1f5e35;
    font-weight: 700;

    animation: aparecerExito 0.4s ease;
}


/* ==========================================================
   18.3. ESCENA INTERACTIVA
========================================================== */

/* Fondo azul del juego */

.demo-electronica-wrap .oxi-escena {
    position: relative;

    width: 100%;
    height: 390px;
    min-height: 390px;

    overflow: hidden;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            #173c5c 0%,
            #1f5f84 100%
        );

    touch-action: pan-y;
}


/* ==========================================================
   18.4. DEDO ARRASTRABLE
========================================================== */

.demo-electronica-wrap .oxi-dedo {
    position: absolute;

    left: 60px;
    top: 190px;

    width: 160px;
    height: 62px;

    background:
        linear-gradient(
            180deg,
            #f1c4a9 0%,
            #d9a88d 100%
        );

    border: 2px solid #f9ddcc;
    border-radius: 35px;

    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);

    cursor: grab;

    touch-action: none;

    user-select: none;
    -webkit-user-select: none;

    z-index: 10;
    transform: none;
}


/* Durante el arrastre */

.demo-electronica-wrap .oxi-dedo:active {
    cursor: grabbing;
}


/* Uña */

.demo-electronica-wrap .oxi-dedo-uña {
    position: absolute;

    right: 18px;
    top: 9px;

    width: 42px;
    height: 22px;

    background: #f7dfd7;
    border-radius: 16px;

    opacity: 0.95;
    pointer-events: none;
}


/* Dedo colocado */

.demo-electronica-wrap .oxi-dedo.colocado {
    box-shadow:
        0 0 0 4px rgba(104, 215, 152, 0.3),
        0 10px 24px rgba(0, 0, 0, 0.18);

    cursor: default;
}


/* ==========================================================
   18.5. PULSIOXÍMETRO
========================================================== */

/* Posición del dispositivo */

.demo-electronica-wrap .oxi-pinza {
    position: absolute;

    left: 50%;
    top: 52%;

    transform: translate(-50%, -50%);

    width: 390px;
    height: 220px;

    z-index: 2;
}


/* Cuerpo del dispositivo */

.demo-electronica-wrap .oxi-pinza-cuerpo {
    position: relative;

    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            180deg,
            #f8fbfd 0%,
            #e5edf2 55%,
            #cdd9e2 100%
        );

    border-radius: 42px;
    border: 2px solid rgba(255, 255, 255, 0.75);

    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.25),
        inset 0 3px 5px rgba(255, 255, 255, 0.8),
        inset 0 -5px 12px rgba(0, 0, 0, 0.08);
}


/* Separación visual entre las partes */

.demo-electronica-wrap .oxi-pinza-cuerpo::after {
    content: "";

    position: absolute;

    left: 18px;
    right: 18px;
    bottom: 25px;

    height: 3px;

    border-radius: 3px;
    background: rgba(95, 120, 140, 0.25);

    pointer-events: none;
}


/* ==========================================================
   18.6. PANTALLA DEL PULSIOXÍMETRO
========================================================== */

.demo-electronica-wrap .oxi-pantalla {
    position: absolute;

    top: 20px;
    left: 20px;

    width: 113px;
    padding: 13px;

    background: #10324f;
    color: var(--blanco);

    border-radius: 15px;

    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Números de saturación y pulso */

.demo-electronica-wrap .oxi-valor span {
    display: block;

    color: #85f2db;

    font-size: 25px;
    font-weight: 800;
    line-height: 1.1;

    font-variant-numeric: tabular-nums;
}


/* Etiquetas SpO2 y PULSE */

.demo-electronica-wrap .oxi-valor small {
    color: #e1f0f4;

    font-size: 11px;
    letter-spacing: 0.4px;
}


/* ==========================================================
   18.7. ZONA PARA COLOCAR EL DEDO
========================================================== */

.demo-electronica-wrap .oxi-drop {
    position: absolute;

    right: 12px;
    top: 36px;

    width: 130px;
    height: 96px;

    border: 2px dashed #87c9d9;
    border-radius: 24px;

    background: rgba(135, 201, 217, 0.12);

    transition:
        background 0.2s ease,
        border-color 0.2s ease;

    pointer-events: none;
}


/* Texto interior en español */

.demo-electronica-wrap .oxi-drop::after {
    content: "Coloca aquí el dedo";

    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 8px;

    color: #3e7a90;

    font-size: 13px;
    font-weight: 700;
    text-align: center;
}


/* Texto interior en inglés */

html[lang="en"] .demo-electronica-wrap .oxi-drop::after {
    content: "Place your finger here";
}


/* Zona activa */

.demo-electronica-wrap .oxi-drop.activo {
    background: rgba(104, 215, 152, 0.22);
    border-color: #45d18b;
}

.demo-electronica-wrap .oxi-drop.activo::after {
    color: #236849;
}


/* ==========================================================
   18.8. EXPLICACIÓN Y REINICIO
========================================================== */

.demo-electronica-wrap .oxi-leyenda {
    margin-top: 16px;

    color: var(--gris);

    font-size: 13px;
    line-height: 1.7;
}

.demo-electronica-wrap #oxi-reiniciar {
    margin-top: 18px;
}


/* ==========================================================
   19. JUEGO DE PLANIFICACIÓN QUIRÚRGICA DIGITAL

   FUNCIONAMIENTO:
   1. Identificar una lesión en el TAC.
   2. Examinar las trayectorias disponibles.
   3. Elegir una ruta en el ejercicio educativo.
========================================================== */


/* ==========================================================
   19.1. CONTENEDOR GENERAL
========================================================== */

.plan-demo {
    margin-top: 28px;
}

.plan-panel {
    padding: 28px;

    background: var(--blanco);

    border: 1px solid #dce7ed;
    border-radius: 18px;

    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.06);
}


/* ==========================================================
   19.2. ETAPAS DEL JUEGO
========================================================== */

.plan-etapas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 10px;
    margin: 24px 0;
}


/* Cada etapa */

.plan-etapa {
    padding: 13px;

    background: #edf3f6;
    color: #6a7f8d;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 800;
    text-align: center;
}


/* Activa */

.plan-etapa.activa {
    background: var(--azul);
    color: var(--blanco);
}


/* Completada */

.plan-etapa.completada {
    background: #ddf6e8;
    color: #23704b;
}


/* ==========================================================
   19.3. INSTRUCCIONES
========================================================== */

.plan-instruccion {
    margin-bottom: 22px;
    padding: 17px 20px;

    background: #edf8fa;

    border-left: 4px solid var(--turquesa);
    border-radius: 0 10px 10px 0;
}


/* Título */

.plan-instruccion strong {
    display: block;

    color: var(--azul);
    font-size: 18px;
}


/* Texto */

.plan-instruccion p {
    margin: 7px 0 0;

    color: #527382;
    line-height: 1.7;
}


/* ==========================================================
   19.4. VISOR DEL TAC
========================================================== */

/* Contenedor oscuro */

.plan-visor {
    max-width: 400px;

    margin: 0 auto;
    padding: 10px;

    background: #091923;

    border-radius: 16px;

    box-shadow: 0 12px 28px rgba(8, 32, 49, 0.12);
}


/* Cabecera y pie */

.plan-visor-cabecera,
.plan-visor-pie {
    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;
    gap: 10px;

    padding: 12px 14px;

    color: #b1ceda;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
}


/* ==========================================================
   19.5. IMAGEN RADIOLÓGICA
========================================================== */

/* Marco del TAC */

.plan-imagen {
    position: relative;
    isolation: isolate;

    width: 100%;

    overflow: hidden;

    background: #000;
    border: 1px solid #314e5f;
    border-radius: 8px;
}


/* Imagen del TAC */

#plan-tac {
    display: block;

    position: relative;
    z-index: 1;

    width: 100%;
    height: auto;

    user-select: none;
    -webkit-user-select: none;
}


/* Cursor para seleccionar la lesión */

.plan-imagen.seleccionando {
    cursor: crosshair;
}


/* ==========================================================
   19.6. ZONA DE LA LESIÓN
========================================================== */

/* Resaltado inicial */

.plan-imagen.seleccionando::after {
    content: "";

    position: absolute;

    left: 21%;
    top: 35%;

    width: 19%;
    height: 25%;

    border: 3px dashed rgba(255, 190, 95, 0.95);
    border-radius: 50%;

    background: rgba(205, 65, 60, 0.16);

    box-shadow: 0 0 24px rgba(255, 162, 90, 0.35);

    pointer-events: none;

    z-index: 3;

    animation: plan-pulso 2s ease-in-out infinite;
}


/* Animación de la zona marcada */

@keyframes plan-pulso {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 162, 90, 0.25);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 162, 90, 0.65);
    }

}


/* Contorno cuando la lesión ha sido identificada */

.plan-tumor-contorno {
    position: absolute;

    left: 20%;
    top: 34%;

    width: 20%;
    height: 26%;

    border: 3px solid #64ebad;
    border-radius: 50%;

    box-shadow:
        0 0 0 999px rgba(5, 25, 36, 0.08),
        0 0 22px rgba(80, 250, 169, 0.38);

    pointer-events: none;

    z-index: 4;

    animation: plan-resaltar 0.5s ease;
}


/* Etiqueta de lesión identificada */

.plan-tumor-contorno span {
    position: absolute;

    bottom: calc(100% + 9px);
    left: 50%;

    transform: translateX(-50%);

    padding: 6px 10px;

    background: #086b4f;
    color: var(--blanco);

    border-radius: 6px;

    font-size: 10px;
    font-weight: 800;

    white-space: nowrap;
}


/* Animación */

@keyframes plan-resaltar {

    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }

}


/* ==========================================================
   19.7. FLECHAS Y RUTAS QUIRÚRGICAS
========================================================== */

/* SVG sobre el TAC */

#plan-rutas-svg {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 20;

    pointer-events: none;
    overflow: visible;
}


/* Visible cuando JavaScript lo activa */

#plan-rutas-svg:not([hidden]) {
    display: block;
    visibility: visible;
    opacity: 1;
}


/* Oculto cuando no corresponde */

#plan-rutas-svg[hidden] {
    display: none !important;
}


/* Flechas, círculos y etiquetas */

#plan-rutas-svg path,
#plan-rutas-svg ellipse,
#plan-rutas-svg rect,
#plan-rutas-svg text {
    visibility: visible;
    opacity: 1;
}


/* Texto del SVG */

.plan-svg-texto {
    fill: #7ae4fa;

    font-size: 14px;
    font-weight: 800;

    paint-order: stroke;

    stroke: #091923;
    stroke-width: 4px;
}


/* ==========================================================
   19.8. MENSAJES DEL JUEGO
========================================================== */

.plan-mensaje {
    max-width: 930px;

    margin: 18px auto 0;
    padding: 16px 18px;

    background: #edf4f8;

    border: 1px solid #d7e5ee;
    border-radius: 11px;

    color: #32586e;

    font-size: 14px;
    line-height: 1.7;
}


/* Error */

.plan-mensaje.error {
    background: #fff1ef;
    border-color: #edc3bd;
    color: #a14336;
}


/* Correcto */

.plan-mensaje.correcto {
    background: #e1f6e9;
    border-color: #a5dfbb;

    color: #17643e;
    font-weight: 700;
}


/* ==========================================================
   19.9. BOTÓN PARA AVANZAR
========================================================== */

.plan-controles {
    display: flex;
    justify-content: center;

    margin: 22px auto 0;
}


/* ==========================================================
   19.10. SELECCIÓN DE TRAYECTORIAS
========================================================== */

.plan-eleccion {
    margin-top: 26px;
    padding: 24px;

    background: #f3f8fb;

    border: 1px solid #dce8ee;
    border-radius: 14px;
}


/* Título */

.plan-eleccion h5 {
    margin: 0 0 10px;

    color: var(--azul);
    font-size: 21px;
}


/* Descripción */

.plan-eleccion p {
    margin: 0 0 18px;

    color: #607988;
}


/* Tres opciones */

.plan-opciones {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 12px;
}


/* Botones de trayectoria */

.plan-opcion {
    padding: 14px 10px;

    background: var(--blanco);
    color: var(--azul);

    border: 2px solid #cee0e9;
    border-radius: 10px;

    font-weight: 800;
}


/* Hover */

.plan-opcion:hover {
    border-color: var(--turquesa);
    background: #eaf8f9;
}


/* Opción seleccionada */

.plan-opcion.seleccionada {
    background: #ddf6e8;
    border-color: #46bd83;
    color: #17643e;
}


/* ==========================================================
   19.11. RESULTADO FINAL
========================================================== */

.plan-exito {
    margin-top: 22px;
    padding: 20px;

    background: #def6e8;

    border: 2px solid #7ddca6;
    border-radius: 12px;

    color: #17623c;

    animation: aparecerExito 0.4s ease;
}


/* Título */

.plan-exito strong {
    display: block;

    margin-bottom: 8px;

    font-size: 17px;
}


/* Texto */

.plan-exito p {
    margin: 0;

    color: #246c47;
    line-height: 1.7;
}


/* ==========================================================
   19.12. REINICIO Y AVISO
========================================================== */

.plan-acciones {
    display: flex;
    justify-content: flex-end;

    margin-top: 24px;
}


/* Aviso educativo */

.plan-nota {
    margin-top: 20px;

    color: #788c99;

    font-size: 12px;
    line-height: 1.6;
}


/* ==========================================================
   20. JUEGO DE PRÓTESIS PERSONALIZADAS

   FUNCIONAMIENTO:
   1. Observar el modelo anatómico.
   2. Ajustar el ancho y la longitud.
   3. Comprobar las dimensiones.

   Compatible con español e inglés.
========================================================== */


/* ==========================================================
   20.1. CONTENEDOR PRINCIPAL
========================================================== */

.prot-demo {
    margin-top: 28px;
}

.prot-panel {
    padding: 28px;
    background: var(--blanco);
    border: 1px solid #dce7ed;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.06);
}


/* ==========================================================
   20.2. INDICADOR DE ETAPAS
========================================================== */

.prot-progreso {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 24px 0;
}

.prot-paso {
    padding: 12px 9px;
    background: #edf3f6;
    color: #718592;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.prot-paso.activo {
    background: var(--azul);
    color: var(--blanco);
}

.prot-paso.completado {
    background: #dcf6e8;
    color: #1a714c;
}


/* ==========================================================
   20.3. INSTRUCCIONES
========================================================== */

.prot-instruccion {
    margin-bottom: 22px;
    padding: 18px 20px;
    border-left: 4px solid var(--turquesa);
    border-radius: 0 10px 10px 0;
    background: #edf8fa;
}

.prot-instruccion strong {
    display: block;
    color: var(--azul);
    font-size: 18px;
}

.prot-instruccion p {
    margin: 7px 0 0;
    color: #587586;
    line-height: 1.7;
}


/* ==========================================================
   20.4. DISTRIBUCIÓN DEL JUEGO
========================================================== */

/* Modelo a la izquierda y controles a la derecha */

.prot-juego {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(0, 0.85fr);
    gap: 24px;
    align-items: start;
}


/* ==========================================================
   20.5. VISOR ANATÓMICO
========================================================== */

.prot-visor {
    min-width: 0;
    padding: 12px;
    background: #0e2537;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(11, 43, 64, 0.14);
}

/* Cabecera y pie del visor */

.prot-visor-cabecera,
.prot-visor-pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 8px;
    color: #b4d7e2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
}

/* Modelo SVG */

#prot-svg {
    display: block;
    width: 100%;
    max-width: 430px;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    background:
        radial-gradient(
            circle at 50% 42%,
            #284e67 0%,
            #10283f 75%
        );
}

/* Indicador de estado */

#prot-estado {
    color: #90eee3;
}


/* ==========================================================
   20.6. PANEL DE CONTROLES
========================================================== */

.prot-controles {
    min-width: 0;
    padding: 24px;
    background: #f3f8fb;
    border: 1px solid #dae8ef;
    border-radius: 15px;
}

.prot-controles h5 {
    margin: 0 0 9px;
    color: var(--azul);
    font-size: 21px;
}

.prot-controles > p {
    margin: 0 0 24px;
    color: #617b8b;
    font-size: 14px;
    line-height: 1.7;
}


/* ==========================================================
   20.7. DESLIZADORES DE ANCHO Y LONGITUD
========================================================== */

.prot-control {
    margin-bottom: 27px;
}

.prot-control label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 13px;
    color: var(--azul);
    font-size: 14px;
    font-weight: 700;
}

.prot-control label strong {
    color: #168e9d;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

.prot-control input[type="range"] {
    display: block;
    width: 100%;
    height: 8px;
    cursor: pointer;
    accent-color: #179fa9;
}

/* Valores mínimo y máximo */

.prot-limites {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    color: #768c99;
    font-size: 11px;
}


/* ==========================================================
   20.8. RESPUESTA DEL JUEGO
========================================================== */

.prot-feedback {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--blanco);
    border: 1px solid #d2e4ec;
    border-radius: 10px;
    color: #456678;
    font-size: 13px;
    line-height: 1.65;
}

.prot-feedback.error {
    background: #fff4ed;
    border-color: #f1d3b1;
    color: #935526;
}

.prot-feedback.correcto {
    background: #e0f6e9;
    border-color: #a6dfbe;
    color: #206b47;
    font-weight: 700;
}


/* ==========================================================
   20.9. COMPROBAR Y REINICIAR
========================================================== */

#prot-comprobar {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
}

#prot-comprobar:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

#prot-reiniciar {
    display: block;
    width: 100%;
    margin-top: 18px;
}


/* ==========================================================
   20.10. RESULTADO CORRECTO
========================================================== */

.prot-exito {
    margin-top: 18px;
    padding: 17px;
    background: #dff6e8;
    color: #17613e;
    border: 1px solid #9bddb8;
    border-radius: 12px;
    animation: aparecerExito 0.4s ease;
}

.prot-exito strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.prot-exito p {
    margin: 0;
    color: #246b48;
    font-size: 14px;
    line-height: 1.7;
}


/* ==========================================================
   20.11. AVISO EDUCATIVO
========================================================== */

.prot-nota {
    margin: 21px 0 0;
    color: #758c99;
    font-size: 12px;
    line-height: 1.7;
}


/* ==========================================================
   21. LABORATORIO INTERACTIVO DE HIDROGELES

   FUNCIONAMIENTO:
   1. Seleccionar la concentración de alginato.
   2. Ajustar el tiempo de exposición a CaCl2.
   3. Analizar la muestra virtual.

   Los resultados son ilustrativos y no predictivos.
========================================================== */


/* ==========================================================
   21.1. CONTENEDOR GENERAL
========================================================== */

.hidro-demo {
    margin-top: 28px;
}

.hidro-panel {
    padding: 28px;
    background: var(--blanco);
    border: 1px solid #dce7ed;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.06);
}


/* ==========================================================
   21.2. ETAPAS DEL EXPERIMENTO
========================================================== */

.hidro-etapas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 24px 0;
}

.hidro-etapa {
    padding: 12px 8px;
    background: #edf3f6;
    border-radius: 9px;
    color: #718592;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.hidro-etapa.activa {
    background: var(--azul);
    color: var(--blanco);
}

.hidro-etapa.completada {
    background: #def6e8;
    color: #226b48;
}


/* ==========================================================
   21.3. INSTRUCCIONES
========================================================== */

.hidro-instruccion {
    padding: 18px 20px;
    margin-bottom: 22px;
    background: #edf8fa;
    border-left: 4px solid var(--turquesa);
    border-radius: 0 10px 10px 0;
}

.hidro-instruccion strong {
    display: block;
    color: var(--azul);
    font-size: 18px;
}

.hidro-instruccion p {
    margin: 7px 0 0;
    color: #587586;
    line-height: 1.7;
}


/* ==========================================================
   21.4. DISTRIBUCIÓN DEL LABORATORIO
========================================================== */

.hidro-juego {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(0, 0.85fr);
    gap: 24px;
    align-items: start;
}


/* ==========================================================
   21.5. VISOR DE LA MUESTRA
========================================================== */

.hidro-visor {
    min-width: 0;
    padding: 12px;
    background: #0e2537;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(11, 43, 64, 0.14);
}

/* Cabecera y pie */

.hidro-visor-cabecera,
.hidro-visor-pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 8px;
    color: #b4d7e2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
}

/* SVG de la placa de Petri */

#hidro-svg {
    display: block;
    width: 100%;
    max-width: 510px;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    background:
        radial-gradient(
            circle at center,
            #2f647c,
            #10283f 80%
        );
}

/* Estado */

#hidro-estado {
    color: #8ce8dd;
}


/* ==========================================================
   21.6. REPRESENTACIÓN DEL HIDROGEL
========================================================== */

#hidro-gel-forma,
#hidro-gel-brillo {
    transition:
        fill-opacity 0.35s ease,
        stroke-width 0.35s ease,
        transform 0.35s ease;
}

/* Gel blando */

#hidro-gel-forma.gel-blando {
    stroke-dasharray: 6 5;
}

/* Gel firme */

#hidro-gel-forma.gel-firme {
    stroke-dasharray: none;
}


/* ==========================================================
   21.7. CONTROLES DEL LABORATORIO
========================================================== */

.hidro-controles {
    min-width: 0;
    padding: 24px;
    background: #f3f8fb;
    border: 1px solid #dae8ef;
    border-radius: 15px;
}

.hidro-controles h5 {
    margin: 0 0 9px;
    color: var(--azul);
    font-size: 21px;
}

.hidro-controles > p {
    margin: 0 0 24px;
    color: #617b8b;
    font-size: 14px;
    line-height: 1.7;
}

.hidro-campo {
    margin-bottom: 27px;
}


/* ==========================================================
   21.8. CONCENTRACIÓN DE ALGINATO
========================================================== */

.hidro-label,
.hidro-tiempo-label {
    display: block;
    margin-bottom: 12px;
    color: var(--azul);
    font-size: 14px;
    font-weight: 700;
}

/* Botones de concentración */

.hidro-concentraciones {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hidro-concentracion {
    padding: 15px 8px;
    border: 2px solid #d0e1e9;
    background: var(--blanco);
    border-radius: 10px;
    color: var(--azul);
    font-weight: 800;
    cursor: pointer;
}

.hidro-concentracion:hover {
    border-color: var(--turquesa);
}

/* Concentración seleccionada */

.hidro-concentracion.seleccionada {
    background: #d7f5f1;
    border-color: #20a9a9;
    color: #087976;
}


/* ==========================================================
   21.9. TIEMPO DE EXPOSICIÓN AL CaCl2
========================================================== */

.hidro-tiempo-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hidro-tiempo-label strong {
    color: #168e9d;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

/* Deslizador */

#hidro-tiempo {
    display: block;
    width: 100%;
    accent-color: #169faa;
    cursor: pointer;
}

/* Límites */

.hidro-limites {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    color: #768c99;
    font-size: 11px;
}


/* ==========================================================
   21.10. RESULTADOS DEL EXPERIMENTO
========================================================== */

.hidro-feedback {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--blanco);
    border: 1px solid #d2e4ec;
    border-radius: 10px;
    color: #456678;
    font-size: 13px;
    line-height: 1.7;
}

/* Error o resultado no esperado */

.hidro-feedback.error {
    background: #fff4ed;
    border-color: #f1d3b1;
    color: #935526;
}

/* Resultado correcto */

.hidro-feedback.correcto {
    background: #e0f6e9;
    border-color: #a6dfbe;
    color: #206b47;
    font-weight: 700;
}


/* ==========================================================
   21.11. ANALIZAR Y REINICIAR
========================================================== */

#hidro-analizar {
    width: 100%;
}

#hidro-analizar:disabled {
    opacity: 0.6;
    cursor: default;
}

#hidro-reiniciar {
    display: block;
    width: 100%;
    margin-top: 18px;
}


/* ==========================================================
   21.12. EXPERIMENTO COMPLETADO
========================================================== */

.hidro-exito {
    margin-top: 18px;
    padding: 18px;
    background: #dff6e8;
    border: 1px solid #9bddb8;
    border-radius: 12px;
    color: #17613e;
    animation: aparecerExito 0.4s ease;
}

.hidro-exito strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.hidro-exito p {
    margin: 0;
    color: #246b48;
    font-size: 14px;
    line-height: 1.7;
}


/* ==========================================================
   21.13. AVISO EDUCATIVO
========================================================== */

.hidro-nota {
    margin: 21px 0 0;
    color: #758c99;
    font-size: 12px;
    line-height: 1.7;
}

/* ==========================================================
   22. NUESTRO EQUIPO · UPAM3D

   ESTILOS PARA:
   - equipo.html
   - en/team.html

   Incluye:
   - Tarjetas de coordinación
   - Fotografías circulares
   - Miembros actuales
   - Antiguos miembros
   - Enlaces a biografías
========================================================== */


/* ==========================================================
   22.1. DISTRIBUCIÓN GENERAL DEL EQUIPO
========================================================== */

/* Cuadrícula de miembros */

.equipo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Cuadrícula de miembros actuales y antiguos */

.miembros-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* MÁRGENES DE LA SECCIÓN DEL EQUIPO */

.upam-equipo {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 45px;
    box-sizing: border-box;
}
/* ==========================================================
   22.2. TARJETAS DE PERSONAS
========================================================== */

.persona-card {
    min-width: 0;

    padding: 28px 24px;

    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio);

    box-shadow: var(--sombra);

    text-align: center;
}

/* Nombre */

.persona-card strong {
    display: block;

    color: var(--azul);

    font-family: "Manrope", sans-serif;
    font-size: 18px;
    line-height: 1.4;
}

/* Cargo */

.persona-card .rol {
    display: block;

    margin-top: 8px;

    color: var(--azul-claro);

    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

/* Descripción */

.persona-card p {
    margin: 12px 0 0;

    color: var(--gris);

    font-size: 14px;
    line-height: 1.7;
}


/* ==========================================================
   22.3. AVATARES CON INICIALES
========================================================== */

/* Avatar general */

.avatar {
    display: grid;
    place-items: center;

    width: 64px;
    height: 64px;

    flex-shrink: 0;

    background:
        linear-gradient(
            135deg,
            var(--azul),
            var(--azul-claro)
        );

    color: var(--blanco);

    border-radius: 50%;

    font-family: "Manrope", sans-serif;
    font-size: 22px;
    font-weight: 800;
}

/* Avatar dentro de una tarjeta */

.persona-card .avatar {
    width: 88px;
    height: 88px;

    margin: 0 auto 16px;

    font-size: 28px;
}

/* Avatares más pequeños para otros miembros */

.miembros-grid .persona-card .avatar {
    width: 64px;
    height: 64px;
    font-size: 20px;
}


/* ==========================================================
   22.4. FOTOGRAFÍAS CIRCULARES
========================================================== */

/* Fotografía de Rubén, José Antonio y Nieves */

.equipo-foto {
    display: block;

    width: 95px;
    height: 95px;

    margin: 0 auto 25px;

    border-radius: 50%;

    object-fit: cover;
    object-position: center top;

    background: #e5eef2;
}


/* ==========================================================
   22.5. TARJETAS CLICABLES
========================================================== */

/* Enlace que ocupa la tarjeta completa */

.persona-enlace {
    display: block;

    color: inherit;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

/* Al pasar el ratón */

.persona-enlace:hover {
    transform: translateY(-5px);

    box-shadow:
        0 12px 30px rgba(20, 60, 90, 0.14);

    border-color: var(--turquesa);
}

/* Accesibilidad */

.persona-enlace:focus-visible {
    outline: 3px solid var(--turquesa);
    outline-offset: 4px;
}


/* ==========================================================
   22.6. ENLACE PARA VER LA BIOGRAFÍA
========================================================== */

/* "Conoce a Rubén →" / "Meet Rubén →" */

.persona-ver {
    display: block;

    margin-top: 15px;

    color: #087fa1;

    font-size: 13px;
    font-weight: 700;
}

/* Hover */

.persona-enlace:hover .persona-ver {
    color: #12a6b0;
}


/* ==========================================================
   22.7. COORDINACIÓN DE UPAM3D
========================================================== */

/* Tres coordinadores distribuidos en una fila */

#coordinacion .equipo-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;

    width: 100%;
    max-width: 1150px;

    margin: 40px auto 0;
}


/* ==========================================================
   22.8. TARJETAS DE LOS TRES COORDINADORES
========================================================== */

#coordinacion .persona-card.persona-enlace {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: flex-start;

    width: 100%;
    min-width: 0;
    min-height: 280px;

    padding: 28px 22px;

    background: var(--blanco);

    border: 1px solid var(--borde);
    border-radius: 12px;

    text-align: center;
    color: inherit;
    text-decoration: none;

    box-sizing: border-box;
}


/* ==========================================================
   22.9. NOMBRE Y CARGO DE LOS COORDINADORES
========================================================== */

/* Nombre */

#coordinacion .persona-enlace strong {
    display: block;

    margin-top: 0;

    color: var(--azul);

    font-size: 17px;
    line-height: 1.4;
}

/* Cargo */

#coordinacion .persona-enlace .rol {
    display: block;

    margin-top: 8px;

    color: var(--azul-claro);

    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}


/* ==========================================================
   22.10. ENLACE INFERIOR
========================================================== */

/* Mantiene los tres enlaces alineados */

#coordinacion .persona-ver {
    display: block;

    margin-top: auto;
    padding-top: 20px;

    color: #087fa1;

    font-size: 13px;
    font-weight: 700;
}

/* Efecto al pasar el ratón */

#coordinacion .persona-enlace:hover {
    transform: translateY(-5px);

    box-shadow:
        0 12px 30px rgba(20, 60, 90, 0.14);
}


/* ==========================================================
   22.11. MENSAJE DE MIEMBROS PENDIENTES
========================================================== */

/* Cuando todavía no hay información publicada */

.equipo-vacio {
    margin: 0;

    padding: 32px 24px;

    background: var(--blanco);

    border: 1.5px dashed var(--borde);
    border-radius: var(--radio);

    color: var(--gris);

    font-size: 14.5px;
    line-height: 1.7;

    text-align: center;
}


/* ==========================================================
   22.12. PERSONAS EN TARJETAS DE ORGANIZACIÓN
========================================================== */

/* Nombre e iniciales dentro de una tarjeta */

.coord-persona {
    display: flex;
    align-items: center;

    gap: 16px;
    margin-bottom: 16px;
}

/* Nombre */

.coord-persona strong {
    display: block;

    font-family: "Manrope", sans-serif;
    font-size: 18px;
}

/* Cargo */

.coord-persona span {
    color: var(--azul-claro);

    font-size: 13px;
    font-weight: 700;
}


/* ==========================================================
   22.13. MIEMBROS ACTUALES UPAM3D
   ESCRITORIO: 4 + 3 CENTRADAS
   TABLET: 3 POR FILA
   MÓVIL: 2 POR FILA
========================================================== */

/* SECCIÓN */

#miembros {
    padding-top: 65px;
    padding-bottom: 65px;
}

#miembros .section-heading {
    margin-bottom: 30px;
}

/* CUADRÍCULA EN ORDENADOR */

#miembros .miembros-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 16px 10px;
    max-width: 900px;
    margin: 0 auto;
}

/* TARJETAS */

#miembros .miembros-card {
    grid-column: span 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    min-width: 0;
    padding: 15px 10px;

    background: #f7fafc;
    border: 1px solid #e0ebf0;
    border-radius: 10px;

    text-align: center;
}

/* CENTRAR LAS TRES TARJETAS INFERIORES */

#miembros .miembros-card:nth-child(5) {
    grid-column: 2 / span 2;
}

/* FOTOGRAFÍAS */

#miembros .miembros-foto {
    width: 75px;
    height: 75px;
    flex-shrink: 0;
    margin-bottom: 10px;

    overflow: hidden;
    border: 3px solid #d5edf0;
    border-radius: 50%;
    background: #e9f3f6;
}

#miembros .miembros-foto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* NOMBRES */

#miembros .miembros-card h3 {
    margin: 0 0 4px;
    color: #173b56;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: break-word;
}

/* CARGOS */

#miembros .miembros-card p {
    margin: 0;
    color: #638092;
    font-size: 11px;
    line-height: 1.4;
}

/* ==========================================================
   TABLETS - 3 TARJETAS POR FILA
========================================================== */

@media (min-width: 651px) and (max-width: 950px) {

    #miembros .miembros-grid {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 14px;
        max-width: 760px;
    }

    #miembros .miembros-card {
        grid-column: span 2;
        padding: 14px 10px;
    }

    /* El quinto vuelve a su posición normal */

    #miembros .miembros-card:nth-child(5) {
        grid-column: auto / span 2;
    }

    /* Última tarjeta centrada */

    #miembros .miembros-card:nth-child(7) {
        grid-column: 3 / span 2;
    }

    #miembros .miembros-foto {
        width: 70px;
        height: 70px;
    }
}

/* ==========================================================
   MÓVILES - 2 TARJETAS POR FILA
========================================================== */

@media (max-width: 650px) {

    #miembros {
        padding-top: 38px;
        padding-bottom: 38px;
    }

    #miembros .section-heading {
        margin-bottom: 22px;
    }

    #miembros .section-heading h2 {
        font-size: 27px;
        line-height: 1.2;
    }

    #miembros .section-heading p {
        font-size: 13px;
        line-height: 1.5;
    }

    /* DOS COLUMNAS */

    #miembros .miembros-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    /* TARJETAS PEQUEÑAS */

    #miembros .miembros-card,
    #miembros .miembros-card:nth-child(5) {
        grid-column: auto;

        width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 12px 7px;

        border-radius: 9px;
    }

    /* CENTRAR LA SÉPTIMA TARJETA */

    #miembros .miembros-card:nth-child(7) {
        grid-column: 1 / -1;
        width: calc(50% - 5px);
        justify-self: center;
    }

    /* FOTOGRAFÍAS */

    #miembros .miembros-foto {
        width: 58px;
        height: 58px;
        margin-bottom: 8px;
        border-width: 2px;
    }

    /* NOMBRES */

    #miembros .miembros-card h3 {
        font-size: 11.5px;
        line-height: 1.3;
        margin-bottom: 4px;
    }

    /* CARGOS */

    #miembros .miembros-card p {
        font-size: 10px;
        line-height: 1.35;
    }
}

/* ==========================================================
   MÓVILES MUY ESTRECHOS
========================================================== */

@media (max-width: 380px) {

    #miembros .miembros-grid {
        gap: 8px;
    }

    #miembros .miembros-card {
        padding: 10px 5px;
    }

    #miembros .miembros-foto {
        width: 52px;
        height: 52px;
    }

    #miembros .miembros-card h3 {
        font-size: 11px;
    }

    #miembros .miembros-card p {
        font-size: 9.5px;
    }

    #miembros .miembros-card:nth-child(7) {
        width: calc(50% - 4px);
    }
}

/* ==========================================================
   22.14. ALUMNI UPAM3D
   LISTA COMPACTA SIN FOTOGRAFÍAS
========================================================== */

#alumni {
    padding-top: 65px;
    padding-bottom: 65px;
}

#alumni .section-heading {
    margin-bottom: 28px;
}

/* LISTADO */

#alumni .alumni-lista {
    max-width: 900px;
    margin: 0 auto;
    border-top: 1px solid #dfe9ee;
}

/* CADA ANTIGUO MIEMBRO */

#alumni .alumni-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 12px 10px;
    border-bottom: 1px solid #dfe9ee;
}

/* INFORMACIÓN */

#alumni .alumni-info {
    flex: 1;
    min-width: 0;
}

/* NOMBRES */

#alumni .alumni-info h3 {
    margin: 0 0 3px;
    color: #173b56;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

/* DESCRIPCIONES */

#alumni .alumni-info p {
    margin: 0;
    color: #638092;
    font-size: 11.5px;
    line-height: 1.5;
}

/* FECHAS */

#alumni .alumni-fecha {
    flex-shrink: 0;
    color: #197d9f;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}


/* ==========================================
   ALUMNI - DISEÑO MÁS PEQUEÑO EN MÓVIL
========================================== */

@media (max-width: 650px) {

    #alumni {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    /* Encabezado más compacto */

    #alumni .section-heading {
        margin-bottom: 16px;
    }

    #alumni .section-heading h2 {
        font-size: 22px;
        line-height: 1.25;
        margin: 8px 0;
    }

    #alumni .section-heading p {
        font-size: 11.5px;
        line-height: 1.5;
    }

    /* Lista más estrecha */

    #alumni .alumni-lista {
        max-width: 100%;
    }

    /* Menos espacio entre personas */

    #alumni .alumni-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        padding: 9px 3px;
    }

    /* Nombres */

    #alumni .alumni-info h3 {
        font-size: 12px;
        line-height: 1.3;
        margin-bottom: 3px;
    }

    /* Descripciones */

    #alumni .alumni-info p {
        font-size: 10px;
        line-height: 1.4;
    }

    /* Fechas */

    #alumni .alumni-fecha {
        font-size: 9px;
        line-height: 1.3;
    }
}


/* ==========================================================
   23. BIOGRAFÍAS INDIVIDUALES

   ESTILOS COMPARTIDOS POR:

   equipo/ruben-perez.html
   equipo/jose-antonio-calvo.html
   equipo/nieves-cubo.html

   en/equipo/ruben-perez.html
   en/equipo/jose-antonio-calvo.html
   en/equipo/nieves-cubo.html
========================================================== */


/* ==========================================================
   23.1. PORTADA DE LAS BIOGRAFÍAS
========================================================== */

/* Altura y espacio de la portada */

.perfil-hero .hero-content {
    padding: 55px 0;
}

/* Fondo de la sección */

.perfil-seccion {
    background: var(--fondo);
}


/* ==========================================================
   23.2. ENLACE PARA VOLVER AL EQUIPO
========================================================== */

/* "← Volver al equipo" / "← Back to our team" */

.perfil-volver {
    display: inline-block;

    margin-bottom: 28px;

    color: var(--azul-claro);

    font-size: 14px;
    font-weight: 700;

    transition: color 0.2s ease;
}

/* Hover */

.perfil-volver:hover {
    color: var(--azul);
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ==========================================================
   23.3. DISTRIBUCIÓN DEL PERFIL
========================================================== */

/*
   COLUMNA IZQUIERDA:
   Fotografía, nombre y cargo

   COLUMNA DERECHA:
   Trayectoria, investigación y áreas de trabajo
*/

.perfil-grid {
    display: grid;

    grid-template-columns:
        320px
        minmax(0, 1fr);

    gap: 35px;

    align-items: start;
}


/* ==========================================================
   23.4. TARJETA LATERAL
========================================================== */

.perfil-lateral {
    min-width: 0;

    padding: 28px;

    background: var(--blanco);

    border: 1px solid var(--borde);
    border-radius: 14px;

    box-shadow: var(--sombra);

    text-align: center;
}


/* ==========================================================
   23.5. FOTOGRAFÍA DE PERFIL
========================================================== */

/* Fotografía vertical */

.perfil-foto {
    display: block;

    width: 100%;
    max-width: 300px;

    aspect-ratio: 3 / 4;

    object-fit: cover;
    object-position: center top;

    margin: 0 auto 20px;

    border-radius: 14px;

    background: #e5eef2;
}


/* ==========================================================
   23.6. FOTOGRAFÍA PROVISIONAL
========================================================== */

/* Se conserva por compatibilidad */

.perfil-foto-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 285px;

    background:
        linear-gradient(
            135deg,
            var(--azul),
            var(--azul-claro)
        );

    border-radius: 12px;

    color: var(--blanco);
}

/* Iniciales */

.perfil-foto-placeholder span {
    font-family: "Manrope", sans-serif;

    font-size: 70px;
    font-weight: 800;
}


/* ==========================================================
   23.7. NOMBRE Y CARGO
========================================================== */

/* Nombre */

.perfil-lateral h2 {
    margin: 20px 0 10px;

    color: var(--azul);

    font-size: 21px;
    line-height: 1.4;
}

/* Cargos y especialidades */

.perfil-lateral p {
    margin: 8px 0;

    color: var(--azul-claro);

    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}


/* ==========================================================
   23.8. TARJETA DE LA BIOGRAFÍA
========================================================== */

.perfil-contenido {
    min-width: 0;

    padding: 38px;

    background: var(--blanco);

    border: 1px solid var(--borde);
    border-radius: 14px;

    box-shadow: var(--sombra);
}


/* ==========================================================
   23.9. TÍTULOS Y PÁRRAFOS
========================================================== */

/* Títulos */

.perfil-contenido h2 {
    margin: 12px 0 22px;

    color: var(--azul);

    font-size: 28px;
    line-height: 1.35;
}

/* Párrafos */

.perfil-contenido p {
    margin: 0 0 18px;

    color: var(--gris);

    font-size: 15px;
    line-height: 1.9;
}


/* ==========================================================
   23.10. ETIQUETAS DE APARTADO
========================================================== */

/*
   Etiquetas como:

   SU TRAYECTORIA
   PROFESSIONAL BACKGROUND

   SU PAPEL EN LA UNIDAD
   HER ROLE AT UPAM3D
*/

.perfil-contenido .tag {
    color: var(--azul-claro);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;
    text-transform: uppercase;
}


/* ==========================================================
   23.11. SEPARADORES
========================================================== */

/* Línea entre apartados */

.perfil-separador {
    height: 1px;

    margin: 38px 0;

    background: #e0e9ee;
}


/* ==========================================================
   23.12. ÁREAS DE ESPECIALIZACIÓN
========================================================== */

/* Contenedor de etiquetas */

.perfil-areas {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;
    margin-top: 20px;
}

/* Etiquetas individuales */

.perfil-areas span {
    display: inline-block;

    padding: 9px 15px;

    background: #eaf5f9;
    color: #126f93;

    border: 1px solid #d1e9f0;
    border-radius: 30px;

    font-size: 13px;
    font-weight: 600;
}


/* ==========================================================
   23.13. MENSAJE DE CONTENIDO PENDIENTE
========================================================== */

/* Se conserva para posibles perfiles futuros */

.perfil-pendiente {
    padding: 20px;

    background: var(--fondo);

    border: 1px dashed #d1e0e8;
    border-radius: 10px;

    color: #8194a0;

    font-style: italic;
}


/* ==========================================================
   24. TODOS LOS CASOS CLÍNICOS · UPAM3D

   ESTILOS PARA:
   - casos-clinicos.html / página de casos en español
   - en/clinical-cases.html

   Incluye:
   - Buscador
   - Filtros
   - Categorías rápidas
   - Tarjetas de casos
   - Ventanas de detalle
   - Galerías de fotografías
========================================================== */


/* ==========================================================
   24.1. BUSCADOR PRINCIPAL
========================================================== */

/* Caja que contiene todos los filtros */

.buscador {
    position: relative;
    z-index: 2;

    margin-top: -46px;
    padding: 22px;

    background: var(--blanco);

    border: 1px solid var(--borde);
    border-radius: 14px;

    box-shadow: var(--sombra);
}


/* ==========================================================
   24.2. BARRA DE BÚSQUEDA
========================================================== */

/* Buscador y botón de filtros */

.busca-linea {
    display: flex;
    align-items: center;

    gap: 12px;
}


/* Contenedor del campo de texto */

.busca-caja {
    position: relative;
    flex: 1;
    min-width: 0;
}


/* Icono de lupa */

.busca-caja .ico {
    position: absolute;

    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    width: 22px;
    height: 22px;

    color: var(--gris);

    pointer-events: none;
}


/* Campo de búsqueda */

.busca-caja input {
    display: block;

    width: 100%;
    min-width: 0;

    padding: 15px 16px 15px 48px;

    background: #f9fbfc;
    color: var(--texto);

    border: 1.5px solid #cfdde5;
    border-radius: 10px;

    font: inherit;
    font-size: 16px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* Al escribir en el buscador */

.busca-caja input:focus {
    outline: none;

    background: var(--blanco);

    border-color: var(--azul-claro);

    box-shadow: 0 0 0 4px rgba(25, 125, 159, 0.13);
}


/* ==========================================================
   24.3. BOTÓN PARA MOSTRAR FILTROS EN MÓVILES
========================================================== */

/* En ordenador permanece oculto */

.btn-filtros {
    display: none;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 52px;
    padding: 0 16px;

    background: var(--blanco);
    color: var(--azul);

    border: 1.5px solid var(--borde);
    border-radius: 10px;

    font-weight: 700;
}


/* ==========================================================
   24.4. FILTROS AVANZADOS
========================================================== */

/* Cinco filtros distribuidos en columnas */

.filtros {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 12px;
    margin-top: 14px;
}


/* Etiquetas de cada filtro */

.filtros label {
    display: block;

    margin-bottom: 5px;

    color: var(--gris);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}


/* Desplegables */

.filtros select {
    display: block;

    width: 100%;
    min-width: 0;

    padding: 12px 10px;

    background: var(--blanco);
    color: var(--texto);

    border: 1.5px solid #cfdde5;
    border-radius: 8px;

    font: inherit;
    font-size: 15px;
}


/* Selección activa */

.filtros select:focus {
    outline: none;

    border-color: var(--azul-claro);

    box-shadow: 0 0 0 3px rgba(25, 125, 159, 0.12);
}


/* ==========================================================
   24.5. CATEGORÍAS RÁPIDAS
========================================================== */

/* Fila de categorías */

.rapidas {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;
    margin-top: 16px;
}


/* Texto "FILTROS RÁPIDOS" / "QUICK FILTERS" */

.rapidas > span {
    margin-right: 4px;

    color: var(--gris);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1px;
    text-transform: uppercase;
}


/* Botones de categorías */

.chip {
    min-height: 36px;

    padding: 8px 14px;

    background: var(--turquesa-suave);
    color: var(--azul);

    border: none;
    border-radius: 999px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


/* Hover y categoría seleccionada */

.chip:hover,
.chip.on {
    background: var(--azul);
    color: var(--blanco);
}


/* ==========================================================
   25. RESULTADOS DE BÚSQUEDA
========================================================== */


/* ==========================================================
   25.1. BARRA DE RESULTADOS
========================================================== */

/* Número de casos encontrados y limpiar filtros */

.resultados-barra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;

    gap: 12px;
    margin: 30px 0 18px;
}


/* Número de resultados */

.resultados-barra strong {
    color: var(--azul);

    font-family: "Manrope", sans-serif;
    font-size: 18px;
    font-weight: 800;
}


/* Botón para limpiar filtros */

.btn-limpiar {
    min-height: 40px;

    padding: 8px 4px;

    background: transparent;
    color: var(--azul-claro);

    border: none;

    font-size: 14px;
    font-weight: 700;

    text-decoration: underline;
    text-underline-offset: 3px;

    cursor: pointer;
}


/* Hover */

.btn-limpiar:hover {
    color: var(--azul);
}


/* ==========================================================
   25.2. CUADRÍCULA DE CASOS CLÍNICOS
========================================================== */

/* Tres casos por fila */

.caso-lista {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;
    margin-bottom: 70px;
}


/* ==========================================================
   25.3. TARJETA INDIVIDUAL DEL CASO
========================================================== */

.caso {
    display: flex;
    flex-direction: column;

    min-width: 0;

    padding: 0;

    background: var(--blanco);
    color: inherit;

    border: 1px solid var(--borde);
    border-radius: var(--radio);

    overflow: hidden;

    text-align: left;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


/* Efecto al pasar el ratón */

.caso:hover {
    transform: translateY(-4px);

    border-color: var(--turquesa);

    box-shadow: 0 12px 30px rgba(35, 62, 84, 0.13);
}


/* ==========================================================
   25.4. IMAGEN DE LA TARJETA
========================================================== */

/* Contenedor */

.caso-img {
    position: relative;

    display: grid;
    place-items: center;

    height: 150px;

    background:
        linear-gradient(
            135deg,
            var(--azul),
            #2b8cad
        );

    color: rgba(255, 255, 255, 0.7);

    overflow: hidden;
}


/* Fotografía del caso */

.caso-img img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* Cuando no hay fotografía */

.caso-img.vacia {
    height: 84px;
}


/* Icono si no existe fotografía */

.caso-img .ico {
    width: 44px;
    height: 44px;
    stroke-width: 1.4;
}


/* ==========================================================
   25.5. AÑO DEL CASO
========================================================== */

.caso-anio {
    position: absolute;

    top: 10px;
    left: 10px;

    padding: 4px 10px;

    background: var(--blanco);
    color: var(--azul);

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.5px;
}


/* ==========================================================
   25.6. CONTENIDO DE LA TARJETA
========================================================== */

.caso-cuerpo {
    display: flex;
    flex-direction: column;
    flex: 1;

    gap: 8px;
    padding: 18px 20px 20px;
}


/* Especialidad médica */

.caso-servicio {
    color: var(--azul-claro);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}


/* Título del caso */

.caso h3 {
    margin: 0;

    color: var(--azul);

    font-size: 17px;
    letter-spacing: -0.3px;
}


/* Patología */

.caso-patologia {
    margin: 0;

    color: var(--gris);

    font-size: 13.5px;
    line-height: 1.55;
}


/* ==========================================================
   25.7. ETIQUETAS DEL CASO
========================================================== */

/* Agrupación inferior */

.caso-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;

    margin-top: auto;
    padding-top: 10px;
}


/* Etiqueta general */

.etiqueta {
    padding: 3px 9px;

    background: var(--fondo);
    color: var(--azul);

    border: 1px solid var(--borde);
    border-radius: 6px;

    font-size: 11px;
    font-weight: 700;
}


/* Etiqueta de clasificación */

.etiqueta.clase {
    background: var(--blanco);
    color: var(--azul-claro);
    border-color: var(--turquesa);
}


/* ==========================================================
   25.8. MENSAJE SIN RESULTADOS
========================================================== */

/* Cuando no hay casos que coincidan con los filtros */

.vacio {
    grid-column: 1 / -1;

    padding: 50px 20px;

    background: var(--fondo);

    border-radius: var(--radio);

    color: var(--gris);
    text-align: center;
}


/* ==========================================================
   25.9. PALABRAS RESALTADAS
========================================================== */

/* Coincidencias con la búsqueda */

mark {
    padding: 0 2px;

    background: #ffe9a8;

    color: inherit;

    border-radius: 3px;
}


/* ==========================================================
   26. VENTANAS DE DETALLE DE LOS CASOS
========================================================== */

/*
   Al seleccionar un caso clínico aparece
   una ventana con la información disponible.

   Incluye:
   - Título y especialidad
   - Datos del caso
   - Galería de fotografías
   - Descripción clínica
   - Información técnica
*/


/* ==========================================================
   26.1. VENTANA EMERGENTE
========================================================== */

dialog.caso-dialog {
    width: min(860px, 94vw);
    max-height: 92vh;

    padding: 0;

    background: var(--blanco);
    color: var(--texto);

    border: none;
    border-radius: 16px;

    box-shadow: 0 30px 90px rgba(10, 31, 51, 0.4);

    overflow: hidden;
}


/* Fondo oscuro detrás de la ventana */

dialog.caso-dialog::backdrop {
    background: rgba(12, 42, 66, 0.72);
}


/* ==========================================================
   26.2. CONTENIDO CON DESPLAZAMIENTO
========================================================== */

.dlg-cuerpo {
    max-height: 92vh;

    padding: 0 0 8px;

    overflow-y: auto;
    overscroll-behavior: contain;
}


/* ==========================================================
   26.3. BOTÓN PARA CERRAR
========================================================== */

/* Zona superior */

.dlg-top {
    position: sticky;
    top: 0;

    height: 0;

    z-index: 2;
}


/* Botón X */

.dlg-cerrar {
    position: absolute;

    top: 10px;
    right: 12px;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    background: var(--fondo);
    color: var(--azul);

    border: none;
    border-radius: 50%;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


/* Hover */

.dlg-cerrar:hover {
    background: var(--azul);
    color: var(--blanco);
}


/* ==========================================================
   26.4. INFORMACIÓN INTERIOR
========================================================== */

.dlg-in {
    padding: 26px 32px 28px;
}


/* Título del caso */

.dlg-in h2 {
    margin: 8px 44px 10px 0;

    color: var(--azul);

    font-size: clamp(22px, 3.5vw, 30px);
    letter-spacing: -0.5px;
}


/* Subtítulos */

.dlg-in h4 {
    margin: 22px 0 6px;

    color: var(--azul);

    font-size: 15px;
}


/* Párrafos */

.dlg-in p {
    margin: 0 0 8px;

    color: var(--gris);

    font-size: 15px;
    line-height: 1.8;
}


/* ==========================================================
   27. GALERÍA DE FOTOGRAFÍAS
========================================================== */


/* ==========================================================
   27.1. CONTENEDOR DE LA GALERÍA
========================================================== */

.dlg-galeria {
    margin: 16px 0;
}


/* ==========================================================
   27.2. IMAGEN PRINCIPAL
========================================================== */

.dlg-galeria .principal {
    display: block;

    width: 100%;
    max-height: 380px;

    object-fit: contain;

    background: #eef4f7;

    border-radius: 10px;
}


/* ==========================================================
   27.3. MINIATURAS
========================================================== */

/* Fila de fotografías pequeñas */

.miniaturas {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
    margin-top: 8px;
}


/* Cada fotografía */

.miniaturas img {
    width: 70px;
    height: 52px;

    object-fit: cover;

    border: 2px solid transparent;
    border-radius: 6px;

    opacity: 0.75;

    cursor: pointer;

    transition:
        opacity 0.2s ease,
        border-color 0.2s ease;
}


/* Imagen seleccionada y hover */

.miniaturas img.activa,
.miniaturas img:hover {
    border-color: var(--azul-claro);
    opacity: 1;
}


/* ==========================================================
   28. FICHA CLÍNICA DEL CASO
========================================================== */


/* ==========================================================
   28.1. CUADRÍCULA DE DATOS
========================================================== */

.dlg-ficha {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px 24px;

    margin: 14px 0;
    padding: 16px 18px;

    background: var(--fondo);

    border-radius: 10px;
}


/* ==========================================================
   28.2. ETIQUETAS DE DATOS
========================================================== */

/* Ejemplo: Especialidad, año, patología */

.dlg-ficha dt {
    color: var(--azul-claro);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}


/* Valor */

.dlg-ficha dd {
    margin: 2px 0 0;

    color: var(--texto);

    font-size: 14.5px;
}


/* Dato que ocupa las dos columnas */

.dlg-ficha .ancho {
    grid-column: 1 / -1;
}


/* ==========================================================
   29. INFORMACIÓN TÉCNICA DESPLEGABLE
========================================================== */

/* Bloque de detalles */

.dlg-tecnica {
    margin-top: 16px;
    padding: 0 18px;

    border: 1px solid var(--borde);
    border-radius: 10px;
}


/* Encabezado desplegable */

.dlg-tecnica summary {
    min-height: 48px;
    padding: 14px 0;

    color: var(--azul);

    font-weight: 700;

    cursor: pointer;
}


/* Lista técnica */

.dlg-tecnica ul {
    margin: 0 0 14px;
    padding-left: 20px;

    color: var(--gris);

    font-size: 14.5px;
    line-height: 1.7;
}


/* ==========================================================
   30. DESCRIPCIÓN COMPLETA DEL CASO
========================================================== */

.dlg-completo {
    padding-bottom: 4px;
}


/* Nota introductoria */

.dlg-completo .nota {
    margin: 0 0 10px;

    color: var(--gris);

    font-size: 13px;
    font-style: italic;
}


/* Títulos */

.dlg-completo h4 {
    margin: 0 0 8px;

    color: var(--azul);

    font-size: 15px;
}


/* Párrafos */

.dlg-completo p {
    margin: 0 0 10px;

    color: var(--gris);

    font-size: 14.5px;
    line-height: 1.7;
}


/* ==========================================================
   31. FUENTES Y REFERENCIAS DEL CASO
========================================================== */

/* Contenedor */

.dlg-fuente {
    margin-top: 18px;

    color: var(--gris);

    font-size: 13px;
}


/* Enlaces a la fuente original */

.dlg-fuente a {
    color: var(--azul-claro);
    font-weight: 700;
}


/* Hover */

.dlg-fuente a:hover {
    color: var(--azul);
    text-decoration: underline;
}

/* ==========================================================
   32. BANNERS GENERALES · UPAM3D

   Utilizados para destacar otras secciones
   y facilitar la navegación entre páginas.
========================================================== */


/* ==========================================================
   32.1. BANNER PRINCIPAL
========================================================== */

.banner {
    padding: 70px 20px;

    background: var(--azul);
    color: var(--blanco);

    text-align: center;
}


/* Título */

.banner h2 {
    margin: 0 0 18px;

    color: var(--blanco);

    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.3;
}


/* Descripción */

.banner p {
    max-width: 650px;

    margin: 0 auto 26px;

    color: #d5e5ed;

    font-size: 15px;
    line-height: 1.8;
}


/* Botón del banner */

.banner .btn {
    margin-top: 4px;
}


/* ==========================================================
   33. PREGUNTAS FRECUENTES
   FAQ · FREQUENTLY ASKED QUESTIONS
========================================================== */


/* ==========================================================
   33.1. CONTENEDOR GENERAL
========================================================== */

.faq {
    max-width: 850px;
    margin: 0 auto;
}


/* ==========================================================
   33.2. TARJETAS DE PREGUNTAS
========================================================== */

/* Cada pregunta desplegable */

.faq details {
    margin-bottom: 12px;
    padding: 0 22px;

    background: var(--blanco);

    border: 1px solid #e1e9ef;
    border-radius: 8px;
}


/* ==========================================================
   33.3. TÍTULO DE LA PREGUNTA
========================================================== */

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    min-height: 48px;
    padding: 18px 0;

    color: var(--texto);

    font-size: 15px;
    font-weight: 700;

    list-style: none;
    cursor: pointer;
}


/* Ocultar el marcador original del navegador */

.faq summary::-webkit-details-marker {
    display: none;
}


/* Símbolo + */

.faq summary::after {
    content: "+";

    flex-shrink: 0;

    color: var(--azul-claro);

    font-size: 22px;
    font-weight: 400;
}


/* Símbolo − cuando la pregunta está abierta */

.faq details[open] summary::after {
    content: "−";
}


/* ==========================================================
   33.4. RESPUESTA
========================================================== */

.faq p {
    margin: 0 0 18px;

    color: var(--gris);

    font-size: 15px;
    line-height: 1.8;
}


/* ==========================================================
   34. CONTACTO · UPAM3D

   Diseño dividido en dos columnas:

   IZQUIERDA:
   - Información de contacto
   - Dirección del hospital
   - Teléfono
   - Correo electrónico

   DERECHA:
   - Formulario de contacto
========================================================== */


/* ==========================================================
   34.1. TARJETA GENERAL
========================================================== */

.contacto-card {
    display: grid;

    /* Sin formulario: una sola columna centrada */
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
    margin-inline: auto;

    background: var(--blanco);

    border: 1px solid var(--borde);
    border-radius: 16px;

    overflow: hidden;

    box-shadow: 0 20px 60px rgba(22, 62, 96, 0.13);
}


/* ==========================================================
   34.2. COLUMNA DE INFORMACIÓN
========================================================== */

.contacto-info {
    position: relative;

    display: flex;
    flex-direction: column;

    gap: 22px;

    min-width: 0;
    padding: 40px 36px;

    background:
        linear-gradient(
            160deg,
            var(--azul),
            #1a6a8c
        );

    color: var(--blanco);

    overflow: hidden;
}


/* Círculo decorativo */

.contacto-info::after {
    content: "";

    position: absolute;

    right: -70px;
    bottom: -70px;

    width: 220px;
    height: 220px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.06);

    pointer-events: none;
}


/* ==========================================================
   34.3. TÍTULO Y DESCRIPCIÓN
========================================================== */

.contacto-info h3 {
    margin: 0;

    color: var(--blanco);

    font-size: 24px;
}


/* Texto introductorio */

.contacto-info > p {
    margin: 0;

    color: #d5e5ed;

    font-size: 14.5px;
    line-height: 1.7;
}


/* ==========================================================
   34.4. ELEMENTOS DE CONTACTO
========================================================== */

/* Cada elemento: dirección, teléfono y correo */

.ci-item {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: flex-start;

    gap: 14px;

    min-width: 0;
}


/* Recuadro del icono */

.ci-item .ci-ico {
    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    flex-shrink: 0;

    background: rgba(255, 255, 255, 0.11);

    border-radius: 12px;
}


/* Nombre del dato */

.ci-item strong {
    display: block;

    margin-bottom: 3px;

    color: #94e1e5;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.5px;
    text-transform: uppercase;
}


/* Información */

.ci-item span,
.ci-item a {
    color: var(--blanco);

    font-size: 14.5px;
    line-height: 1.55;

    overflow-wrap: anywhere;
}


/* Enlaces */

.ci-item a {
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.33);
    text-underline-offset: 3px;
}


/* Hover */

.ci-item a:hover {
    text-decoration-color: var(--blanco);
}


/* ==========================================================
   34.5. BOTONES DE CONTACTO
========================================================== */

.ci-acciones {
    position: relative;
    z-index: 1;

    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: auto;
}


/* Botones */

.ci-acciones .btn {
    min-height: 44px;

    padding: 11px 18px;

    font-size: 12.5px;
}


/* ==========================================================
   35. FORMULARIO DE CONTACTO
========================================================== */


/* ==========================================================
   35.1. CONTENEDOR DEL FORMULARIO
========================================================== */

.contacto-form {
    min-width: 0;
    padding: 40px 40px 36px;
}


/* Título */

.contacto-form h3 {
    margin: 0 0 6px;

    color: var(--azul);

    font-size: 24px;
}


/* Subtítulo */

.contacto-form .sub {
    margin: 0 0 24px;

    color: var(--gris);

    font-size: 14.5px;
    line-height: 1.7;
}


/* ==========================================================
   35.2. DISTRIBUCIÓN DE LOS CAMPOS
========================================================== */

/* Dos campos en una misma fila */

.form-fila {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 16px;
}


/* Contenedor individual */

.campo {
    min-width: 0;
    margin-bottom: 16px;
}


/* ==========================================================
   35.3. ETIQUETAS
========================================================== */

.campo label {
    display: block;

    margin-bottom: 6px;

    color: var(--azul);

    font-size: 13px;
    font-weight: 700;
}


/* ==========================================================
   35.4. CAMPOS DEL FORMULARIO
========================================================== */

/* Nombre, email, selectores y mensaje */

.campo input,
.campo select,
.campo textarea {
    display: block;

    width: 100%;
    min-width: 0;

    padding: 13px 14px;

    background: #f9fbfc;
    color: var(--texto);

    border: 1.5px solid #cfdde5;
    border-radius: 8px;

    font: inherit;
    font-size: 16px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* Área del mensaje */

.campo textarea {
    min-height: 130px;
    resize: vertical;
}


/* ==========================================================
   35.5. CAMPO SELECCIONADO
========================================================== */

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    outline: none;

    background: var(--blanco);

    border-color: var(--azul-claro);

    box-shadow: 0 0 0 4px rgba(25, 125, 159, 0.13);
}


/* Campos no válidos tras interactuar */

.campo input:user-invalid,
.campo textarea:user-invalid {
    border-color: #c0392b;
}


/* ==========================================================
   35.6. AVISO DE PRIVACIDAD
========================================================== */

.aviso-privacidad {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    margin: 4px 0 20px;
    padding: 12px 14px;

    background: #fff8e6;

    border: 1px solid #f1dc9d;
    border-radius: 8px;

    color: #6b5413;

    font-size: 13px;
    line-height: 1.55;
}


/* Icono de aviso */

.aviso-privacidad .ico {
    flex-shrink: 0;

    margin-top: 2px;

    color: #b58900;
}


/* ==========================================================
   35.7. BOTÓN ENVIAR
========================================================== */

.contacto-form .btn {
    width: 100%;
    font-size: 14px;
}


/* ==========================================================
   35.8. NOTAS Y CONFIRMACIÓN
========================================================== */

/* Nota bajo el formulario */

.nota-pie {
    margin: 12px 0 0;

    color: var(--gris);

    font-size: 12px;
    line-height: 1.5;
}


/* Respuesta del formulario */

#aviso-contacto {
    margin: 14px 0 0;

    color: var(--azul-claro);

    font-size: 14px;
    line-height: 1.6;
}


/* ==========================================================
   36. BANNER DE INSTAGRAM
========================================================== */


/* ==========================================================
   36.1. FONDO DEL BANNER
========================================================== */

.instagram-banner {
    padding: 75px 20px;

    background: #f0f7f9;

    text-align: center;
}


/* ==========================================================
   36.2. CONTENIDO
========================================================== */

.instagram-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 16px;
}


/* ==========================================================
   36.3. ICONO DE INSTAGRAM
========================================================== */

.instagram-icono {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 60px;
    height: 60px;

    background: var(--blanco);

    border: 1px solid #dce7ed;
    border-radius: 16px;

    color: var(--azul-claro);
}


/* SVG */

.instagram-icono svg {
    width: 30px;
    height: 30px;
}


/* ==========================================================
   36.4. ETIQUETA Y TÍTULO
========================================================== */

.instagram-banner .tag {
    color: var(--azul-claro);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;
}


/* Título */

.instagram-banner h2 {
    margin: 0;

    color: var(--azul);

    font-size: clamp(30px, 4vw, 40px);
    font-weight: 800;
}


/* ==========================================================
   36.5. DESCRIPCIÓN
========================================================== */

.instagram-banner p {
    max-width: 550px;

    margin: 0 0 10px;

    color: #627482;

    font-size: 15px;
    line-height: 1.8;
}


/* ==========================================================
   36.6. BOTÓN DE INSTAGRAM
========================================================== */

.instagram-banner .btn {
    padding: 15px 28px;

    background: var(--azul-claro);
    color: var(--blanco);

    border: 2px solid var(--azul-claro);
    border-radius: 6px;
}


/* Hover */

.instagram-banner .btn:hover {
    background: var(--azul);
    border-color: var(--azul);
}


/* ==========================================================
   37. PIE DE PÁGINA · FOOTER
========================================================== */

/* 37.1. CONTENEDOR GENERAL */

footer {
    padding: 52px 0 24px;
    background: #102c43;
    color: var(--blanco);
}

/* 37.2. DISTRIBUCIÓN DEL FOOTER */

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.8fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 35px;
    margin-bottom: 36px;
    align-items: start;
}

/* 37.3. LOGOTIPO INDIVIDUAL */

.logo-caja {
    display: inline-block;
    padding: 8px 12px;
    background: var(--blanco);
    border-radius: 10px;
}

.logo-footer {
    display: block;
    width: 150px;
    height: auto;
    object-fit: contain;
}

/* 37.4. CUATRO LOGOTIPOS INSTITUCIONALES */

.logos-institucionales {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.logos-institucionales img {
    display: block;
    width: 100%;
    height: 85px;
    min-width: 0;
    padding: 8px;
    background: #ffffff;
    border-radius: 8px;
    object-fit: contain;
    object-position: center;
}

/* 37.5. TÍTULOS DE COLUMNAS */

footer h4 {
    margin: 0 0 14px;
    color: var(--blanco);
    font-size: 16px;
    font-weight: 800;
}

/* 37.6. TEXTO DEL FOOTER */

footer p {
    color: #c7d7df;
    font-size: 13px;
    line-height: 1.8;
}

/* 37.7. ENLACES */

footer a {
    display: block;
    padding: 7px 0;
    color: #c7d7df;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--blanco);
}

/* 37.8. TEXTO DE NAVEGACIÓN */

footer .footer-grid a {
    text-transform: none;
}

/* 37.9. COPYRIGHT */

.footer-bottom {
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: #aac0ce;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

/* ADAPTACIÓN DEL FOOTER A TABLETS */

@media (max-width: 1050px) {

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

    .logos-institucionales {
        max-width: 650px;
    }

}

/* ADAPTACIÓN DEL FOOTER A MÓVILES */

@media (max-width: 600px) {

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-grid > div:first-child {
        grid-column: auto;
    }

    .logos-institucionales {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .logos-institucionales img {
        height: 85px;
        padding: 8px;
    }

}

/* ==========================================================
   38. DISEÑO RESPONSIVE · UPAM3D

   Adaptación para:
   - Ordenadores
   - Portátiles
   - Tablets
   - Teléfonos móviles

   Compatible con las versiones española e inglesa.
========================================================== */


/* ==========================================================
   38.1. PANTALLAS MEDIANAS
   Hasta 1300 px
========================================================== */

@media (max-width: 1300px) {

    /* Cabecera */

    .navbar {
        gap: 10px;
    }

    /* Menú */

    .menu {
        gap: 9px;
    }

    .menu > a:not(.instagram-menu):not(.hospital-menu) {
        font-size: 11px;
    }

    /* Logotipo del hospital */

    .hospital-menu {
        margin-left: 5px;
    }

    .hospital-menu img {
        width: 150px;
    }

}


/* ==========================================================
   38.2. TABLETS HORIZONTALES
   Hasta 1100 px
========================================================== */

@media (max-width: 1100px) {

    /* Organización */

    .coord-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Primera tarjeta de coordinación */

    .coord-grid .coord-card:first-child {
        grid-column: 1 / -1;
    }

    /* Mantener dos columnas en organización */

    .org-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .org-grid .coord-card:first-child {
        grid-column: auto;
    }

    /* Datos destacados */

    .coord-datos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Miembros */

    .miembros-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Filtros de casos clínicos */

    .filtros {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


/* ==========================================================
   38.3. TABLETS Y PORTÁTILES PEQUEÑOS
   Hasta 1050 px
========================================================== */

@media (max-width: 1050px) {

    /* Menú hamburguesa */

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    /* Barra de navegación */

    .navbar {
        min-height: 68px;
    }

    /* Logotipo UPAM3D */

    .logo-img {
        height: 65px;
    }

    /* Menú oculto por defecto */

    .menu {
        display: none;

        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        flex-direction: column;
        align-items: stretch;

        gap: 0;
        padding: 10px 5% 22px;

        background: var(--blanco);

        box-shadow: 0 18px 24px rgba(0, 0, 0, 0.1);

        max-height: calc(100dvh - 85px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* El JavaScript abre el menú añadiendo .open */

    .menu.open {
        display: flex;
    }

    /* Enlaces del menú */

    .menu > a:not(.instagram-menu):not(.hospital-menu) {
        display: block;

        padding: 15px 4px;

        font-size: 14px;

        border-bottom: 1px solid #edf2f5;
    }

    /* Selector de idiomas */

    .menu .lang {
        align-self: flex-start;
        margin-top: 16px;
    }

    .menu .lang a,
    .menu .lang span {
        padding: 9px 16px;
    }

    /* Instagram */

    .menu .instagram-menu {
        align-self: flex-start;
        margin-top: 10px;
        border: none;
    }

    /* Logotipo del hospital */

    .menu .hospital-menu {
        align-self: flex-start;
        margin: 12px 0 0;
        border: none;
    }

    .menu .hospital-menu img {
        width: 160px;
        max-width: 100%;
    }

    /* Tres características */

    .features-grid {
        gap: 18px;
    }

    /* Tarjetas generales */

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Casos clínicos */

    .caso-lista {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Tarjetas del equipo */

    .equipo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #coordinacion .equipo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================
   38.4. TABLETS VERTICALES
   Hasta 900 px
========================================================== */

@media (max-width: 900px) {

    /* Franja superior */

    .topbar {
        padding: 8px 4%;
        font-size: 10.5px;
        letter-spacing: 1px;
    }

    /* Portada */

    .hero {
        min-height: 480px;
    }

    .hero-content {
        padding: 54px 0;
    }

    .hero p {
        font-size: 16px;
    }

    /* Secciones */

    section.content {
        padding: 58px 0;
    }

    /* Características */

    .features-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    /* Quiénes somos */

    .about-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .about-grid > img {
        height: 300px;
    }

    /* Organización */

    .coord-grid,
    .org-grid {
        grid-template-columns: 1fr;
    }

    .coord-grid .coord-card:first-child {
        grid-column: auto;
    }

    /* Contacto */

    .contacto-card {
        grid-template-columns: 1fr;
    }

    .contacto-info,
    .contacto-form {
        padding: 30px 22px;
    }

    /* Footer */

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* Biografías */

    .perfil-grid {
        grid-template-columns: 1fr;
    }

    .perfil-lateral {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .perfil-contenido {
        padding: 28px;
    }

    .perfil-contenido h2 {
        font-size: 25px;
    }

    /* Pulsioxímetro */

    .demo-electronica-wrap .oxi-escena {
        height: 440px;
        min-height: 440px;
    }

    .demo-electronica-wrap .oxi-pinza {
        top: 45px;
        right: 50%;
        left: auto;

        transform: translateX(50%);

        width: 260px;
        height: 160px;
    }

    .demo-electronica-wrap .oxi-dedo {
        left: 60px;
        top: 300px;
    }

    /* Prótesis */

    .prot-juego {
        grid-template-columns: 1fr;
    }

    .prot-visor {
        width: 100%;
        max-width: 570px;
        margin: 0 auto;
    }

    .prot-controles {
        width: 100%;
    }

    /* Hidrogeles */

    .hidro-juego {
        grid-template-columns: 1fr;
    }

    .hidro-visor {
        width: 100%;
        max-width: 570px;
        margin: 0 auto;
    }

}


/* ==========================================================
   38.5. TABLETS PEQUEÑAS
   Hasta 800 px
========================================================== */

@media (max-width: 800px) {

    /* Títulos ingleses */

    .titulo-ingles {
        font-size: clamp(24px, 4vw, 38px);
    }

    .titulo-ingles span {
        white-space: normal;
    }

    /* Tarjetas del equipo */

    #coordinacion .equipo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Etapas de cómo trabajamos */

    .process {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Tecnologías */

    .soluciones-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Imágenes de las etapas */

    .step-contenido-visual {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-imagen {
        height: 240px;
    }

    /* Buscador */

    .btn-filtros {
        display: inline-flex;
    }

    /* Filtros ocultos hasta pulsar el botón */

    .filtros {
        display: none;
    }

    .filtros.abiertos {
        display: grid;
    }

    .buscador {
        margin-top: -34px;
        padding: 16px;
    }

    /* Casos */

    .caso-lista {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================================
   38.6. PANTALLAS DE HASTA 700 px
========================================================== */

@media (max-width: 700px) {

    /* Juegos interactivos */

    .demo-ra-box,
    .imp-panel,
    .demo-electronica-box,
    .plan-panel,
    .prot-panel,
    .hidro-panel {
        padding: 16px;
    }

    /* Títulos de juegos */

    .demo-ra-info h4 {
        font-size: 24px;
    }

    .imp-encabezado h4 {
        font-size: 23px;
    }

    /* Etapas impresión 3D */

    .imp-etapa {
        padding: 10px 5px;
        font-size: 10px;
    }

    /* Etapas prótesis */

    .prot-paso {
        padding: 10px 5px;
        font-size: 10px;
    }

    /* Etapas hidrogel */

    .hidro-etapa {
        padding: 10px 5px;
        font-size: 10px;
    }

    /* Modal de casos */

    .dlg-in {
        padding: 26px 20px 22px;
    }

    .dlg-ficha {
        grid-template-columns: 1fr;
    }

    /* Galerías */

    .dlg-galeria .principal {
        max-height: 300px;
    }

}


/* ==========================================================
   38.7. TELÉFONOS MÓVILES
   Hasta 600 px
========================================================== */

@media (max-width: 600px) {

    /* Contenedor */

    .container {
        width: 92%;
    }

    /* Portada */

    .hero {
        min-height: 0;
    }

    .hero-content {
        padding: 55px 0;
    }

    .hero h1 {
        font-size: clamp(30px, 8vw, 42px);
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 15px;
    }

    /* Botones portada */

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Portadas interiores */

    .hero-casos .hero-content,
    .perfil-hero .hero-content {
        padding: 45px 0;
    }

    /* Títulos de sección */

    .section-heading h2 {
        font-size: 27px;
    }

    /* Tarjetas */

    .card-grid {
        grid-template-columns: 1fr;
    }

    /* Casos destacados */

    .casos-ver-todos .btn {
        width: 100%;
        max-width: 350px;
    }

    /* Quiénes somos */

    .about-grid > img {
        height: 250px;
    }

    /* Datos */

    .coord-datos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dato {
        padding: 16px;
    }

    .dato b {
        font-size: 22px;
    }

    /* Equipo */

    .equipo-grid,
    .miembros-grid,
    #coordinacion .equipo-grid {
        grid-template-columns: 1fr;
    }

    /* Biografías */

    .perfil-contenido {
        padding: 22px;
    }

    .perfil-contenido h2 {
        font-size: 23px;
    }

    .perfil-lateral {
        padding: 22px;
    }

    .perfil-areas span {
        font-size: 12px;
    }

    /* Proceso */

    .process {
        grid-template-columns: 1fr;
    }

    .step {
        min-height: 0;
        padding: 16px;
    }

    .process-detail {
        padding: 20px;
    }

    /* Seis tecnologías */

    .soluciones-grid {
        grid-template-columns: 1fr;
    }

    .solucion-item {
        padding: 17px;
    }

    /* Imagen de etapas */

    .step-imagen {
        height: 200px;
    }

    /* Casos clínicos */

    .caso-lista {
        grid-template-columns: 1fr;
    }

    /* Filtros */

    .filtros.abiertos {
        grid-template-columns: 1fr;
    }

    .busca-linea {
        gap: 8px;
    }

    .btn-filtros {
        padding: 0 12px;
        font-size: 13px;
    }

    /* Formulario */

    .form-fila {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Botones de contacto */

    .ci-acciones .btn {
        flex: 1 1 100%;
    }

    /* Banner de Instagram */

    .instagram-banner {
        padding: 55px 20px;
    }

    .instagram-banner h2 {
        font-size: 30px;
    }

    .instagram-banner p {
        font-size: 14px;
    }

    .instagram-banner .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Logotipos institucionales */

    .logos-institucionales {
        flex-wrap: wrap;
        gap: 10px;
    }

    .logos-institucionales img {
        width: 75px;
        height: 50px;
    }

    /* Pulsioxímetro */

    .demo-electronica-wrap .oxi-instruccion {
        font-size: 21px;
    }

    .demo-electronica-wrap .oxi-escena {
        height: 430px;
        min-height: 430px;
    }

    .demo-electronica-wrap .oxi-pinza {
        width: 230px;
        height: 150px;
        top: 45px;
    }

    .demo-electronica-wrap .oxi-dedo {
        width: 135px;
        height: 54px;
        left: 30px;
        top: 300px;
    }

    .demo-electronica-wrap .oxi-dedo-uña {
        width: 36px;
        height: 18px;
    }

    .demo-electronica-wrap .oxi-pantalla {
        width: 95px;
        top: 15px;
        left: 12px;
        padding: 10px;
    }

    .demo-electronica-wrap .oxi-valor span {
        font-size: 22px;
    }

    .demo-electronica-wrap .oxi-drop {
        width: 110px;
        height: 85px;
        right: 10px;
        top: 30px;
    }

    .demo-electronica-wrap .oxi-drop::after {
        font-size: 11px;
    }

    /* Planificación quirúrgica */

    .plan-etapa {
        padding: 10px 5px;
        font-size: 11px;
    }

    .plan-instruccion,
    .prot-instruccion,
    .hidro-instruccion {
        padding: 14px;
    }

    .plan-instruccion strong,
    .prot-instruccion strong,
    .hidro-instruccion strong {
        font-size: 16px;
    }

    .plan-visor {
        padding: 5px;
    }

    .plan-visor-cabecera,
    .plan-visor-pie {
        padding: 9px;
        font-size: 9px;
    }

    .plan-tumor-contorno {
        border-width: 2px;
    }

    .plan-tumor-contorno span {
        padding: 4px 6px;
        font-size: 8px;
    }

    .plan-opciones {
        grid-template-columns: 1fr;
    }

    .plan-eleccion {
        padding: 16px;
    }

    .plan-eleccion h5 {
        font-size: 18px;
    }

    /* Prótesis */

    .prot-visor {
        padding: 8px;
    }

    .prot-controles {
        padding: 18px;
    }

    .prot-controles h5 {
        font-size: 19px;
    }

    /* Hidrogeles */

    .hidro-visor {
        padding: 8px;
    }

    .hidro-controles {
        padding: 18px;
    }

    .hidro-controles h5 {
        font-size: 19px;
    }

}


/* ==========================================================
   38.8. MÓVILES PEQUEÑOS
   Hasta 400 px
========================================================== */

@media (max-width: 400px) {

    /* Portada */

    .hero h1 {
        font-size: 29px;
    }

    /* Texto superior */

    .eyebrow {
        font-size: 10px;
        letter-spacing: 1.6px;
    }

    /* Selector de idiomas */

    .lang a,
    .lang span {
        padding: 7px 10px;
    }

    /* Títulos de biografías */

    .perfil-contenido h2 {
        font-size: 21px;
    }

    /* Datos destacados */

    .coord-datos {
        grid-template-columns: 1fr;
    }

    /* Etapas de los juegos */

    .imp-etapas,
    .prot-progreso,
    .hidro-etapas {
        gap: 4px;
    }

    .imp-etapa,
    .prot-paso,
    .hidro-etapa {
        font-size: 9px;
        padding: 10px 4px;
    }

    /* Galería de casos */

    .miniaturas img {
        width: 60px;
        height: 46px;
    }

    /* Hidrogeles */

    .hidro-concentraciones {
        gap: 5px;
    }

    .hidro-concentracion {
        padding: 12px 5px;
        font-size: 12px;
    }

}


/* ==========================================================
   39. ACCESIBILIDAD
========================================================== */


/* ==========================================================
   39.1. ELEMENTOS INTERACTIVOS
========================================================== */

/* Destacar los elementos cuando se usa el teclado */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--turquesa);
    outline-offset: 3px;
}


/* ==========================================================
   39.2. EVITAR DESBORDAMIENTO HORIZONTAL
========================================================== */

/* Imágenes adaptables */

img,
svg {
    max-width: 100%;
}

/* Contenido de tarjetas */

.card,
.persona-card,
.coord-card,
.perfil-contenido,
.contacto-card,
.process-detail {
    min-width: 0;
}

/* Los textos largos pueden partirse */

.perfil-contenido,
.card-body,
.contacto-info,
.contacto-form {
    overflow-wrap: break-word;
}


/* ==========================================================
   39.3. RESPETAR LA PREFERENCIA DE MOVIMIENTO REDUCIDO
========================================================== */

/*
   Si el usuario ha desactivado las animaciones
   en su dispositivo, reducimos los movimientos.
*/

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}

/* Los nodos deben recibir los clics */
.red-interactiva .red-nodo {
    position: absolute;
    z-index: 10;
    pointer-events: auto;
}

/* Las conexiones no deben bloquear los clics */
.red-conexiones {
    pointer-events: none;
}


/* ==========================================
   UPAM3D · ESQUEMA CIRCULAR EN MÓVIL
========================================== */

@media (max-width: 700px) {

    /* Contenedor del esquema */

    .red-interactiva {
        position: relative;
        display: block;
        width: 100%;
        max-width: 390px;
        height: 430px;
        margin: 20px auto 35px;
        padding: 0;
        overflow: visible;
        isolation: isolate;
    }

    /* Círculo que conecta las disciplinas */

    .red-interactiva::before {
        content: "";
        position: absolute;
        width: 78%;
        aspect-ratio: 1 / 1;
        height: auto;
        left: 50%;
        top: 46%;
        transform: translate(-50%, -50%);
        border: 1.5px solid #d0e8ef;
        border-radius: 50%;
        pointer-events: none;
        z-index: 0;
    }

    /* Ocultamos el SVG de escritorio */
    .red-conexiones {
        display: none;
    }

    /* Fotografía circular central */

    .red-interactiva .red-centro {
        position: absolute;
        left: 50%;
        top: 46%;
        right: auto;
        bottom: auto;

        display: block;
        width: 47%;
        height: auto;
        aspect-ratio: 1 / 1;

        margin: 0;
        transform: translate(-50%, -50%);

        border-radius: 50%;
        z-index: 2;
    }

    /* Disciplinas alrededor del círculo */

    .red-interactiva .red-nodo {
        position: absolute;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        width: 105px;
        height: auto;
        min-height: 0;
        padding: 4px;
        gap: 5px;

        background: transparent;
        border: none;
        border-radius: 0;

        text-align: center;
        opacity: 0.45;
        transform: translate(-50%, -50%);
        z-index: 3;
    }

    /* Disciplina seleccionada */

    .red-interactiva .red-nodo.activo {
        background: transparent;
        border: none;
        opacity: 1;
    }

    /* Círculos pequeños con iconos */

    .red-interactiva .red-nodo-icono {
        width: 54px;
        height: 54px;
        flex-shrink: 0;
        border-radius: 50%;
    }

    .red-interactiva .red-nodo-icono svg {
        width: 25px;
        height: 25px;
    }

    /* Nombres */

    .red-interactiva .red-nodo-texto {
        align-items: center;
        gap: 1px;
        min-width: 0;
    }

    .red-interactiva .red-nodo-texto small {
        font-size: 10px;
    }

    .red-interactiva .red-nodo-texto strong {
        font-size: 12px;
        line-height: 1.2;
    }

    .red-interactiva .red-nodo-texto > span {
        font-size: 9px;
        line-height: 1.2;
    }

    .red-interactiva .red-nodo-texto * {
        background: transparent;
        margin: 0;
    }

    /* POSICIONES */

 
/* POSICIONES MÓVIL - SEIS DISCIPLINAS */

.red-interactiva .red-ingenieria {
    left: 19%;
    top: 13%;
    width: 100px;
}

.red-interactiva .red-academia {
    left: 81%;
    top: 13%;
    width: 100px;
}

.red-interactiva .red-radiologia {
    left: 12%;
    top: 52%;
    width: 100px;
}

.red-interactiva .red-enfermeria {
    left: 88%;
    top: 52%;
    width: 100px;
}

.red-interactiva .red-tsid {
    left: 25%;
    top: 88%;
    width: 100px;
}

.red-interactiva .red-serviciosclinicos {
    left: 75%;
    top: 88%;
    width: 115px;
}

    /* Etiqueta UPAM3D sobre la fotografía */

    .red-centro-sello {
        min-width: 85px;
        padding: 5px 10px 8px;
        font-size: 11px;
    }
}


/* ==========================================
   AJUSTES DE LEGIBILIDAD DE LA RED UPAM3D
========================================== */

.red-interactiva .red-nodo {
    z-index: 10;
    pointer-events: auto;
}

.red-interactiva .red-nodo-texto {
    min-width: 0;
}

.red-interactiva .red-nodo-texto strong {
    overflow-wrap: anywhere;
}

.red-conexiones {
    pointer-events: none;
}

@media (max-width: 700px) {

    .red-interactiva {
        height: 430px;
    }

    .red-interactiva .red-nodo {
        gap: 5px;
        padding: 3px;
    }

    .red-interactiva .red-nodo-icono {
        width: 48px;
        height: 48px;
    }

    .red-interactiva .red-nodo-texto strong {
        font-size: 11px;
        line-height: 1.2;
    }

    .red-interactiva .red-nodo-texto > span {
        font-size: 9px;
    }

    .red-interactiva .red-centro {
        width: 43%;
    }
}


/* ==========================================
   UPAM3D - ESQUEMA DE SEIS DISCIPLINAS
   CORRECCION DE POSICIONES Y CIRCULO
========================================== */

/* ESCRITORIO */

@media (min-width: 701px) {

    .red-interactiva {
        position: relative;
        width: 100%;
        max-width: 1120px;
        height: 650px;
        margin: 20px auto 45px;
        overflow: visible;
    }

    /* Circunferencia perfectamente redonda */
    .red-interactiva::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 590px;
        height: 590px;
        max-width: 58%;
        max-height: 90%;
        transform: translate(-50%, -50%);
        border: 1.5px solid #d2e8ef;
        border-radius: 50%;
        pointer-events: none;
        z-index: 0;
    }

    /* Evitar que aparezca otra circunferencia */
    .red-conexiones .red-anillo {
        display: none;
    }

    /* Las lineas SVG quedan por debajo */
    .red-conexiones {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 1;
    }

    /* Fotografia central */
    .red-interactiva .red-centro {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 34%;
        max-width: 370px;
        aspect-ratio: 1;
        transform: translate(-50%, -50%);
        z-index: 2;
    }

    /* Ajustes comunes de los seis nodos */
    .red-interactiva .red-nodo {
        position: absolute;
        width: 225px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        transform: translate(-50%, -50%);
        z-index: 5;
        pointer-events: auto;
    }

    .red-interactiva .red-nodo-icono {
        width: 76px;
        height: 76px;
        flex-shrink: 0;
    }

    .red-interactiva .red-nodo-texto {
        min-width: 0;
        position: relative;
        z-index: 6;
    }

    .red-interactiva .red-nodo-texto strong {
        font-size: 17px;
        line-height: 1.3;
    }

    .red-interactiva .red-nodo-texto > span {
        font-size: 12px;
    }

    /* ARRIBA IZQUIERDA */
    .red-interactiva .red-ingenieria {
        left: 16%;
        top: 18%;
    }

    /* ARRIBA DERECHA */
    .red-interactiva .red-academia {
        left: 84%;
        top: 18%;
    }

    /* CENTRO IZQUIERDA */
    .red-interactiva .red-radiologia {
        left: 10%;
        top: 50%;
    }

    /* CENTRO DERECHA */
    .red-interactiva .red-enfermeria {
        left: 90%;
        top: 50%;
    }

    /* ABAJO IZQUIERDA */
    .red-interactiva .red-tsid {
        left: 25%;
        top: 83%;
    }

    /* ABAJO DERECHA */
    .red-interactiva .red-serviciosclinicos {
        left: 75%;
        top: 83%;
    }
}

/* PANTALLAS INTERMEDIAS */

@media (min-width: 701px) and (max-width: 1050px) {

    .red-interactiva {
        height: 560px;
    }

    .red-interactiva::before {
        width: 460px;
        height: 460px;
    }

    .red-interactiva .red-nodo {
        width: 170px;
        gap: 8px;
    }

    .red-interactiva .red-nodo-icono {
        width: 58px;
        height: 58px;
    }

    .red-interactiva .red-nodo-texto strong {
        font-size: 14px;
    }

    .red-interactiva .red-nodo-texto > span {
        font-size: 10px;
    }
}

/* ==========================================
   MOVIL - MANTENER ESQUEMA CIRCULAR
========================================== */

@media (max-width: 700px) {

    .red-interactiva {
        position: relative;
        display: block;
        width: 100%;
        max-width: 390px;
        height: 440px;
        margin: 25px auto 35px;
        padding: 0;
        overflow: visible;
        isolation: isolate;
    }

    /* Circulo pequeño en movil */
    .red-interactiva::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 46%;
        width: 76%;
        height: auto;
        aspect-ratio: 1;
        transform: translate(-50%, -50%);
        border: 1.5px solid #d2e8ef;
        border-radius: 50%;
        pointer-events: none;
        z-index: 0;
    }

    /* En movil ocultamos las lineas SVG */
    .red-conexiones {
        display: none;
    }

    /* Fotografia central */
    .red-interactiva .red-centro {
        position: absolute;
        left: 50%;
        top: 46%;
        right: auto;
        bottom: auto;
        width: 45%;
        height: auto;
        aspect-ratio: 1;
        margin: 0;
        transform: translate(-50%, -50%);
        z-index: 2;
    }

    /* Nodos alrededor de la fotografia */
    .red-interactiva .red-nodo {
        position: absolute;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 104px;
        min-width: 0;
        min-height: 0;
        height: auto;
        padding: 3px;
        gap: 5px;
        border: none;
        border-radius: 0;
        background: transparent;
        text-align: center;
        transform: translate(-50%, -50%);
        z-index: 5;
        pointer-events: auto;
    }

    .red-interactiva .red-nodo.activo {
        background: transparent;
        border: none;
        opacity: 1;
    }

    .red-interactiva .red-nodo-icono {
        width: 46px;
        height: 46px;
        flex-shrink: 0;
    }

    .red-interactiva .red-nodo-icono svg {
        width: 23px;
        height: 23px;
    }

    .red-interactiva .red-nodo-texto {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px;
        width: 100%;
        min-width: 0;
    }

    .red-interactiva .red-nodo-texto small {
        font-size: 10px;
    }

    .red-interactiva .red-nodo-texto strong {
        font-size: 11px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .red-interactiva .red-nodo-texto > span {
        font-size: 9px;
        line-height: 1.2;
    }

    .red-interactiva .red-nodo-texto * {
        background: transparent;
        margin: 0;
    }

    /* Distribucion de los seis nodos */

    .red-interactiva .red-ingenieria {
        left: 19%;
        top: 13%;
        width: 104px;
    }

    .red-interactiva .red-academia {
        left: 81%;
        top: 13%;
        width: 104px;
    }

    .red-interactiva .red-radiologia {
        left: 12%;
        top: 48%;
        width: 104px;
    }

    .red-interactiva .red-enfermeria {
        left: 88%;
        top: 48%;
        width: 104px;
    }

    .red-interactiva .red-tsid {
        left: 25%;
        top: 82%;
        width: 104px;
    }

    .red-interactiva .red-serviciosclinicos {
        left: 75%;
        top: 82%;
        width: 112px;
    }

    /* PRESCRIPTORES - ORDENADOR */
@media (min-width: 701px) {
    .red-interactiva .red-prescriptores {
        left: 50%;
        top: 5%;
        transform: translate(-50%, -50%);
    }
}

@media (min-width: 701px) {
    .red-interactiva .red-prescriptores {
        left: 50%;
        top: 3%;
        transform: translate(-50%, -50%);
    }
}
    .red-centro-sello {
        min-width: 75px;
        padding: 5px 10px 8px;
        font-size: 10px;
    }

    /* Panel inferior */
    .red-panel {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 24px 20px;
    }

    .red-controles {
        justify-content: center;
    }
}
/* CORREGIR POSICIÓN DE PRESCRIPTORES */

@media (min-width: 701px) {

    .red-interactiva .red-nodo.red-prescriptores {
        position: absolute;
        left: 50%;
        top: 5%;
        right: auto;
        bottom: auto;
        width: 220px;
        transform: translate(-50%, -50%);
        z-index: 10;
    }

}
.red-punto {
    fill: #b9dbe4;
    opacity: 0.95;
    transition: all 0.25s ease;
}

.red-punto.activo {
    fill: #1fb4c7;
}

/* Evitar que las conexiones tapen los nombres */

.red-conexiones {
    pointer-events: none;
}

.red-interactiva .red-nodo {
    z-index: 10;
}

.red-interactiva .red-nodo-texto {
    position: relative;
    z-index: 11;
}

/* Más separación entre icono y texto */
.red-interactiva .red-nodo {
    gap: 18px;
}

/* Ajustes de textos largos en inglés */
html[lang="en"] .red-interactiva .red-nodo-texto strong {
    font-size: 16px;
    line-height: 1.3;
}

html[lang="en"] .red-interactiva .red-prescriptores {
    width: 250px;
}

html[lang="en"] .red-interactiva .red-serviciosclinicos {
    width: 235px;
}
/* ==========================================================
   FIN DEL ARCHIVO ESTILOS.CSS

   UPAM3D
   Hospital General Universitario Gregorio Marañón

   Estilos compartidos:
   - Español
   - Inglés

   SECCIONES COMPLETADAS:

   01. Variables y estilos básicos
   02. Cabecera y navegación
   03. Botones
   04. Portada
   05. Portadas interiores y banner principal quirófano
   06. Características
   07. Secciones generales
   08. Tarjetas
   09. Casos destacados
   10. Quiénes somos
   11. Organización
   12. Datos destacados
   13. Etiquetas
   14. Cómo trabajamos
   15. Soluciones interactivas
   16. Realidad aumentada
   17. Impresión 3D
   18. Pulsioxímetro
   19. Planificación quirúrgica
   20. Prótesis personalizadas
   21. Hidrogeles
   22. Nuestro equipo
   23. Biografías
   24-31. Casos clínicos y galerías
   32. Banners
   33. Preguntas frecuentes
   34-35. Contacto
   36. Instagram
   37. Footer
   38. Responsive
   39. Accesibilidad

========================================================== */