@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@1,400;1,600&display=swap');

:root {
    --primary: #9c4c4c;
    --primary-dark: #6b2e2e;
    --surface: #fdf8f8;
    --surface-soft: #f8edec;
    --text: #4a2020;
    --text-on-dark: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal--left {
    transform: translateX(-32px);
}

.reveal.reveal--right {
    transform: translateX(32px);
}

.reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Delays escalonados para grupos de elementos */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.4s; }

.reveal-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Animación sutil en la imagen hero al cargar */
@keyframes heroFadeIn {
    from { opacity: 0; transform: scale(1.03); }
    to   { opacity: 1; transform: scale(1); }
}

.hero-slideshow .slide.active img {
    animation: heroFadeIn 1.2s ease both;
}

/* Animación del overlay de texto al cargar */
@keyframes overlaySlideIn {
    from { opacity: 0; transform: translateX(-16px) translateZ(0); }
    to   { opacity: 1; transform: translateX(0)    translateZ(0); }
}

@keyframes overlaySlideInRight {
    from { opacity: 0; transform: translateX(16px) translateZ(0); }
    to   { opacity: 1; transform: translateX(0)   translateZ(0); }
}

.hero-text-overlay {
    animation: overlaySlideIn 0.9s 0.4s ease both;
}

body {
    font-family: 'Georgia', serif;
    color: var(--text);
    line-height: 1.6;
    background: linear-gradient(160deg, #fff0ef 0%, #fce4e0 45%, #fff5f0 100%);
    overflow-x: clip; /* clip en lugar de hidden: no crea contexto de scroll en iOS */
}

section {
    padding: 42px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

/* Sección 1: Titular y Countdown */
.hero {
    text-align: center;
    background: url('../assets/images/sobre_abierto.jpg') center center / cover no-repeat;
    color: #9c4c4c;
    padding: 56px px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(102, 60, 130, 0.35);
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, #fce4e0 0%, #fce4e0 40%, transparent 100%) top    / 100% clamp(12px, 8vw, 32px) no-repeat,
        linear-gradient(to top,   #fce4e0 0%, #fce4e0 40%, transparent 100%) bottom / 100% clamp(12px, 8vw, 32px) no-repeat,
        linear-gradient(to right, #fce4e0 0%, #fce4e0 40%, transparent 100%) left   / clamp(12px, 8vw, 32px) 100% no-repeat,
        linear-gradient(to left,  #fce4e0 0%, #fce4e0 40%, transparent 100%) right  / clamp(12px, 8vw, 32px) 100% no-repeat;
    z-index: 2;
    pointer-events: none;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 9vw, 3rem);
    margin-bottom: 12px;
    line-height: 1.15;
}

.hero h2 {
    font-size: clamp(1.1rem, 5vw, 1.8rem);
    font-weight: 400;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
    width: min(560px, 100%);
    margin-inline: auto;
}

.countdown .countdown-item:first-child {
    grid-column: span 4;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.644);
    padding: 14px 10px;
    border-radius: 10px;
    min-width: 0;
}

.countdown-item div:first-child {
    font-size: clamp(1.5rem, 8vw, 2rem);
    font-weight: bold;
    line-height: 1;
}

.countdown-item small {
    font-size: 0.88rem;
}

/* Sección 2: Timeline */
.timeline {
    background: transparent;
}

.timeline h2,
.form-section h2 {
    text-align: center;
    margin-bottom: 24px;
    font-size: clamp(1.3rem, 4vw, 1.4rem);
    line-height: 1.2;
    color: var(--primary-dark);
    letter-spacing: 0.02em;
}

/* ── Grupos de localización ── */
.timeline-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Separador solo en móvil (en desktop los grupos van lado a lado) */
@media (max-width: 767px) {
    .timeline-group + .timeline-group {
        margin-top: 28px;
        padding-top: 28px;
        border-top: 1px solid rgba(156, 76, 76, 0.2);
    }
}

.timeline-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-group-header::before {
    content: '📍';
    font-size: 0.9rem;
}

.timeline-group-location {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    font-style: italic;
    color: var(--primary);
    letter-spacing: 0.03em;
}

/* ── Pasos del cronograma ── */
.timeline-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 600px) {
    .timeline-steps {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        overflow: hidden;
        padding-bottom: 6px;
    }
}

/* Desktop: cuatro imágenes en fila con igual ancho y alto */
@media (min-width: 768px) {
    .timeline-groups-row {
        display: flex;
        flex-direction: row;
        gap: 0;
        align-items: flex-start;
        width: 100%;
        overflow: hidden;
    }
    /* Grupo 1 tiene 1 paso → flex:1; Grupo 2 tiene 3 pasos → flex:3
       Así cada paso ocupa exactamente 1/4 del ancho total */
    .timeline-groups-row .timeline-group:first-child {
        flex: 1 1 0;
        min-width: 0;
        padding-right: 16px;
    }
    .timeline-groups-row .timeline-group:last-child {
        flex: 3 3 0;
        min-width: 0;
        padding-left: 16px;
        border-left: 1px solid rgba(156, 76, 76, 0.2);
    }
    .timeline-groups-row .timeline-steps {
        gap: 16px;
    }
    .timeline-groups-row .step-painting {
        height: 220px;
        aspect-ratio: unset;
        width: 100%;
    }
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1 1 0;
    min-width: 0;
}

/* Mobile: horizontal compacto */
@media (max-width: 599px) {
    .timeline-steps {
        align-items: center;
    }
    .timeline-step {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        width: min(96%, 400px);
        align-self: center;
    }
    .timeline-step .step-painting {
        flex-shrink: 0;
        width: 115px;
        height: 144px;
    }
    .step-info {
        align-items: flex-start !important;
        text-align: left !important;
        padding-top: 0;
    }
    .step-time {
        font-size: 1.05rem;
    }
    .step-title {
        font-size: 1.25rem;
    }
    .step-detail {
        font-size: 0.9rem;
    }
}

/* ── Cuadro / pintura ── */
.step-painting {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 6px;
    box-shadow:
        0 0 0 4px #fdf8f8,
        0 0 0 6px rgba(156, 76, 76, 0.30),
        0 6px 20px rgba(107, 46, 46, 0.22);
    object-fit: cover;
    object-position: center;
    display: block;
    /* Fondo mientras no hay imagen */
    background: linear-gradient(160deg, #f8edec 0%, #e8d0cc 100%);
    cursor: zoom-in;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.step-painting:hover {
    transform: scale(1.03);
    box-shadow:
        0 0 0 4px #fdf8f8,
        0 0 0 6px rgba(156, 76, 76, 0.45),
        0 10px 28px rgba(107, 46, 46, 0.32);
}

/* Icono lupa: solo visible en mobile */
.step-painting-block {
    display: contents; /* en desktop no altera el layout */
}

.step-painting-hint {
    display: none;
}

@media (max-width: 767px) {
    .step-painting-block {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex-shrink: 0;
    }
    .step-painting-hint {
        display: flex;
        justify-content: center;
        margin-top: 10px;
        color: rgba(107, 46, 46, 0.4);
        cursor: zoom-in;
    }
    .step-painting-hint svg {
        width: 15px;
        height: 15px;
    }
}

/* ── Lightbox ── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(30, 10, 10, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.lightbox-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-overlay img {
    max-width: min(90vw, 640px);
    max-height: 88vh;
    border-radius: 8px;
    box-shadow:
        0 0 0 4px #fdf8f8,
        0 0 0 7px rgba(156, 76, 76, 0.45),
        0 20px 60px rgba(30, 10, 10, 0.6);
    object-fit: contain;
    transform: scale(0.92);
    transition: transform 0.25s ease;
    pointer-events: none;
}

.lightbox-overlay.is-open img {
    transform: scale(1);
}

@media (max-width: 599px) {
    .lightbox-overlay img {
        max-width: 96vw;
        max-height: 82vh;
    }
}

/* ── Info debajo del cuadro ── */
.step-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.step-time {
    font-family: Georgia, serif;
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 0.08em;
}

.step-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.2rem, 3.5vw, 1.4rem);
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.02em;
}

.step-detail {
    font-size: clamp(0.88rem, 2.2vw, 1rem);
    color: var(--text);
    opacity: 0.7;
    font-style: italic;
}

/* ── Sección de contacto ── */
.contact-section {
    text-align: center;
    padding-top: 8px;
    padding-bottom: 48px;
}

.contact-intro {
    font-family: Georgia, serif;
    font-size: clamp(0.88rem, 2.4vw, 1rem);
    font-style: italic;
    color: var(--text);
    opacity: 0.75;
    margin-bottom: 28px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(253, 248, 248, 0.7);
    border: 1px solid rgba(156, 76, 76, 0.2);
    border-radius: 12px;
    padding: 20px 32px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(107, 46, 46, 0.1);
    min-width: 180px;
}

.contact-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-style: italic;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.03em;
}

.contact-phone {
    font-family: Georgia, serif;
    font-size: clamp(1rem, 3vw, 1.15rem);
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: color 0.2s;
}

.contact-phone:hover,
.contact-phone:focus {
    color: var(--primary-dark);
    text-decoration: underline;
    outline: none;
}

/* ── Sección cierre ── */
.closing h2 {
    text-align: center;
    margin-bottom: 26px;
    font-size: clamp(1.6rem, 6vw, 2rem);
    line-height: 1.2;
    color: var(--text-on-dark);
    letter-spacing: 0.02em;
}

/* Sección 3: Formulario */
.form-section {
    background: transparent;
}

.form-section__title {
    text-align: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.2rem, 3.5vw, 1.3rem);
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--primary-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.form-section__subtitle {
    text-align: center;
    font-family: Georgia, serif;
    font-size: clamp(0.88rem, 2.4vw, 1rem);
    font-style: italic;
    color: var(--text);
    opacity: 0.82;
    line-height: 1.65;
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.form-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.form-fieldset__legend {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(0.78rem, 2.2vw, 0.88rem);
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0.7;
    margin-bottom: 20px;
    padding-bottom: 8px;
}

.form-fieldset__legend::before,
.form-fieldset__legend::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--primary);
    opacity: 0.25;
}

