/* ── 1. FUENTE MONTSERRAT GLOBAL ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');
 
:root {
    --blanco: #fcfcfc;
    --negro: rgb(63, 63, 62);
    --gris: #757575;
    --grisOscuro: rgb(63, 63, 62);
    --rojo: rgb(199, 19, 49);
    --rojoIconos: rgb(194, 19, 48);
    --rojoIconosClaro: rgb(219, 5, 40);
}

body,
body * {
    font-family: 'Montserrat', sans-serif;
}

/* IMAGEN PRINCIPAL */

.imagenPrincipal {
    padding: 0 2rem;
    height: 43rem;
    overflow: hidden;
}

.imagenPrincipal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 20% 73%;
    display: block;
    opacity: 0;
    transition: opacity 5s ease;
}

.imagenPrincipal img.cargada {
    opacity: 1;
}

/* ANIMACIÓN PARA IMAGENES */

/* Estado base - necesario para la transición */
.kenburns-top-left {
    transform-origin: 16% 16%;
    transform: scale(1) translate(0, 0);
    will-change: transform;
}

/* Estado activo - aplica la animación */
.kenburns-top-left-active {
    animation: kenburns-top-left 5s ease-out forwards;
}

@keyframes kenburns-top-left {
    0% {
        transform: scale(1) translate(0, 0);
        transform-origin: 16% 16%;
    }

    100% {
        transform: scale(1.2) translate(-20px, -15px);
        transform-origin: top left;
    }
}

@media (min-width: 961px) {
    .imagenPrincipal img {
        border-radius: 4rem 4rem 0 0;
    }
}

.Gestion {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 50px;
    padding: 60px 8%;}

/* Columna derecha */
.info {
    flex: 1.5;
}

.info h1 {
    font-size: 42px;
    margin-bottom: 50px;
    color: var(--grisOscuro);
    border-bottom: 3px solid #b31217; 
    display: inline-block;
    padding-bottom: 4px;

}

.info h3 {
    font-weight: normal;
    margin-top: 15px;
    margin-bottom: 20px;
    color: #666;

    column-span: all;
}

.info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
}

.texto-columnas {
    column-count: 2;   /* Número de columnas */
    column-gap: 50px;   /* Espacio entre columnas */
    text-align: justify;
}

.texto-columnas p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;

}

/* ════════════════════════════════════════════════
   TEXTO DEL PANEL — ajustes responsive
════════════════════════════════════════════════ */
.gsa-panel__texto {
    margin-top: 0.5rem;
    padding: 0 2rem;
}

.gsa-panel__titulo {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--grisOscuro);
    margin-bottom: 0.6rem;
}
 
.gsa-panel__separador {
    width: 100%;
    height: 0.18rem;
    background: var(--rojoIconos);
    border-radius: 1rem;
    margin-bottom: 1.6rem;
}

.gsa-panel__texto {
    margin-top: 0.5rem;
    padding: 0 2rem;        /* separación de los bordes en escritorio */
    margin-bottom: 3rem;
}

.gsa-panel__columnas {
    display: block;
    column-count: 2;
    column-gap: 2.5rem;
}

.gsa-panel__parrafo {
    font-family: 'Montserrat', sans-serif;
    color: var(--grisOscuro);
    text-align: justify;
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.75;
}
/* ── Párrafos de panel ── */
.gsa-panel__parrafo,
.gsa-panel__parrafo p {
    font-size: 1.6rem;
    line-height: 1.75;
}

/* Especificidad doble para ganar sobre causadasMU.css (cargado después) */
.gsa-tabs .gsa-panel__parrafo,
.gsa-tabs .gsa-panel__parrafo p {
    font-size: 1.6rem;
}

/* ── Intro: mismos estilos que la sección Gestion ── */
.gsa-panel__texto--intro {
    max-width: 1200px;
    margin: 60px 2rem;
    box-sizing: border-box;
}

.gsa-panel__texto--intro .gsa-panel__titulo {
    font-size: 42px;
    margin-bottom: 50px;
    border-bottom: 3px solid #b31217;
    display: inline-block;
    padding-bottom: 4px;
}

.gsa-panel__texto--intro .gsa-panel__separador {
    display: none;
}

.gsa-panel__texto--intro .gsa-panel__columnas {
    column-count: 2;
    column-gap: 50px;
    display: block;
}

.gsa-panel__texto--intro .gsa-panel__parrafo {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: inherit;
}

/* Tablet (≤ 800px): una columna, izquierda arriba, derecha abajo */
@media (max-width: 800px) {
    .gsa-panel__texto {
        padding: 0 1.5rem;
    }

    .gsa-panel__columnas {
        column-count: 1;
        column-gap: 1.2rem;
    }

    .gsa-panel__texto--intro {
        margin: 40px 1rem;
    }

    .gsa-panel__texto--intro .gsa-panel__columnas {
        column-count: 1;
    }

}

