@font-face {
    font-family: "Manrope";
    src: url(../fonts/manrope-v20-latin-400.woff2) format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url(../fonts/manrope-v20-latin-600.woff2) format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url(../fonts/manrope-v20-latin-700.woff2) format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Manrope";
    src: url(../fonts/manrope-v20-latin-800.woff2) format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /*--azul: #007fa8;*/
    --azul: #00769c;
    --azul-oscuro: #005f7e;
    --azul-claro: #e6f3f7;
    --naranja: #f39222;
    --naranja-antetitulo: #944300;
    --naranja-fondo-oscuro: #ffd099;
    --naranja-hover: #d97c12;
    /* naranja más oscuro para botones con texto blanco (se lee bien) */
    --naranja-boton: #b35900;
    --naranja-boton-hover: #944300;
    --texto: #1f2933;
    /*--texto-2: #52606d;*/
    --texto-2: #4a5764;
    --fondo-2: #f4f7f9;
    --pie: #0f2a36;
    --borde: #e4e9ee;
    --blanco: #ffffff;
    --radio: 12px;
    --sombra: 0 4px 16px rgba(15,42,54,.08);
    --sombra-crece: 0 10px 28px rgba(15,42,54,.14);
    --sombra-boton: 0 4px 12px rgba(15,42,54,.18);
    --ancho: 1140px;

    /* transiciones: misma duración y suavizado en toda la web */
    --duracion: 0.25s;
    --duracion-larga: 0.45s;
    --suavizado: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body {
    font-family: 'Manrope', sans-serif;
    color: var(--texto);
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 1.6;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

a, a:visited {
    text-decoration: none;
    color: var(--azul-oscuro);
    transition: color var(--duracion) var(--suavizado);
}

/* ******************************************************************************************************************************* */
/* ************************************************************ HEADER/NAV ******************************************************* */
/* ******************************************************************************************************************************* */

header {
    position: sticky;
    top: 0;
    background-color: var(--blanco);
    border-bottom: 1px solid var(--borde);
    width: 100%;
    z-index: 1001;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 24px;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;

    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 2rem;

    /* cerrado: fuera de la pantalla y oculto (se oculta al acabar de salir) */
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform var(--duracion-larga) var(--suavizado), visibility 0s linear var(--duracion-larga);

    background-color: var(--blanco);
    z-index: 1001;
}


.menu-nav a {
    font-size: 24px;
    font-weight: 600;
    width: auto;
    text-align: center;
    color: var(--texto);

    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-nav a:not(.boton-naranja):hover {
    color: var(--azul);
}

.menu-nav .texto-azul {
    color: var(--azul);
    font-weight: 800;
}
/* 
body:not(:has(#cursos:target, #quienes-somos:target, #contacto:target)) .menu-nav a[href="index.html"],
.menu-nav a[href="catalogo.html"] {
    color: var(--azul);
    font-weight: 800;
} */

body:has(#cursos:target) .menu-nav a[href="#cursos"],
body:has(#quienes-somos:target) .menu-nav a[href="#quienes-somos"],
body:has(#contacto:target) .menu-nav a[href="#contacto"] {
    color: var(--azul);
    font-weight: 800;
}

body:has(#cursos:target, #quienes-somos:target, #contacto:target) .menu-nav a[href="index.html"]{
    color: var(--texto);
    font-weight: 600;
}

.menu-nav.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform var(--duracion-larga) var(--suavizado), visibility 0s;
}

img {
    height: 40px;
    width: auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img, .footer-img {
    height: 26px;
    width: auto;
    display: block;
}

.hamburguesa {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.hamburguesa span {
    width: 100%;
    height: 3px;
    background-color: var(--texto);
    border-radius: 3px;
    transition: transform var(--duracion-larga) var(--suavizado),
                opacity var(--duracion) var(--suavizado),
                width var(--duracion) var(--suavizado);
    transform-origin: center;

    transform: translateY(0) rotate(0deg);
}

.hamburguesa.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburguesa.active span:nth-child(2) {
    width: 0%;
    opacity: 0;
}

.hamburguesa.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

h1 {
    font-optical-sizing: auto;
    font-weight: 800;
    font-style: normal;
    font-size: 34px;
}

h2, .numeros-azules {
    font-optical-sizing: auto;
    font-weight: 800;
    font-style: normal;
    font-size: 26px;
}

h3 {
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 18px;
}

a.boton-naranja, a.boton-azul, a.boton-blanco, #demo .boton-naranja {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
    border-radius: 30px;
    font-weight: 700;
    padding: 0 24px;
    border: none;
    cursor: pointer;
    transition: background-color var(--duracion) var(--suavizado),
                color var(--duracion) var(--suavizado),
                box-shadow var(--duracion) var(--suavizado),
                transform var(--duracion) var(--suavizado);
}

a.boton-naranja:focus, a.boton-azul:focus, a.boton-blanco:focus, #demo .boton-naranja:focus {
    outline: 3px solid var(--azul);
    outline-offset: 2px;
}

a.boton-naranja, p.boton-naranja, #demo .boton-naranja {
    color: var(--blanco);
    background-color: var(--naranja-boton);
}

p.boton-naranja, #demo .boton-naranja {
    border-radius: 30px;
    font-weight: 700;
    border: none;
    padding: 0 5px;
}

a.boton-naranja:hover, #demo .boton-naranja:hover {
    background-color: var(--naranja-boton-hover);
}

a.boton-azul {
    background-color: var(--azul);
    color: var(--blanco);
}

a.boton-azul:hover {
    background-color: var(--azul-oscuro);
}

a.boton-blanco {
    background-color: var(--fondo-2);
    color: var(--azul);
    border: 1px solid var(--azul-oscuro);
}

a.boton-blanco:hover {
    background-color: var(--azul-claro);
}

a.boton-azul:hover, a.boton-blanco:hover, a.boton-naranja:hover, #demo .boton-naranja:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-boton);
}