.form-group {
    margin-bottom: 24px;
}

.form-group--hidden {
    display: none;
}

.form-fieldset--hidden {
    display: none;
}

/* Animación de aparición */
.form-group--visible {
    display: block;
    animation: fadeSlideIn 0.3s ease both;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

label {
    display: block;
    margin-bottom: 10px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1rem, 2.8vw, 1.15rem);
    font-style: italic;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.required-mark {
    color: var(--primary);
    font-style: normal;
    margin-left: 2px;
}

.label-hint {
    display: block;
    font-size: 0.82em;
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    opacity: 0.65;
    margin-top: 2px;
}

.field-error {
    display: none;
    margin-top: 6px;
    font-family: Georgia, serif;
    font-size: 0.82rem;
    font-style: italic;
    color: #8a1f1f;
}

.field-error--visible {
    display: block;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(156, 76, 76, 0.3);
    border-radius: 8px;
    font-family: Georgia, serif;
    font-size: 1rem;
    background: #fff;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(156, 76, 76, 0.12);
}

input.input--invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary);
}

.radio-group {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    font-style: italic;
    font-weight: 500;
    color: var(--primary-dark);
    letter-spacing: 0.02em;
    margin-bottom: 0;
    cursor: pointer;
}

button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 13px 22px;
    border: none;
    border-radius: 8px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
    width: 100%;
    min-height: 46px;
    transition: opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(107, 46, 46, 0.3);
}

