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

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0ebe3;
    font-family: 'Georgia', serif;
    overflow: hidden;
}

/* === Pétalos cayendo === */
.petalos-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
    overflow: hidden;
}

.petalos-caiendo {
    position: absolute;
    top: -50px;
    width: 20px;
    height: auto;
    animation: caer linear forwards;
}

@keyframes caer {
    0% {
        transform: translateY(0px) rotate(0deg) translateX(0);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(389vh) rotate(360deg) translateX(77px);
        opacity: 0;
    }
}

.escena {
    position: relative;
    width: 90vw;
    height: 70vh;
    max-width: 420px;
    max-height: 560px;
    transition: opacity 2.6s ease-out, transform 2.6s ease-out;
}

.escena.abierto {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

/* === Carta === */
.carta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(60px);
    width: 70%;
    height: 320px;
    background: #fffef9;
    border-radius: 4px;
    text-align: center;
    z-index: 1;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: transform 0.8s ease-out 0.4s, opacity 0.6s ease-out 0.4s;
}

.escena.abierto .carta {
    transform: translate(-50%, -50%) translateY(0);
    opacity: 1;
    pointer-events: none;
}

/* === Sobre === */
.sobre {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 40%;
}

.sobre-atras {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%),
        linear-gradient(170deg, #f5ece0 0%, #ebe1ce 50%, #e2d6c0 100%);
    border-radius: 0 0 12px 12px;
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.15),
        0 2px 8px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.4);
    pointer-events: none;
}

.sobre-adelante {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 40%),
        linear-gradient(170deg, #f3ebdc 0%, #ebe2d0 40%, #e0d5c0 100%);
    clip-path: polygon(0 22%, 50% 0%, 100% 22%, 100% 100%, 0 100%);
    z-index: 3;
    pointer-events: none;
    box-shadow: inset 0 -2px 8px rgba(0,0,0,0.08);
}

.solapa {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 32%;
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 40%),
        linear-gradient(180deg, #f0e8d8 0%, #e8dece 60%, #e0d5c2 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform-origin: top center;
    transition: transform 0.8s ease-in-out;
    z-index: 4;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    pointer-events: none;
}

.escena.abierto .solapa {
    transform: rotateX(180deg);
    z-index: 0;
    filter: none;
}

/* === Cinta === */
.cinta {
    position: absolute;
    bottom: 30%;
    left: 0;
    width: 100%;
    height: 48px;
    background: linear-gradient(180deg, #ede3cf 0%, #d9c8a8 25%, #cbb890 50%, #d9c8a8 75%, #ede3cf 100%);
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12), inset 0 1px 2px rgba(255,255,255,0.3);
    transition: opacity 0.4s ease-out;
    pointer-events: none;
}

.cinta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 40% 40%, #f0e4cc 0%, #d4c09a 40%, #c4aa78 70%, #b89860 100%);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2), inset 0 -2px 6px rgba(0,0,0,0.15), inset 0 2px 6px rgba(255,255,255,0.3);
}