a.boton-azul:active, a.boton-blanco:active, a.boton-naranja:active, #demo .boton-naranja:active {
    transform: translateY(0);
    box-shadow: none;
}

section {
    width: 100%;
    text-align: center;
    padding: 40px 24px;
    background-color: var(--blanco);
    margin: 0 auto;
}

section img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

section:nth-of-type(even) {
    background-color: var(--fondo-2);
}

input {
    height: 48px;
    border-radius: 8px;
    border: #cfd6dd;
}

input:focus-visible {
    border: var(--azul);
    outline: 3px solid var(--azul-claro);
}

input:invalid {
    border: #c0392b;
}


.texto-pequenyo {
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 12px;
}

.antetitulo {
    color: var(--naranja-antetitulo);
    font-optical-sizing: auto;
    font-weight: 800;
    font-style: normal;
    font-size: 14px;
    text-transform: uppercase;
}

.texto-azul {
    color: var(--azul);
}

.texto-blanco {
    color: var(--blanco);
}

.negrita {
    font-weight: 800;
    font-size: 13px;
}

.texto-grande {
    font-size: 26px;
    font-weight: 800;
}

/* ******************************************************************************************************************************* */
/* *************************************************************** HERO ********************************************************** */
/* ******************************************************************************************************************************* */

#hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    text-align: left;
    width: 100%;
}

#hero p {
    margin-bottom: 1.5rem;
    /*color: var(--texto-2);*/
}

#hero .texto-hero {
    display: inline-block;
    margin-right: 40px;
}

#hero span {
    display: block;
}

.botones-hero {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    margin-bottom: 1rem;
}

#hero .boton-azul {
    color: var(--blanco);
}

#hero img, #cursos img, #quienes-somos img, #nuestros-clientes img, #categorias img {
    border-radius: var(--radio);
    aspect-ratio: 4 / 3;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ******************************************************************************************************************************* */
/* ************************************************************* CURSOS ********************************************************** */
/* ******************************************************************************************************************************* */