button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.form-status {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 600;
}

.form-status.is-success {
    background: #e7f7ed;
    border: 1px solid #9ed0ac;
    color: #1f6b38;
}

.form-status.is-error {
    background: #fdecec;
    border: 1px solid #e0a4a4;
    color: #8a1f1f;
}

.form-response-frame {
    width: 0;
    height: 0;
    border: 0;
    visibility: hidden;
}

@media (hover: hover) {
    button:hover {
        opacity: 0.88;
        box-shadow: 0 4px 16px rgba(107, 46, 46, 0.4);
    }
}

/* Sección 4: Cierre */
.closing {
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-on-dark);
    font-size: 1.03rem;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(107, 46, 46, 0.22);
}

.account-info {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 18px;
    border-radius: 10px;
    margin-top: 20px;
    font-weight: bold;
    font-size: clamp(1rem, 4vw, 1.2rem);
    overflow-wrap: anywhere;
    letter-spacing: 0.04em;
}

.hidden {
    display: none;
}

@media (min-width: 600px) {
    section {
        padding: 54px 24px;
    }

    .hero {
        padding: 70px 24px;
    }

    .countdown {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        width: min(620px, 100%);
    }

    .timeline-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .timeline-time {
        min-width: 110px;
        font-size: 1.08rem;
    }

    .timeline-content {
        margin-left: 0;
    }

    form {
        padding: 28px;
    }

    .radio-group label,
    .checkbox-group label {
        display: inline-flex;
        margin-right: 20px;
        margin-bottom: 8px;
    }
}