.cinta::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 80px;
    height: 30px;
    background: linear-gradient(180deg, #ede3cf 0%, #d4c09a 50%, #ede3cf 100%);
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.escena.abierto .cinta {
    opacity: 0;
    pointer-events: none;
}

/* === Sello === */
.sello {
    position: absolute;
    top: 54%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    z-index: 20;
    cursor: pointer;
    background: url('Boton sobre.png') center/contain no-repeat;
    transition: transform 0.3s ease, opacity 0.4s ease-out;
}

.sello:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

.escena.abierto .sello {
    opacity: 0;
    pointer-events: none;
}

/* === Texto ayuda === */
.ayuda {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
    color: #5a4a3a;
    font-size: 14px;
    z-index: 10;
    transition: opacity 0.3s ease-out;
}

.escena.abierto .ayuda {
    opacity: 0;
    pointer-events: none;
}

/* === Invitación completa === */
.invitacion {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #f0ebe3;
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.invitacion.visible {
    display: flex;
    animation: fadeInInvitacion 0.6s ease-out;
}

@keyframes fadeInInvitacion {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.invitacion img {
    width: 100%;
    height: auto;
    display: block;
}

.invitacion img.logo {
    width: 120px !important;
    max-width: 120px !important;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* === Efecto de entrada === */
.nombres, .decoracion-swirl, .bendicion, .padres, .subtitulo, .mensaje, .seccion, .cierre {
    opacity: 0;
    transform: translateY(30px);
    animation: entradaElemento 0.8s ease-out forwards;
}

.nombres { animation-delay: 0.2s; }
.decoracion-swirl { animation-delay: 0.6s; }
.bendicion { animation-delay: 1s; }
.padres { animation-delay: 1.4s; }
.subtitulo { animation-delay: 1.8s; }
.mensaje { animation-delay: 2.2s; }
.seccion:nth-child(9) { animation-delay: 3.4s; }
.seccion:nth-child(10) { animation-delay: 3.8s; }
.seccion:nth-child(11) { animation-delay: 4.2s; }
.seccion:nth-child(12) { animation-delay: 4.6s; }
.cierre { animation-delay: 5s; }

@keyframes entradaElemento {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Texto animado letra por letra === */
.letra {
    display: inline-block;
    opacity: 0;
    animation: aparecerLetra 0.3s ease-out forwards;
}

@keyframes aparecerLetra {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Pantalla de carga === */
.pantalla-carga {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0ebe3 0%, #e8dcc8 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.8s ease-out;
}

.pantalla-carga.ocultar {
    opacity: 0;
    pointer-events: none;
}

.carga-corazon {
    position: relative;
    width: 40px;
    height: 40px;
    background: #c9a868;
    transform: rotate(-45deg);
    animation: latido 1s ease-in-out infinite;
}

.carga-corazon::before,
.carga-corazon::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: #c9a868;
    border-radius: 50%;
}

.carga-corazon::before {
    top: -20px;
    left: 0;
}

.carga-corazon::after {
    top: 0;
    left: 20px;
}

.carga-texto {
    margin-top: 30px;
    font-family: 'Great Vibes', cursive;
    font-size: 20px;
    color: #c9a868;
    animation: pulsar 1.5s ease-in-out infinite;
}

@keyframes latido {
    0%, 100% { transform: rotate(-45deg) scale(1); }
    50% { transform: rotate(-45deg) scale(1.1); }
}

@keyframes pulsar {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* === Galería === */
.galeria {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.galeria.abierta {
    opacity: 1;
    pointer-events: auto;
}

.galeria-img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.galeria-cerrar {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
    z-index: 510;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

.galeria-cerrar:hover {
    transform: scale(1.2);
}

.galeria-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
    z-index: 510;
}

.galeria-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.galeria-anterior {
    left: 15px;
}

.galeria-siguiente {
    right: 15px;
}

.galeria-indicadores {
    position: absolute;
    bottom: 25px;
    display: flex;
    gap: 10px;
}

.galeria-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.galeria-dot.activo {
    background: #c9a868;
}

/* === Contenido invitación === */
.inv-content {
    width: 100%;
    min-height: 100vh;
    padding: 0 20px 20px 20px;
    text-align: center;
    background: url('Media/Fondo.png') no-repeat center top;
    background-size: cover;
    position: relative;
    overflow-x: hidden;
}

.nombres {
    font-family: 'Great Vibes', cursive;
    font-size: 46px;
    color: #c9a868;
    margin-top: 20px;
    font-weight: normal;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitulo {
    font-family: 'Great Vibes', cursive;
    font-size: 38px;
    color: #c9a868;
    margin-top: 20px;
    font-weight: normal;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.mensaje {
    font-size: 13px;
    color: #8B7355;
    line-height: 1.6;
    margin: 8px auto;
    max-width: 220px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

.seccion {
    margin: 35px 0;
}

.seccion-hora {
    margin-bottom: 650px;
}

.seccion-fecha .seccion-titulo,
.seccion-fecha .dia,
.seccion-fecha .fecha,
.seccion-hora .seccion-titulo,
.seccion-hora .hora,
.seccion-faltan .seccion-titulo,
.seccion-ubicacion .seccion-titulo,
.seccion-confirmar .seccion-titulo {
    font-family: 'Montserrat', sans-serif;
}

.seccion-titulo {
    font-family: 'Great Vibes', cursive;
    font-size: 31px;
    color: #8B7355;
    font-weight: normal;
    margin-bottom: 6px;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

.dia {
    font-family: 'Great Vibes', cursive;
    font-size: 34px;
    color: #8B7355;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

.fecha {
    font-size: 34px;
    color: #8B7355;
    letter-spacing: 4px;
    margin-top: 4px;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

.hora {
    font-size: 34px;
    color: #8B7355;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

/* Cuenta regresiva */
.cuenta-regresiva {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.tiempo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tiempo span {
    font-size: 46px;
    color: #8B7355;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

.tiempo small {
    font-size: 28px;
    color: #8B7355;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

.bendicion {
    font-size: 16px;
    color: #8B7355;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.padres {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 15px 0;
}

.padres-col {
    text-align: center;
}

.padres-col small {
    font-size: 11px;
    color: #8B7355;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.padres-col p {
    font-size: 16px;
    color: #8B7355;
    margin: 4px 0;
}

.lugar {
    font-size: 28px;
    color: #8B7355;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

.btn-mapa {
    background: linear-gradient(180deg, #d4b896 0%, #b89860 100%);
    color: #fff;
    border: none;
    padding: 15px 45px;
    border-radius: 30px;
    font-size: 20px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.cierre {
    font-size: 25px;
    color: #8B7355;
    font-style: italic;
    margin: 17px 0 35px;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

/* === Formulario RSVP === */
.rsvp-form {
    max-width: 300px;
    margin: 0 auto;
}

.rsvp-campo {
    margin-bottom: 20px;
}

.rsvp-label {
    display: block;
    font-size: 26px;
    color: #8B7355;
    margin-bottom: 8px;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
}

.rsvp-opciones {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.rsvp-opcion {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8B7355;
    font-size: 26px;
    cursor: pointer;
}

.rsvp-opcion input[type="radio"] {
    display: none;
}

.rsvp-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #8B7355;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.rsvp-opcion input[type="radio"]:checked + .rsvp-radio {
    background: #8B7355;
}

.rsvp-opcion input[type="radio"]:checked + .rsvp-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #3a2a1a;
    border-radius: 50%;
}

.rsvp-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #8B7355;
    border-radius: 25px;
    color: #8B7355;
    font-size: 26px;
    text-align: center;
    outline: none;
    transition: all 0.3s;
}

.rsvp-input::placeholder {
    color: rgba(139, 115, 85, 0.5);
}

.rsvp-input:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(139, 115, 85, 0.3);
}

.rsvp-btn {
    background: linear-gradient(180deg, #d4b896 0%, #b89860 100%);
    color: #fff;
    border: none;
    padding: 14px 35px;
    border-radius: 25px;
    font-size: 20px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    transition: all 0.3s;
    margin-top: 10px;
}

.rsvp-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.rsvp-exito {
    font-size: 18px;
    color: #8B7355;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8), 0 0 8px rgba(255,255,255,0.5);
    margin-top: 15px;
}

/* === Decoracion swirl === */
.decoracion-swirl {
    margin: 40px auto;
}

.decoracion-img {
    width: 300px !important;
    max-width: 300px !important;
    display: block;
    margin: 0 auto;
}

/* === Texto destacado === */
.destacado {
    color: #d4a843;
    font-weight: bold;
}

/* === Fotos finales === */
.fotos-finales-contenedor {
    overflow: hidden;
    margin: 48px 0 96px;
    width: 100%;
}

.fotos-finales {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: tren 6s linear infinite;
    will-change: transform;
    -webkit-transform: translate3d(0, 0, 0);
}

.foto-final {
    width: 66%;
    max-width: 262px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

@keyframes tren {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-33.333%, 0, 0); }
}