#cursos {
    background-color: var(--fondo-2);
    /*display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));*/
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#cursos .tarjeta {
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    background-color: var(--blanco);
    outline: 3px solid transparent;
    outline-offset: 3px;
    transition: transform var(--duracion) var(--suavizado), box-shadow var(--duracion) var(--suavizado),
                outline-color var(--duracion) var(--suavizado);
    margin: 24px 0;
}

#cursos .tarjeta > img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

#cursos .interior {
    padding: 22px;
    width: 100%;
    text-align: left;
}

#cursos .codigo-curso {
    display: inline-block;
    background-color: var(--azul-claro);
    color: var(--azul-oscuro);
    font-optical-sizing: auto;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    padding: 0 10px;
    width: auto;
}


/* ******************************************************************************************************************************* */
/* ********************************************************** QUIÉNES SOMOS ****************************************************** */
/* ******************************************************************************************************************************* */


#quienes-somos {
    background-color: var(--blanco);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#quienes-somos > .parte-imagen {
    border-radius: var(--borde);
}

#quienes-somos .parte-texto {
    margin-top: 24px;
    text-align: left;
}

#quienes-somos .texto-azul {
    font-weight: 700;
}

/* ******************************************************************************************************************************* */
/* ********************************************************** QUÉ OFRECEMOS ****************************************************** */
/* ******************************************************************************************************************************* */

#que-ofrecemos {
    background-color: var(--fondo-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 16px;
}

#que-ofrecemos .fichas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 16px;
    column-gap: 12px;
    width: 100%;
    margin-top: 2rem;
}

#que-ofrecemos .ficha {
    background-color: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    transition: box-shadow var(--duracion) var(--suavizado);

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 14px;
    height: 100%;
}

#que-ofrecemos .codigo-curso {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--azul-claro);
    color: var(--azul-oscuro);
    font-weight: 800;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 0;
}

/* ******************************************************************************************************************************* */
/* ************************************************************* PRECIOS ********************************************************* */
/* ******************************************************************************************************************************* */


#precios, #catalogo .parte-abajo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    background-color: var(--azul-oscuro);
    width: 100%;
    padding: 20px;
}

#precios .antetitulo {
    color: var(--naranja-fondo-oscuro);
}

#precios > .precios {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

#precios .precio {
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    background-color: var(--azul);
    padding: 20px;
}

/* ******************************************************************************************************************************* */
/* ******************************************************** NUESTROS CLIENTES **************************************************** */
/* ******************************************************************************************************************************* */

#nuestros-clientes {
    background-color: var(--blanco);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#nuestros-clientes .clientes {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 2rem;
}

#nuestros-clientes img {
    /*height: 40px;*/
    width: 30%;
    height: auto;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.7;
    transition: filter var(--duracion) var(--suavizado), opacity var(--duracion) var(--suavizado);
}

#nuestros-clientes > .clientes > img:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* ******************************************************************************************************************************* */
/* ************************************************************** CONTACTO ******************************************************* */
/* ******************************************************************************************************************************* */

#contacto {
    background-color: var(--fondo-2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#contacto .columnas {
    width: 100%;
}

#contacto .grid {
    width: 100%;
}

#contacto .columna:first-child {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 20px;
}

#contacto .info {
    text-align: left;
    margin: 10px 0;
}

#contacto iframe {
    border-radius: var(--radio);
    aspect-ratio: 4 / 3;
    width: 100%;
    border: none;
}

/* ******************************************************************************************************************************* */
/* ************************************************************** FOOTER ********************************************************* */
/* ******************************************************************************************************************************* */

footer {
    background-color: var(--pie);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: var(--blanco);
}

footer .footer-izquierda {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 30px;
}

footer a, footer a:visited {
    color: var(--blanco);
}

footer a:hover {
    color: var(--naranja-fondo-oscuro);
}

.footer-izquierda div {
    display: inline-block;
}

.footer-img {
    filter: brightness(0) invert(1);
}