@media (min-width: 1024px) {
    section {
        padding: 60px 20px;
    }

    .hero {
        padding: 86px 20px;
    }

    form {
        padding: 30px;
    }
}

/* ── Sección imagen principal ── */
.hero-image {
    width: 100%;
    padding: 0;
    margin: 0 0 clamp(28px, 6vw, 56px); /* separación hacia sección 1 */
    max-width: none;
    line-height: 0;
    position: relative; /* ancla para el menú overlay */
}

/* Difuminado arriba y abajo: integra el slideshow con el fondo de la web */
.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, #fce4e0 0%, #fce4e0 40%, transparent 100%) top / 100% clamp(12px, 8vw, 32px) no-repeat,
        linear-gradient(to top,   #fce4e0 0%, #fce4e0 40%, transparent 100%) bottom / 100% clamp(12px, 8vw, 32px) no-repeat;
    z-index: 5;
    pointer-events: none;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Slideshow de imágenes ── */
.hero-slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;    /* portrait en móvil */
    overflow: hidden;
}

/* Desktop (≥768px): proporción landscape */
@media (min-width: 768px) {
    .hero-slideshow {
        aspect-ratio: 16 / 9;
    }
}

.hero-slideshow .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    z-index: 0;
    overflow: hidden;
}

.hero-slideshow .slide.active {
    opacity: 1;
    z-index: 1;
}

/* Fondo desenfocado: rellena el espacio en imágenes verticales */
.hero-slideshow .slide::before {
    content: '';
    position: absolute;
    inset: -30px;
    background-image: var(--bg);
    background-size: cover;
    background-position: center;
    filter: blur(16px) brightness(0.6);
    z-index: 0;
}

/* Imagen principal: rellena el contenedor sin margen */
.hero-slideshow .slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 1;
}

/* Mobile (≤767px): muestra portrait, oculta landscape */
.hero-img-desktop { display: none; }
.hero-img-mobile  { display: block; }

/* Tablet / Desktop (≥768px): muestra landscape, oculta portrait */
@media (min-width: 768px) {
    .hero-img-mobile  { display: none; }
    .hero-img-desktop { display: block; }
}

/* ── Slideshow dots ── */
.slideshow-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

.slideshow-dot {
    display: block;
    width: 7px;
    height: 7px;
    min-width: 0;
    min-height: 0;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    pointer-events: all;
    transition: background 0.3s ease, transform 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

.slideshow-dot--active {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.3);
}

