:root {
    --fondo: #f7f4ed;
    --tinta: #20231f;
    --verde: #315c42;
    --naranja: #e17b45;
    --claro: #e9e4d8;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--fondo);
    color: var(--tinta);
    font-family: system-ui, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

.contenedor {
    width: min(1100px, 90%);
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--fondo);
    border-bottom: 1px solid var(--claro);
}

nav {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    color: var(--verde);
    font-weight: 800;
    text-decoration: none;
}

.enlaces {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.enlaces a {
    text-decoration: none;
    font-size: 0.95rem;
}

.enlaces a:hover {
    color: var(--naranja);
}

.portada {
    padding: 100px 0 90px;
    background:
        linear-gradient(90deg, rgba(25, 39, 29, 0.84), rgba(25, 39, 29, 0.25)),
        url("imagenes/marcha-portada.jpg") center 45% / cover,
        var(--verde);
    color: white;
}

.portada h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(2.7rem, 8vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.portada p {
    max-width: 600px;
    font-size: 1.15rem;
}

.boton {
    display: inline-block;
    margin-top: 14px;
    padding: 12px 20px;
    border-radius: 6px;
    background: var(--naranja);
    color: white;
    font-weight: 700;
    text-decoration: none;
}

section {
    padding: 72px 0;
}

section:nth-of-type(even) {
    background: #efebe2;
}

h2 {
    margin: 0 0 12px;
    color: var(--verde);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
}

.introduccion {
    max-width: 680px;
    margin: 0 0 30px;
}

.consignas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.consigna {
    min-height: 150px;
    padding: 24px;
    display: flex;
    align-items: end;
    border-radius: 10px;
    background: var(--verde);
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
}

.consigna:nth-child(2n) {
    background: var(--naranja);
}

.galeria,
.posters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

figure {
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
    background: white;
}

figure img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    background: var(--claro);
}

figcaption {
    padding: 12px 14px;
}

.mapa {
    padding: 22px;
    border-radius: 10px;
    background: white;
}

.mapa svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 380px;
}

.paradas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.parada {
    padding: 14px;
    border-left: 4px solid var(--naranja);
    background: var(--fondo);
}

footer {
    padding: 30px 0;
    background: var(--verde);
    color: white;
    text-align: center;
}

@media (max-width: 600px) {
    nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    .portada {
        padding: 72px 0;
    }
    section {
        padding: 54px 0;
    }
}

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

.poster-pista {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 2px 16px;
}

.poster-pista figure {
    flex: 0 0 clamp(220px, 32vw, 320px);
    scroll-snap-align: start;
}

.poster-pista img {
    cursor: zoom-in;
}

.poster-abrir {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}

.flecha-carrusel,
.visor-flecha,
.visor-cerrar {
    border: 0;
    border-radius: 50%;
    background: var(--verde);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
}

.flecha-carrusel {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
}

#visor-posters {
    width: min(92vw, 1000px);
    max-width: none;
    max-height: 92vh;
    padding: 18px;
    border: 0;
    border-radius: 12px;
    background: #20231f;
    color: white;
}

#visor-posters::backdrop {
    background: rgb(0 0 0 / 85%);
}

.visor-contenido {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#visor-imagen {
    display: block;
    max-width: min(75vw, 850px);
    max-height: 78vh;
    object-fit: contain;
}

.visor-flecha {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

.visor-cerrar {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    width: 40px;
    height: 40px;
    background: #e17b45;
}

@media (max-width: 600px) {
    .flecha-carrusel {
        display: none;
    }
    #visor-posters {
        padding: 12px;
    }
    #visor-imagen {
        max-width: 68vw;
    }
}

.seccion-consignas {
    padding: 72px 0;
    background: #f7f4ed;
}

.encabezado-consignas {
    max-width: 680px;
    margin-bottom: 30px;
}

.encabezado-consignas h2 {
    margin: 0 0 12px;
    color: #315c42;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
}