/* Móvil (≤ 599px) */
@media (max-width: 599px) {
    .gsa-panel__texto {
        padding: 0 1.5rem;
    }

    .gsa-panel__texto--intro {
        margin: 30px 1rem;
    }
}

/* Escritorio grande: centrado igual que .gsa-tabs */
@media (min-width: 1200px) {
    .gsa-panel__texto--intro {
        margin-left: auto;
        margin-right: auto;
    }
}



/*===Proceso de servicios===*/
.procedimiento-uam {
    max-width: 1100px;
    margin: 50px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.titulo-seccion {
    font-size: 48px;
    font-weight: bold;
    color: var(--grisOscuro);
    margin-bottom: 40px;
}

/* Stepper */
.stepper-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}


.botones-pasos {
    position: relative;
    z-index: 2;
    background: #f4f4f4;
    padding: 0 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Si la pantalla es chica, se ponen uno abajo de otro */
    justify-content: center;
}

.step-btn {
   width: auto !important; /* Cambiado de 320px a auto */
    padding: 0 25px; /* Espacio interno */
    height: 50px;
    border-radius: 8px; /* Corregido de 8% a 8px para que se vea como botón */
    border: 2px solid #a51d2d;
    background: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.step-btn.active {
    background: #a51d2d;
    color: white;
}

/* Cuadro con bordes en L */
.cuadro-tramite {
    position: relative;
    padding: 48px 90px;
}

/* Esquina superior izquierda */
.cuadro-tramite::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 120px;
    background-color: #a51d2d;
}

/* Esquina inferior derecha */
.cuadro-tramite::after {
    content: "";
    position: absolute;
    bottom: -25px;
    right: 0;
    width: 2px;
    height: 120px;
    background-color: #a51d2d;
}

.step-content {
    display: none; 
    width: 100%;
    margin-top: 30px;
}

.step-content.active {
    display: block !important;
    animation: simpleFade 0.5s ease-in-out;
}
.grid-dos-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* Elementos de contacto */
.bloque-contacto {
    margin-bottom: 25px;
}

/* --- Ícono SVG genérico --- */
.ico {
  width: 14px;
  height: 14px;
  fill: #a51d2d;
  flex-shrink: 0;
}

.nombre-persona {
    font-size: 19px;
    color: #666;
    display: block;
}

.linea-roja-cargo {
    border-top: 2px solid #a51d2d;
    margin-top: 5px;
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hr-roja {
    height: 2px;
    background: #a51d2d;
    margin: 10px 0 20px 0;
}

.datos-flex {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}


.espaciado-top { margin-top: 30px; }

@keyframes simpleFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 850px) {
    .texto-columnas {
        column-count: 1; /* En móviles una sola columna */
    }

/* Galeria de fotos*/
.galeria-contenedor {
    position: relative;
    width: 80%;
    margin: 0 auto 20px auto;
}
.galeria__carrusel {
    position: relative;
    width: 100%;
    height: auto; /* Quitamos el alto fijo */
    aspect-ratio: 16 / 9; /* Proporción panorámica, puedes usar 4/3 o la que gustes */
    overflow: hidden;
    border-radius: 15px;
}

.galeria__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease; /* Esto hace que el cambio sea suave */
    z-index: 1;
}

.galeria__slide.activo {
    opacity: 1;
    z-index: 2;
}

.galeria__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Puntitos */
.galeria__dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #bbb;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.galeria__dot.activo {
    background: #a51d2d; /* Color rojo UAM */
}
.info-paso {
    padding: 20px;
    width: 100%;
}

.galeria__progreso {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--rojo); /* O el color rojo UAM */
    z-index: 10;
    width: 0%; /* Empieza en cero */
}}

/* ── Tarjetas de datos de movilidad ── */
.mov-datos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0 1rem;
}

.mov-dato {
    background: linear-gradient(to right, rgba(226,226,226,1) 0%, #ffffff 70%);
    border: 0.12rem solid #ffffff;
    border-radius: 1.2rem;
    box-shadow: 0.1rem 0.1rem 1rem 0.1rem rgb(199,198,198);
    padding: 1.8rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.6rem;
    min-height: 12rem;
}

.mov-dato__numero {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--grisOscuro, rgb(63,63,62));
    margin: 0;
    line-height: 1.2;
}

.mov-dato__unidad {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--grisOscuro, rgb(63,63,62));
}

.mov-dato__separador {
    width: 100%;
    height: 0.18rem;
    background: linear-gradient(to right, rgb(75,182,222), rgb(33,33,116));
    border-radius: 1rem;
}