/* ── Texto superpuesto en imagen principal ── */
.hero-text-overlay {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    left: 14px;
    z-index: 30;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    display: flex;
    flex-direction: column;
    gap: 2px;
    pointer-events: auto;
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 13px;
    border-radius: 6px;
    background: rgba(255, 245, 240, 0.55);
    border: 1px solid rgba(156, 76, 76, 0.25);
    box-shadow: 0 2px 12px rgba(107, 46, 46, 0.15);
    color: rgba(107, 46, 46, 0.95);
    transition: background 0.2s, box-shadow 0.2s;
}

.hero-text-overlay:hover,
.hero-text-overlay:focus {
    background: rgba(255, 245, 240, 0.82);
    box-shadow: 0 4px 18px rgba(107, 46, 46, 0.22);
    outline: none;
}

.hero-overlay-names {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(1rem, 3.2vw, 1.45rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.hero-overlay-date {
    font-family: Georgia, serif;
    font-size: clamp(0.68rem, 1.8vw, 0.88rem);
    letter-spacing: 0.14em;
    line-height: 1.3;
}

.hero-overlay-place {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(0.64rem, 1.6vw, 0.82rem);
    letter-spacing: 0.1em;
    line-height: 1.3;
}

/* ── Botón de confirmación directa ── */
.confirm-shortcut {
    position: absolute;
    top: 14px;
    right: 72px;
    z-index: 30;
    display: inline-block;
    padding: 11px 22px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.95rem;
    font-style: italic;
    letter-spacing: 0.12em;
    color: #fff;
    background: var(--primary);
    border: 1px solid var(--primary-dark);
    border-radius: 20px;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(107, 46, 46, 0.25);
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.confirm-shortcut:hover,
.confirm-shortcut:focus {
    background: #fff;
    color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(107, 46, 46, 0.28);
    outline: none;
}

/* Mobile: botón centrado en el hueco entre sección 0 y sección 1 */
@media (max-width: 767px) {
    .confirm-shortcut {
        top: auto;
        right: 50%;
        bottom: 0;
        transform: translateX(50%) translateY(95%);
        z-index: 10;
    }
}

/* ── Botón hamburger ── */
.nav-toggle {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    right: 14px;
    z-index: 30;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    animation: overlaySlideInRight 0.9s 0.4s ease both;
    width: auto;        /* anula el width:100% del button global */
    min-height: auto;   /* anula el min-height del button global */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 10px 11px;
    background: #9c4c4c;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: none;   /* anula box-shadow del button global */
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.25s ease;
}

/* Animación a × cuando está abierto */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Menú de navegación ── */
.hero-nav {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 60px); /* justo debajo del botón hamburger fijo */
    right: 14px;
    left: auto;         /* NO ocupa todo el ancho */
    width: max-content;
    min-width: 200px;
    max-width: min(260px, calc(100vw - 28px));
    z-index: 20;
    background: rgba(25, 8, 8, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top right;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}

.hero-nav.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hero-nav ul {
    list-style: none;
    margin: 0;
}

.hero-nav a {
    display: block;
    font-family: 'Georgia', serif;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    padding: 11px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}

.hero-nav li:last-child a {
    border-bottom: none;
}

.hero-nav a:hover,
.hero-nav a:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
}

/* Evitar solape con el bloque fijo superior izquierdo en móvil */
@media (max-width: 767px) {
    .hero-nav {
        /* Deja margen suficiente para el overlay izquierdo (~175px) + gap */
        max-width: calc(100vw - 195px);
        min-width: 130px;
    }
    .hero-nav a {
        white-space: normal;
        overflow-wrap: break-word;
        line-height: 1.5;
    }
}

/* ── Grid de secciones (tablet/desktop) ── */
.sections-grid {
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Sección hilo rojo ── */
.red-thread-section {
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
}

.red-thread-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.5rem, 3.2vw, 2.5rem);
    font-weight: 400;
    color: var(--primary-dark);
    text-align: center;
    max-width: 800px;
    line-height: 1.8;
    letter-spacing: 0.02em;
}

.red-thread-text .char {
    display: inline;
    opacity: 0;
    filter: blur(0px);
    transition: opacity 0.04s ease, filter 0.04s ease;
}

.red-thread-text .char.is-visible {
    opacity: 1;
    filter: blur(0px);
}

.red-thread-line {
    display: block;
    width: min(100%, 800px);
    height: 18px;
    margin: 0 auto;
    overflow: visible;
}

#redThreadLine {
    margin-bottom: 1.6rem;

}