/* ******************************************************************************************************************************* */
/* *********************************************************** CATÁLOGO ********************************************************** */
/* ******************************************************************************************************************************* */

#catalogo {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* el título del catálogo es el h1 de la página, pero se ve como los h2 */
#catalogo .parte-arriba h1 {
    font-size: 26px;
}

#catalogo .parte-arriba {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

#catalogo .botonera {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

#catalogo .parte-abajo .precios {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#catalogo .parte-abajo .precio {
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 20px;
    background-color: var(--azul);
}

/* ******************************************************************************************************************************* */
/* ********************************************************** CATEGORÍAS ********************************************************* */
/* ******************************************************************************************************************************* */


#categorias {
    background-color: var(--blanco);
}

#categorias #tarjetas {
    margin: 20px 0;
}

#categorias .tarjeta-categoria {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;

    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radio);
    overflow: hidden;

    box-shadow: var(--sombra);
    margin-bottom: 20px;

    outline: 3px solid transparent;
    outline-offset: 3px;
    transition: transform var(--duracion) var(--suavizado), box-shadow var(--duracion) var(--suavizado),
                outline-color var(--duracion) var(--suavizado);
}

#categorias .tarjeta-categoria:hover, #cursos .tarjeta:hover {
    transform: scale(1.03);
    box-shadow: var(--sombra-crece);
}

/* al pasar el ratón (o llegar con el teclado) la tarjeta se marca con un borde azul bien visible */
#categorias .tarjeta-categoria:hover, #categorias .tarjeta-categoria:focus-visible,
#cursos .tarjeta:hover, #cursos .tarjeta:focus-within {
    outline-color: var(--azul);
}

#cursos .tarjeta a:focus-visible {
    outline: none;
}

#categorias .tarjeta-categoria img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#categorias .tarjeta-categoria .contenido-textos {
    grid-area: 1 / 1;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    padding: 16px 20px;

    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 40%);
    position: relative;
    z-index: 10;
}

#categorias .tarjeta-categoria .texto-inferior {
    color: var(--blanco);
    font-weight: 700;
    font-size: 14px;
}

#categorias .tarjeta-categoria .etiqueta-pdf {
    background-color: var(--naranja);
    /*color: var(--blanco);*/
    color: var(--texto);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ******************************************************************************************************************************* */
/* ************************************************************ DEMO ************************************************************* */
/* ******************************************************************************************************************************* */

#demo, #buscador {
    background-color: var(--azul-claro);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#demo .boton-naranja {
    height: 48px;
    padding: 0 24px;
}

.demo-form {
    width: stretch;
    text-align: left;
}

.demo-form label, #buscador {
    font-weight: 800;
}

.demo-form input, #buscador input[type="text"] {
    height: 30px;
}

.demo-form input, .demo-form textarea, #buscador input[type="text"] {
    transition: border-color var(--duracion) var(--suavizado);
}

.demo-form input, .demo-form textarea {
    width: stretch;
    border: 2px solid var(--borde);
    padding: 0 5px;
}

.demo-form textarea {
    padding: 5px;
    border-radius: var(--radio);
}

.demo-form input:focus-visible, .demo-form textarea:focus-visible {
    border-color: var(--texto);
}

.demo-form input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.demo-form input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--azul);
    outline-offset: 2px;
}

.demo-form .oculto {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.demo-form div {
    margin: 20px 0;
}

.demo-texto a, .demo-form a {
    color: var(--azul-oscuro);
    font-weight: 800;
}

.demo-form a {
    text-decoration: underline;
}

/* el mensaje está siempre en su sitio pero plegado; así puede aparecer suave */
.demo-form .mensaje-error {
    display: block;
    color: #dc3545;
    font-weight: 800;

    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height var(--duracion) var(--suavizado),
                opacity var(--duracion) var(--suavizado),
                visibility 0s linear var(--duracion);
}

.demo-form input:user-invalid {
    border-color: #dc3545;
}

.demo-form input[type="checkbox"]:user-invalid {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

.demo-form input:user-invalid ~ .mensaje-error {
    max-height: 4em;
    opacity: 1;
    visibility: visible;
    transition: max-height var(--duracion) var(--suavizado),
                opacity var(--duracion) var(--suavizado),
                visibility 0s;
}

/* ******************************************************************************************************************************* */
/* *********************************************************** GRACIAS *********************************************************** */
/* ******************************************************************************************************************************* */

#gracias {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#gracias img {
    width: 200px;
}

#gracias p {
    margin: 20px 0;
}