.mov-dato__texto {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.9rem;
    color: var(--grisOscuro, rgb(63,63,62));
    margin: 0;
    line-height: 1.4;
}

/* Tablet (600–1049px): 2 columnas */
@media (min-width: 600px) and (max-width: 1049px) {
    .mov-datos {
        grid-template-columns: repeat(2, 1fr);
    }

    .mov-dato__texto {
        font-size: 1.5rem;
    }
}

/* Móvil (≤ 599px): 1 columna */
@media (max-width: 599px) {
    .mov-datos {
        grid-template-columns: 1fr;
        margin: 1.5rem 0 0.5rem;
    }

    .mov-dato {
        min-height: auto;
        padding: 1.4rem 1.2rem 1.2rem;
    }

    .mov-dato__numero {
        font-size: 2rem;
    }

    .mov-dato__unidad {
        font-size: 2rem;
    }

    .mov-dato__texto {
        font-size: 1.4rem;
    }
}

/* ══════════════════════════════════════════════════════════
   CARRUSEL MÓVIL DE TARJETAS
══════════════════════════════════════════════════════════ */

.mov-carrusel { display: none; }

@media (max-width: 800px) {
    .mov-carrusel {
        display: block;
        margin: 1rem 0 3rem;
    }
    .mov-tarjeta {
        display: none;
        animation: gsaPanelEntrada 0.35s ease;
    }
    .mov-tarjeta.activa { display: block; }

    .mov-carrusel__nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.2rem;
        margin-top: 1.8rem;
        padding: 0 1rem;
    }
    .mov-carrusel__btn {
        flex-shrink: 0;
        width: 2.8rem;
        height: 2.8rem;
        border-radius: 50%;
        border: 0.14rem solid var(--rojoIconos, rgb(194,19,48));
        background: #ffffff;
        color: var(--rojoIconos, rgb(194,19,48));
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease, color 0.2s ease;
    }
    .mov-carrusel__btn:hover {
        background: var(--rojoIconos, rgb(194,19,48));
        color: #ffffff;
    }
    .mov-carrusel__btn:disabled {
        opacity: 0.35;
        cursor: default;
        pointer-events: none;
    }
    .mov-carrusel__btn svg {
        width: 1.1rem;
        height: 1.1rem;
        stroke: currentColor;
    }
    .mov-carrusel__dots {
        display: flex;
        gap: 0.55rem;
        align-items: center;
    }
    .mov-carrusel__dot {
        width: 0.65rem;
        height: 0.65rem;
        border-radius: 50%;
        background: #cccccc;
        border: none;
        cursor: pointer;
        padding: 0;
        transition: background 0.22s ease, transform 0.2s ease;
    }
    .mov-carrusel__dot.activo {
        background: var(--rojoIconos, rgb(194,19,48));
        transform: scale(1.3);
    }
    .mov-tarjeta .mov-datos {
        grid-template-columns: 1fr 1fr;
        margin: 1.5rem 0 0.5rem;
    }
}

/* ── Todas las tarjetas .mov-dato igual de altas ── */
.mov-datos {
    align-items: stretch;   /* ya debería estarlo, pero refuerza */
}

.mov-dato {
    justify-content: flex-start;   /* contenido desde arriba */
}

/* ── Variante con imagen en la parte superior ── */
.mov-dato--con-imagen {
    overflow: hidden;
}

.mov-dato__imagen-wrap {
    width: 100%;
    margin: 0 0 1.2rem;
    height: 10rem;
    overflow: hidden;
    flex-shrink: 0;
    background: #d4d4d4;
    border-radius: 0.8rem;
}

.mov-dato__imagen-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* En móvil ajustar altura */
@media (max-width: 599px) {
    .mov-dato__imagen-wrap {
        height: 8rem;
    }
}

/* ── Icono GIF en tarjetas .mov-dato ── */
.mov-dato__icono {
    display: block;
    width: 100%;
    height: auto;
}

/* Tablet (600–1049px) */
@media (min-width: 600px) and (max-width: 1049px) {
    .mov-dato__icono {
        width: 16rem;
        height: 16rem;
        object-fit: contain;
        margin: 0 auto;
    }
}

/* Móvil (≤ 599px) */
@media (max-width: 599px) {
    .mov-dato__icono {
        width: 14rem;
        height: 14rem;
        object-fit: contain;
        margin: 0 auto;
    }
}

/* Carrusel móvil (≤ 800px) */
@media (max-width: 800px) {
    .mov-tarjeta .mov-dato__icono {
        width: 14rem;
        height: 14rem;
        object-fit: contain;
        margin: 0 auto;
    }
}