#redThreadLineBottom {
    margin-top: 1.6rem;
}

#redThreadPath,
#redThreadPathBottom {
    fill: none;
    stroke: #ff0000;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;
}

@media (min-width: 768px) {
    /* Igualar ancho de título/subtítulo del formulario al del propio form */
    .form-section__subtitle {
        max-width: none;
    }

    /* Regalo y Contacto: mismo ancho que la columna del formulario */
    #regalo,
    #contacto {
        max-width: 700px;
    }

    .contact-intro {
        max-width: none;
    }
}


/* ── Sección Autobuses ── */
.buses-section {
    max-width: 860px;
}

.bus-route {
    margin-bottom: 52px;
}

.bus-route:last-child {
    margin-bottom: 0;
}

/* Cabecera de ruta */
.bus-route__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(156, 76, 76, 0.2);
}

.bus-route__icon {
    width: 26px;
    height: 26px;
    color: var(--primary);
    flex-shrink: 0;
}

.bus-route__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.05rem, 3.2vw, 1.25rem);
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.bus-route__subtitle {
    font-family: Georgia, serif;
    font-size: clamp(0.75rem, 2vw, 0.88rem);
    font-style: italic;
    color: var(--text);
    opacity: 0.58;
}

/* Body de la ruta ida: vídeo + paradas */
.bus-route__body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 620px) {
    .bus-route__body {
        flex-direction: row;
        align-items: flex-start;
        gap: 28px;
    }

    .bus-route__body .bus-video-wrap {
        flex: 0 0 min(400px, 55%);
    }

    .bus-route__body .bus-stops {
        flex: 1;
        padding-top: 2px;
    }
}

/* Vídeo */
.bus-video-wrap {
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 0 0 3px #fdf8f8,
        0 0 0 5px rgba(156, 76, 76, 0.22),
        0 6px 20px rgba(107, 46, 46, 0.16);
    background: linear-gradient(160deg, #f8edec 0%, #e8d0cc 100%);
}

.bus-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
    background: linear-gradient(160deg, #f8edec 0%, #e8d0cc 100%);
}

.bus-video__caption {
    padding: 7px 14px;
    font-family: Georgia, serif;
    font-size: 0.77rem;
    font-style: italic;
    color: var(--text);
    opacity: 0.62;
    text-align: center;
    background: rgba(253, 248, 248, 0.92);
    border-top: 1px solid rgba(156, 76, 76, 0.1);
}

/* Timeline de paradas */
.bus-stops {
    display: flex;
    flex-direction: column;
}

.bus-stop {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.bus-stop__track {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
}

.bus-stop__marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(107, 46, 46, 0.16);
}

.bus-stop__marker--depart {
    background: var(--primary);
    color: #fff;
}

.bus-stop__marker--depart svg {
    width: 22px;
    height: 22px;
}

.bus-stop__marker--mid {
    background: #fdf8f8;
    border: 2px solid rgba(156, 76, 76, 0.35);
    color: var(--primary);
}

.bus-stop__marker--mid svg {
    width: 14px;
    height: 14px;
}

.bus-stop__marker--arrive {
    background: #fdf8f8;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.bus-stop__marker--arrive svg {
    width: 20px;
    height: 20px;
}

/* Línea discontinua entre paradas */
.bus-stop__line {
    flex: 1;
    min-height: 24px;
    width: 0;
    border-left: 2px dashed rgba(156, 76, 76, 0.32);
    margin-top: 4px;
    margin-bottom: 4px;
}

.bus-stop__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
    padding-bottom: 14px;
}