#gracias a {
    width: auto;
}

/* ******************************************************************************************************************************* */
/* *********************************************************** LEGALES *********************************************************** */
/* ******************************************************************************************************************************* */

.texto-legal {
    max-width: 900px;
    margin: 24px auto 0;
    text-align: left;
    overflow-wrap: anywhere;
}

.texto-legal p {
    margin-bottom: 12px;
}

.texto-legal h3 {
    margin: 24px 0 8px;
}

.texto-legal ul {
    margin: 0 0 12px 24px;
}

.texto-legal a {
    text-decoration: underline;
}

.texto-legal table {
    display: block;
    overflow-x: auto;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.texto-legal td {
    border: 1px solid var(--borde);
    padding: 8px;
    vertical-align: top;
}

.texto-legal td p {
    margin-bottom: 6px;
}

/* ******************************************************************************************************************************* */
/* *********************************************************** BUSCADOR ********************************************************** */
/* ******************************************************************************************************************************* */

#buscador .buscador {
    width: auto;
}

#buscador ul {
    text-align: justify;
    word-break: break-word;
}

#buscador #lista-resultados > li {
    white-space: pre-line;
    text-align: left;
    list-style: none;
    margin-bottom: 20px;
}

#buscador .busqueda, .filtro-familia, .horas {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
}

#buscador .numero-horas {
    display: flex;
    flex-direction: row;
    font-weight: 800;
}

#buscador select {
    border-radius: 6px;
}

#buscador input {
    padding: 0 5px;
    height: 30px;
}

#buscador span {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3px;

    font-weight: 400;
}

#buscador .las-horas {
    margin: 0 5px;
}

/* ******************************************************************************************************************************* */
/* ************************************************************ MAPAS ************************************************************ */
/* ******************************************************************************************************************************* */

.contenedor-mapa {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;

    width: 100%;
    height: 100%;
    border-radius: var(--radio);
    overflow: hidden;
    border: 1px solid var(--borde);

    isolation: isolate;
}

.imagen-mapa, .contenedor-mapa::after, .mapa {
    grid-column: 1;
    grid-row: 1;
}

.imagen-mapa {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*z-index: 1;*/
    filter: brightness(0.6);
}

/* el mapa de Google entra encima de la imagen y aparece cuando ha cargado */
.contenedor-mapa .iframe-mapa {
    grid-column: 1;
    grid-row: 1;
    z-index: 5;
    opacity: 0;
    transition: opacity var(--duracion-larga) var(--suavizado);
}

.contenedor-mapa.mapa-cargado .iframe-mapa {
    opacity: 1;
}

.contenedor-mapa::after {
    content: "";
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.mapa {
    z-index: 3;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: var(--radio);
    text-align: center;
    box-shadow: var(--sombra);

    align-self: center;
    justify-self: center;

    width: 90%;
    max-width: 340px;

    display: flex;
    flex-direction: column;
    gap: 16px;

    transition: opacity var(--duracion) var(--suavizado),
                transform var(--duracion) var(--suavizado),
                visibility 0s linear var(--duracion);
}

/* al pulsar «Ver mapa» la tarjeta se desvanece */
.contenedor-mapa.mapa-abierto .mapa {
    opacity: 0;
    transform: scale(0.96);
    visibility: hidden;
}

#contacto .boton-mapa {
    background-color: var(--naranja-boton);
    color: var(--blanco);
    border-radius: 30px;
    height: 48px;
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    align-self: center;
    transition: background-color var(--duracion) var(--suavizado),
                box-shadow var(--duracion) var(--suavizado),
                transform var(--duracion) var(--suavizado);
}