.encabezado-consignas .introduccion {
    margin: 0;
    color: #55584f;
    font-size: 1.1rem;
}

.lista-consignas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: consigna;
}

.tarjeta-consigna {
    position: relative;
    min-height: 150px;
    padding: 28px 22px 22px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 12px;
    background: #315c42;
    color: #fff;
    counter-increment: consigna;
}

.tarjeta-consigna::before {
    content: counter(consigna, decimal-leading-zero);
    position: absolute;
    top: 12px;
    right: 16px;
    color: rgb(255 255 255 / 45%);
    font-size: 1rem;
    font-weight: 700;
}

.tarjeta-consigna p {
    margin: 0;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 700;
    line-height: 1.35;
}

.tarjeta-consigna:nth-child(4n + 2) {
    background: #e17b45;
}

.tarjeta-consigna:nth-child(4n + 3) {
    background: #292b27;
}

.tarjeta-consigna:nth-child(4n) {
    background: #7a4c3a;
}

@media (min-width: 900px) {
    .tarjeta-consigna-larga {
        grid-column: span 2;
    }
}

.seccion-ruta {
    padding: 72px 0;
    background: #efebe2;
}

.ruta-encabezado {
    max-width: 700px;
    margin-bottom: 28px;
}

.ruta-encabezado h2 {
    margin: 0 0 12px;
    color: #315c42;
    font-size: clamp(2rem, 5vw, 3rem);
}

.ruta-datos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.ruta-dato {
    padding: 16px;
    border-radius: 10px;
    background: #fff;
}

.ruta-dato strong {
    display: block;
    margin-bottom: 4px;
    color: #315c42;
    font-size: 0.9rem;
}

.ruta-mapa {
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 18px rgb(0 0 0 / 8%);
}

.ruta-mapa iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 300px;
    border: 0;
}

.ruta-paradas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    padding: 18px;
}

.ruta-parada {
    padding: 14px 16px;
    border-left: 4px solid #e17b45;
    border-radius: 4px;
    background: #f7f4ed;
}

.ruta-parada strong {
    display: block;
    color: #315c42;
}

.ruta-enlace {
    display: inline-block;
    margin: 0 18px 18px;
    padding: 11px 16px;
    border-radius: 6px;
    background: #315c42;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.ruta-enlace:hover {
    background: #244632;
}

@media (max-width: 600px) {
    .seccion-ruta {
        padding: 54px 0;
    }
    .ruta-mapa iframe {
        min-height: 260px;
    }
}

.galeria-fotos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 16px;
}

.foto-tarjeta {
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
}

.foto-abrir {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.foto-abrir img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.foto-abrir:hover img {
    transform: scale(1.04);
}

.foto-tarjeta figcaption {
    padding: 12px 14px;
    color: #444;
}

.galeria-controles {
    margin-top: 24px;
    text-align: center;
}

.boton-fotos {
    padding: 12px 20px;
    border: 0;
    border-radius: 6px;
    background: #315c42;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.boton-fotos:hover {
    background: #244632;
}

#visor-fotos {
    width: min(94vw, 1100px);
    max-width: none;
    max-height: 94vh;
    padding: 16px;
    border: 0;
    border-radius: 12px;
    background: #20231f;
    color: white;
}

#visor-fotos::backdrop {
    background: rgb(0 0 0 / 85%);
}

.visor-fotos-contenido {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#visor-foto {
    display: block;
    max-width: min(76vw, 900px);
    max-height: 78vh;
    object-fit: contain;
}

#visor-pie {
    margin: 12px 0 0;
    text-align: center;
}

.visor-fotos-boton {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #315c42;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.visor-fotos-cerrar {
    display: block;
    margin: 0 0 10px auto;
    background: #e17b45;
}

@media (max-width: 600px) {
    #visor-foto {
        max-width: 68vw;
        max-height: 70vh;
    }

    .visor-fotos-boton {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }
}