.bus-stop__time {
    font-family: Georgia, serif;
    font-size: clamp(0.98rem, 2.8vw, 1.1rem);
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 0.1em;
    line-height: 1.1;
}

.bus-stop__name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.05rem, 3vw, 1.2rem);
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.bus-stop__place {
    font-family: Georgia, serif;
    font-size: clamp(0.74rem, 1.9vw, 0.84rem);
    font-style: italic;
    color: var(--text);
    opacity: 0.6;
}

/* Pills de horarios múltiples en una parada */
.bus-stop__times {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

/* ── Footer copyright ── */
.site-footer {
    padding: 24px 16px;
    text-align: center;
    background: transparent;
}

.site-footer__copy {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 0.97rem;
    letter-spacing: 0.08em;
    color: var(--primary);
    opacity: 0.85;
}

.bus-stop__time-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 11px;
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-family: Georgia, serif;
    font-size: clamp(0.78rem, 2vw, 0.88rem);
    font-weight: bold;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.bus-stop__time-pill--second {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}


/* ── Sección Lugares ── */
.venues-section {
    max-width: 900px;
}

/* Tarjeta de lugar */
.venue-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 52px;
    background: rgba(253, 248, 248, 0.6);
    border: 1px solid rgba(156, 76, 76, 0.15);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(107, 46, 46, 0.09);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.venue-card:last-child {
    margin-bottom: 0;
}

@media (min-width: 680px) {
    .venue-card {
        flex-direction: row;
        align-items: stretch;
    }

    /* Versión invertida: imagen a la derecha */
    .venue-card--reverse {
        flex-direction: row-reverse;
    }
}

/* Imagen */
.venue-card__img-wrap {
    flex: 0 0 min(280px, 42%);
    overflow: hidden;
    background: linear-gradient(160deg, #f8edec 0%, #e8d0cc 100%);
}

.venue-card__img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.venue-card:hover .venue-card__img {
    transform: scale(1.04);
}

/* Cuerpo */
.venue-card__body {
    flex: 1;
    padding: 24px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.venue-card__name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.25rem, 3.8vw, 1.55rem);
    font-style: italic;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin: 0;
}

.venue-card__address {
    font-family: Georgia, serif;
    font-size: clamp(0.78rem, 2vw, 0.88rem);
    color: var(--primary);
    letter-spacing: 0.04em;
    margin: 0;
}

.venue-card__desc {
    font-family: Georgia, serif;
    font-size: clamp(0.88rem, 2.3vw, 0.96rem);
    font-style: italic;
    color: var(--text);
    opacity: 0.78;
    line-height: 1.65;
    margin: 4px 0 8px;
}

/* Separador */
.venue-card__transport {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(156, 76, 76, 0.15);
}

/* Fila de transporte */
.venue-transport-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.venue-transport-item__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(156, 76, 76, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-top: 1px;
}

.venue-transport-item__icon svg {
    width: 18px;
    height: 18px;
}

.venue-transport-item__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: Georgia, serif;
    font-size: clamp(0.82rem, 2.1vw, 0.9rem);
    color: var(--text);
    line-height: 1.5;
}

.venue-transport-item__text strong {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(0.9rem, 2.4vw, 1rem);
    font-style: italic;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.02em;
}

.venue-transport-item__text a {
    color: var(--primary);
    font-weight: bold;
    white-space: nowrap;
}

/* Botón mapa */
.venue-card__map-btn {
    display: inline-block;
    margin-top: 6px;
    align-self: flex-start;
    padding: 8px 18px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.9rem;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--primary);
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(107, 46, 46, 0.22);
}

.venue-card__map-btn:hover,
.venue-card__map-btn:focus {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(107, 46, 46, 0.32);
    outline: none;
}

/* Placeholder mientras no hay imagen */
.venue-card__img-wrap:not(:has(img[src$=".jpg"])):not(:has(img[src$=".jpeg"])):not(:has(img[src$=".png"])) {
    min-height: 220px;
}