#contacto .boton-mapa:hover {
    background-color: var(--naranja-boton-hover);
    transform: translateY(-2px);
    box-shadow: var(--sombra-boton);
}

#contacto .boton-mapa:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ******************************************************************************************************************************* */
/* ************************************************** APARICIÓN DE LAS SECCIONES ************************************************* */
/* ******************************************************************************************************************************* */

/* la clase la pone main.js solo a las secciones que aún no se ven; sin JavaScript todo se ve normal */
.revelar {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duracion-larga) var(--suavizado), transform var(--duracion-larga) var(--suavizado);
}

.revelar.revelada {
    opacity: 1;
    transform: none;
}

/* ******************************************************************************************************************************* */
/* ******************************************************** MEDIA QUERIES ******************************************************** */
/* ******************************************************************************************************************************* */

@media (min-width: 768px) {
    body {
        font-size: 17px;
    }

    .texto-pequenyo {
        font-size: 14px;
    }

    h1 {
        font-size: 48px;
    }

    h2 {
        font-size: 32px;
    }

    #catalogo .parte-arriba h1 {
        font-size: 32px;
    }

    h3 {
        font-size: 20px;
    }

    .menu .boton-naranja {
        width: auto;
    }

    #cursos {
        background-color: var(--fondo-2);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    #cursos #tarjetas, #contacto .columnas-iframe, #categorias #tarjetas {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }

    #demo .demo-form {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }

    #demo .demo-form form {
        display: grid;
        grid-template-columns: repeat(2,1fr);
        gap: 20px;
    }

    #buscador .busqueda, .filtro-familia, .horas {
        align-items: flex-start;
    }

    #buscador .horas {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

    #buscador ul {
        width: 75%;
    }
}

@media (min-width: 1024px) {
    .hamburguesa {
        display: none;
    }
    main {
        width: 100%;
    }

    .menu {
        position: static;
        width: auto;
        height: 72px;
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        gap: 20px;

        /* en ordenador el menú está siempre a la vista */
        transform: none;
        visibility: visible;
        transition: none;
    }

    .menu a {
        font-size: 17px;
    }

    #hero {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    #cursos #tarjetas {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    #quienes-somos {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 40px;
    }

    #quienes-somos .parte-imagen {
        width: 100%;
    }

    #que-ofrecemos .fichas {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 16px;
    width: 100%;
    margin-top: 2rem;
    }

    #contacto .columnas {
        width: 95%;
        display: grid;
        grid-template-columns: 1fr 2fr;
    }

    #contacto .columnas .columna {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin: 20px;
    }

    #contacto .columnas-iframe {
        align-content: center;
    }

    footer {
    background-color: var(--pie);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    color: var(--blanco);
    padding: 20px 50px;
    }

    #catalogo .botonera {
        display: flex;
        flex-direction: row;
    }

    #catalogo .parte-abajo {
        display: flex;
        flex-direction: row;
    }

    #catalogo .parte-abajo .caja-texto {
        text-align: left;
    }

    #demo {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: start;
        text-align: left;
        gap: 30px;
    }

    #buscador ul {
        width: 50%;
    }

}

/* si el sistema pide «reducir movimiento»: nada se desplaza ni crece; los cambios de color se quedan */
@media (prefers-reduced-motion: reduce) {
    .menu-nav, .menu-nav.active, .hamburguesa span {
        transition: none;
    }

    a.boton-azul:hover, a.boton-blanco:hover, a.boton-naranja:hover, #demo .boton-naranja:hover,
    #contacto .boton-mapa:hover,
    #categorias .tarjeta-categoria:hover, #cursos .tarjeta:hover,
    .contenedor-mapa.mapa-abierto .mapa {
        transform: none;
    }

    .revelar {
        opacity: 1;
        transform: none;
        transition: none;
    }
}