/* --- Variables de Color y Fuentes --- */
:root {
    /* Colores de Sandra */
    --color-sandra1: #6b7f6a;
    --color-sandra2: #91a093;
    --color-sandra3: #a5b38b;
    --color-sandra4: #f0f6ea;
    /* Fin Colores de Sandra */
    /* Colores de Confeti */
    --color-confeti1: #ffcc00;
    --color-confeti2: #ff6699;
    --color-confeti3: #66ccff;
    --color-confeti4: #ffcc00;
    /* Fin Colores de Confeti */
    --color-bg: #fbfef8;
    --color-primary: #e5f7c3;
    --color-primary-solapa: #a5b38b;
    --color-secondary: #d3e0ea;
    --color-accent: #91a093;
    --color-accent-h1: #6b7f6a;
    --color-text: #5c5c5c;
    --color-border-envelope: #e0c8cb;
    --color-heart-red: #E74C3C;

    --font-title: 'Great Vibes', cursive;
    --font-body: 'Montserrat', sans-serif;
}

/* --- Estilos Globales (Mobile-First) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;

    /* === INICIO DE TEXTURA RUGOSA (VERSIÓN SVG) === */
    /* 1. El color de fondo sólido */
    background-color: var(--color-bg);
    /* 2. La capa de ruido SVG (generada por código) */
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100%25'%20height='100%25'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.75'%20numOctaves='1'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'%20opacity='0.25'/%3E%3C/svg%3E");
    /* 3. Fija el fondo para el efecto 'parallax' */
    background-attachment: fixed;
    /* === FIN DE LA TEXTURA === */
}

h1 {
    font-family: var(--font-title);
    color: var(--color-accent-h1);
}

h2,
h3, h4 {
    font-family: var(--font-title);
    color: var(--color-accent);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}


/* --- 1. ESTILOS DEL SOBRE --- */

.envelope-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Fondo homogéneo con la invitación */
    background-color: var(--color-bg);
    z-index: 100;
    transition: opacity 1s ease-out 0.5s;
    padding: 1rem;

    /* === INICIO DE TEXTURA RUGOSA (VERSIÓN SVG) === */
    background-color: var(--color-bg);
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100%25'%20height='100%25'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.75'%20numOctaves='1'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'%20opacity='0.25'/%3E%3C/svg%3E");
    background-attachment: fixed;
    /* === FIN DE LA TEXTURA === */
}

.envelope {
    position: relative;
    width: 300px;
    /* Ancho del sobre */
    height: 200px;
    /* Alto del sobre */
    cursor: pointer;
}

/* La base rectangular del sobre (detrás de las solapas) */
.envelope-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border: 1px solid var(--color-border-envelope);
}

/* Estilo base para todas las solapas */
.flap {
    position: absolute;
    /* Usamos el color de solapa que definiste */
    background-color: var(--color-primary);

    /* Sombra/borde del pliegue */
    box-shadow: 0 0 0 1px var(--color-border-envelope);
    transform-style: preserve-3d;
}

/* Solapa Superior (la que se anima) */
.flap-top {
    width: 100%;
    height: 100px;
    /* La mitad del alto */
    background-color: var(--color-primary-solapa) !important;
    top: 0;
    left: 0;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    z-index: 4;
    /* Encima de todas */
    transform-origin: top;
    transition: transform 0.5s ease-in-out;
}

/* Solapa Inferior */
.flap-bottom {
    width: 100%;
    height: 100px;
    /* La mitad del alto */
    bottom: 0;
    left: 0;
    clip-path: polygon(0 100%, 100% 100%, 50% 0);
    z-index: 3;
    /* Encima de izq/der, debajo de top */
}

/* Solapa Izquierda */
.flap-left {
    width: 150px;
    /* La mitad del ancho */
    height: 100%;
    top: 0;
    left: 0;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    z-index: 2;
    /* Encima del fondo */
}

/* Solapa Derecha */
.flap-right {
    width: 150px;
    /* La mitad del ancho */
    height: 100%;
    top: 0;
    right: 0;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
    z-index: 2;
    /* Encima del fondo */
}

.open-text {
    position: relative;
    font-family: var(--font-title);
    color: var(--color-text);
    /* Color de texto normal */
    font-size: 1.9rem;
    z-index: 5;
    margin-top: 1rem;
    text-shadow: none;
    /* No necesita sombra sobre fondo claro */
    transition: opacity 0.2s;
}

/* --- Animación al abrir (cuando se añade la clase .open) --- */
.envelope-wrapper.open {
    opacity: 0;
    pointer-events: none;
}

.envelope-wrapper.open .flap-top {
    transform: rotateX(180deg);
    transition-delay: 0.2s;
    box-shadow: none;
}

.envelope-wrapper.open .open-text {
    opacity: 0;
}


/* --- 3. ANIMACIÓN DE CORAZONES (AHORA INTEGRADA) --- */

.hearts-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 300px;
    height: 200px;
    z-index: 100;
    /* Encima del sobre */
    pointer-events: none;
}

.hearts-container i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: var(--color-heart-red);
    opacity: 0;
    /* Ocultos al inicio */
    transform: translate(-50%, -50%) rotate(45deg);
    animation-fill-mode: forwards;
}

.hearts-container i::before,
.hearts-container i::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--color-heart-red);
    border-radius: 50%;
}

.hearts-container i::before {
    top: -10px;
    left: 0;
}

.hearts-container i::after {
    top: 0;
    left: -10px;
}

@keyframes fly-out {
    0% {
        transform: translate(-50%, -50%) rotate(45deg) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--x-end)),
                calc(-50% + var(--y-end))) rotate(0deg) scale(1.5);
        opacity: 0;
    }
}

/* Disparar la animación de corazones */
.envelope-wrapper.open .hearts-container i {
    animation-name: fly-out;
    animation-duration: 2.5s;
    animation-timing-function: ease-out;
}

/* Trayectorias y delays de cada corazón */
.envelope-wrapper.open .hearts-container i:nth-child(1) {
    --x-end: 0px;
    --y-end: -200px;
    animation-delay: 0.1s;
}

.envelope-wrapper.open .hearts-container i:nth-child(2) {
    --x-end: 80px;
    --y-end: -150px;
    animation-delay: 0.3s;
}

.envelope-wrapper.open .hearts-container i:nth-child(3) {
    --x-end: -80px;
    --y-end: -180px;
    animation-delay: 0.2s;
}

.envelope-wrapper.open .hearts-container i:nth-child(4) {
    --x-end: 120px;
    --y-end: -100px;
    animation-delay: 0.5s;
}

.envelope-wrapper.open .hearts-container i:nth-child(5) {
    --x-end: -120px;
    --y-end: -120px;
    animation-delay: 0.4s;
}

.envelope-wrapper.open .hearts-container i:nth-child(6) {
    --x-end: 40px;
    --y-end: -120px;
    animation-delay: 0.25s;
}

.envelope-wrapper.open .hearts-container i:nth-child(7) {
    --x-end: -40px;
    --y-end: -170px;
    animation-delay: 0.35s;
}

.envelope-wrapper.open .hearts-container i:nth-child(8) {
    --x-end: 100px;
    --y-end: -200px;
    animation-delay: 0.15s;
}

.envelope-wrapper.open .hearts-container i:nth-child(9) {
    --x-end: -100px;
    --y-end: -150px;
    animation-delay: 0.45s;
}

.envelope-wrapper.open .hearts-container i:nth-child(10) {
    --x-end: 0px;
    --y-end: -140px;
    animation-delay: 0.55s;
}

/* --- 4. ANIMACIÓN DE CONFETI --- */

/* 1. Hacemos que el header sea el "padre" del confeti */
.header {
    position: relative;
    /* Muy importante para que el confeti se posicione bien */
    overflow: hidden;
    /* Oculta el confeti que se sale del header */
}

/* 2. El contenedor del confeti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 50%;
    /* Empieza centrado */
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    /* Para que no bloquee clics */
}

/* 3. Cada pieza de confeti (<i>) */
.confetti-container i {
    position: absolute;
    display: block;
    width: 8px;
    height: 12px;
    opacity: 0;
    /* Empieza invisible */

    /* Inicia sobre el título "¡Nos Casamos!" */
    top: 10%;
    left: 50%;
    transform-origin: center;

    /* Disparamos la animación */
    animation-name: confetti-burst;
    animation-duration: 2s;
    /* Duración total de la caída */
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;

    /* ¡LA CLAVE! Retrasamos la animación 1.5s */
    /* Esto debe coincidir con el 'animationDuration' de tu script.js */
    animation-delay: 1.5s;
}

/* 4. La animación de explosión y caída */
@keyframes confetti-burst {
    0% {
        /* Inicia en el centro, visible y pequeño */
        opacity: 1;
        transform: translate(-50%, 0) rotate(0deg) scale(1);
    }

    100% {
        /* Cae, se mueve a su destino, gira y desaparece */
        opacity: 0;
        transform: translate(var(--x-end), var(--y-end)) rotate(720deg) scale(0.5);
    }
}

/* 5. Damos colores y trayectorias únicas a cada pieza */
/* Usaremos los colores de tu paleta y variaciones */

/* === Confeti de la Primera Onda (colores de Confeti) === */
.confetti-container i:nth-child(1) {
    --x-end: 180px;
    --y-end: 250px;
    background-color: var(--color-confeti1);
    animation-delay: 1.5s;
}

.confetti-container i:nth-child(2) {
    --x-end: -160px;
    --y-end: 230px;
    background-color: var(--color-confeti2);
    animation-delay: 1.55s;
}

.confetti-container i:nth-child(3) {
    --x-end: 120px;
    --y-end: 280px;
    background-color: var(--color-confeti3);
    animation-delay: 1.6s;
}

.confetti-container i:nth-child(4) {
    --x-end: -100px;
    --y-end: 260px;
    background-color: var(--color-confeti4);
    animation-delay: 1.65s;
}

.confetti-container i:nth-child(5) {
    --x-end: 220px;
    --y-end: 320px;
    background-color: var(--color-accent);
    animation-delay: 1.7s;
}

/* === Confeti de la Segunda Onda (más dispersos) === */
.confetti-container i:nth-child(6) {
    --x-end: -220px;
    --y-end: 300px;
    background-color: var(--color-confeti1);
    animation-delay: 1.75s;
    width: 10px;
    height: 10px;
}

.confetti-container i:nth-child(7) {
    --x-end: 80px;
    --y-end: 240px;
    background-color: var(--color-confeti2);
    animation-delay: 1.8s;
}

.confetti-container i:nth-child(8) {
    --x-end: -80px;
    --y-end: 200px;
    background-color: var(--color-confeti3);
    animation-delay: 1.85s;
    width: 10px;
    height: 10px;
}

.confetti-container i:nth-child(9) {
    --x-end: 150px;
    --y-end: 300px;
    background-color: var(--color-confeti4);
    animation-delay: 1.9s;
}

.confetti-container i:nth-child(10) {
    --x-end: -180px;
    --y-end: 330px;
    background-color: var(--color-accent);
    animation-delay: 1.95s;
    width: 10px;
    height: 10px;
}

/* === Confeti de la Tercera Onda (más lejos y rápido) === */
.confetti-container i:nth-child(11) {
    --x-end: 250px;
    --y-end: 350px;
    background-color: var(--color-confeti1);
    animation-delay: 1.5s;
    width: 10px;
    height: 10px;
}

.confetti-container i:nth-child(12) {
    --x-end: -250px;
    --y-end: 380px;
    background-color: var(--color-confeti2);
    animation-delay: 1.55s;
}

.confetti-container i:nth-child(13) {
    --x-end: 190px;
    --y-end: 300px;
    background-color: var(--color-confeti3);
    animation-delay: 1.6s;
    width: 10px;
    height: 10px;
}

.confetti-container i:nth-child(14) {
    --x-end: -190px;
    --y-end: 270px;
    background-color: var(--color-confeti4);
    animation-delay: 1.65s;
}

.confetti-container i:nth-child(15) {
    --x-end: 300px;
    --y-end: 400px;
    background-color: var(--color-accent);
    animation-delay: 1.7s;
    width: 10px;
    height: 10px;
}

/* === Nuevas Piezas de Confeti (cuarta y quinta onda) === */

.confetti-container i:nth-child(16) {
    --x-end: -300px;
    --y-end: 380px;
    background-color: var(--color-confeti1);
    animation-delay: 1.75s;
}

.confetti-container i:nth-child(17) {
    --x-end: 100px;
    --y-end: 220px;
    background-color: var(--color-confeti2);
    animation-delay: 1.8s;
    width: 8px;
    height: 8px;
}

.confetti-container i:nth-child(18) {
    --x-end: -100px;
    --y-end: 240px;
    background-color: var(--color-confeti3);
    animation-delay: 1.85s;
}

.confetti-container i:nth-child(19) {
    --x-end: 180px;
    --y-end: 350px;
    background-color: var(--color-confeti4);
    animation-delay: 1.9s;
    width: 8px;
    height: 8px;
}

.confetti-container i:nth-child(20) {
    --x-end: -180px;
    --y-end: 300px;
    background-color: var(--color-accent);
    animation-delay: 1.95s;
}

.confetti-container i:nth-child(21) {
    --x-end: 50px;
    --y-end: 300px;
    background-color: var(--color-confeti1);
    animation-delay: 1.52s;
    width: 12px;
    height: 8px;
}

.confetti-container i:nth-child(22) {
    --x-end: -50px;
    --y-end: 320px;
    background-color: var(--color-confeti2);
    animation-delay: 1.57s;
}

.confetti-container i:nth-child(23) {
    --x-end: 200px;
    --y-end: 270px;
    background-color: var(--color-confeti3);
    animation-delay: 1.62s;
    width: 8px;
    height: 12px;
}

.confetti-container i:nth-child(24) {
    --x-end: -200px;
    --y-end: 290px;
    background-color: var(--color-confeti4);
    animation-delay: 1.67s;
}

.confetti-container i:nth-child(25) {
    --x-end: 280px;
    --y-end: 310px;
    background-color: var(--color-accent);
    animation-delay: 1.72s;
    width: 10px;
    height: 10px;
}

.confetti-container i:nth-child(26) {
    --x-end: -280px;
    --y-end: 340px;
    background-color: var(--color-confeti1);
    animation-delay: 1.77s;
}

.confetti-container i:nth-child(27) {
    --x-end: 130px;
    --y-end: 260px;
    background-color: var(--color-confeti2);
    animation-delay: 1.82s;
    width: 12px;
    height: 8px;
}

.confetti-container i:nth-child(28) {
    --x-end: -130px;
    --y-end: 280px;
    background-color: var(--color-confeti3);
    animation-delay: 1.87s;
}

.confetti-container i:nth-child(29) {
    --x-end: 160px;
    --y-end: 330px;
    background-color: var(--color-confeti4);
    animation-delay: 1.92s;
    width: 8px;
    height: 12px;
}

.confetti-container i:nth-child(30) {
    --x-end: -160px;
    --y-end: 350px;
    background-color: var(--color-accent);
    animation-delay: 1.97s;
}

.confetti-container i:nth-child(31) {
    --x-end: 90px;
    --y-end: 210px;
    background-color: var(--color-confeti1);
    animation-delay: 1.5s;
}

.confetti-container i:nth-child(32) {
    --x-end: -90px;
    --y-end: 230px;
    background-color: var(--color-confeti2);
    animation-delay: 1.55s;
    width: 10px;
    height: 10px;
}

.confetti-container i:nth-child(33) {
    --x-end: 230px;
    --y-end: 280px;
    background-color: var(--color-confeti3);
    animation-delay: 1.6s;
}

.confetti-container i:nth-child(34) {
    --x-end: -230px;
    --y-end: 260px;
    background-color: var(--color-confeti4);
    animation-delay: 1.65s;
    width: 12px;
    height: 8px;
}

.confetti-container i:nth-child(35) {
    --x-end: 140px;
    --y-end: 300px;
    background-color: var(--color-accent);
    animation-delay: 1.7s;
}

/* --- 2. ESTILOS DE LA INVITACIÓN --- */
/* (Esta parte no cambia) */

.invitation {
    display: none;
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
    animation-delay: 1s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-primary);
}

.section:last-child {
    border-bottom: none;
}

/* --- ESTILOS CUENTA ATRÁS --- */
.countdown {
    text-align: center;
}

#countdown-timer {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    /* <-- CAMBIO 1: No romper la línea */
    gap: 0.5rem;
    /* <-- CAMBIO 2: Reducir el espacio */
    margin-top: 1rem;
}

.timer-box {
    background-color: var(--color-sandra4);
    border: 1px solid var(--color-sandra3);
    border-radius: 8px;
    padding: 0.5rem;
    /* <-- CAMBIO 3: Reducir el padding */
    /* min-width: 80px; <-- BORRA ESTA LÍNEA */
    flex: 1;
    /* <-- CAMBIO 4: Hacer que las cajas se repartan el espacio */
    min-width: 0;
    /* <-- CAMBIO 5: Necesario para que flex:1 funcione bien */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Estilo para los números */
.timer-box span[id] {
    font-family: var(--font-body);
    font-size: 1.8rem;
    /* <-- CAMBIO 6: Reducir el número */
    font-weight: bold;
    line-height: 1.2;
}

/* Estilo para las etiquetas (Días, Horas...) */
.timer-box .label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    /* <-- CAMBIO 7: Reducir la etiqueta */
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* Estilos del Timeline */
.timeline ul {
    list-style: none;
    position: relative;
    padding: 1rem 0;
}

.timeline ul::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--color-accent);
}

.timeline li {
    position: relative;
    padding: 1rem 0;
    width: 50%;

    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centra todo horizontalmente */
}

.timeline li::after {
    content: '';
    position: absolute;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-accent);
    border: 2px solid var(--color-bg);
}

.timeline li:nth-child(odd) {
    left: 0;
    padding-right: 1rem;
    align-items: flex-end;
}

.timeline li:nth-child(odd)::after {
    right: -8px;
}

.timeline li:nth-child(even) {
    left: 50%;
    padding-left: 1rem;
    align-items: flex-start;
}

.timeline li:nth-child(even)::after {
    left: -8px;
}

.timeline time {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--color-text);
    font-weight: bold;
}

.timeline-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    /* Las hace redondas */
    object-fit: cover;
    /* Evita que la imagen se deforme */
    margin: 0.5rem 0;
    /* Espacio arriba y abajo */
    border: 0.5px solid var(--color-accent);
    /* Borde con tu color */
    background-color: var(--color-bg);
    /* Fondo por si la img es transparente */
    padding: 1.5px;
    /* Pequeño espacio entre borde e imagen */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Sombra sutil */
}

/* --- ESTILOS SECCIÓN BUS --- */
.bus-service {
    text-align: left;
    /* Alineamos el texto del bus a la izquierda */
}

.bus-image {
    width: 100%;
    max-width: 400px;
    /* Un tamaño máximo para la furgo */
    display: block;
    margin: 1rem auto;
    /* Centrada */
    border-radius: 8px;
}

.bus-service p {
    margin: 0.5rem 0;
}

#rsvp-form p {
    margin-top: 1rem;
    font-family: var(--font-body);
    font-weight: bold;
}

.form-option {
    margin: 0.5rem 0 0.5rem 1rem;
    /* Pequeña sangría */
    display: flex;
    align-items: center;
}

/* Mejora la apariencia de los checkbox y radio */
.form-option input[type="checkbox"],
.form-option input[type="radio"] {
    margin-right: 0.75rem;
    /* Acentúa el color de los botones */
    accent-color: var(--color-accent);
    transform: scale(1.2);
    /* Un poco más grandes */
}

.form-option label {
    font-size: 1rem;
    font-family: var(--font-body);
}

/* Estilos del Mapa (Responsive) */
.map-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    border-radius: 8px;
    margin-top: 1rem;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- ESTILOS FORMULARIO RSVP DESPLEGABLE --- */
.rsvp-form-details {
    background-color: #fff;
    border: 1px solid var(--color-border-envelope);
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.rsvp-form-details summary {
    padding: 1rem;
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    /* Quita el triángulo por defecto */
}

/* Ocultar el marcador de flecha en Chrome/Safari */
.rsvp-form-details summary::-webkit-details-marker {
    display: none;
}

/* Cambia el "+" por un "-" cuando está abierto */
.rsvp-form-details[open] summary {
    border-bottom: 1px dashed var(--color-border-envelope);
}

.form-fields {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* Espacio entre campos */
}

.form-fields label {
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: -0.25rem;
    /* Acerca la etiqueta al campo */
}

.form-fields input[type="text"],
.form-fields textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border-envelope);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-bg);
    /* Fondo beige pálido */
}

.form-fields textarea {
    resize: vertical;
    /* Permite redimensionar solo verticalmente */
}

.rsvp-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.button:hover {
    transform: scale(1.05);
}

.button.whatsapp {
    background-color: #25D366;
    color: white;
}

.button.email {
    background-color: var(--color-secondary);
    color: var(--color-text);
}

/* --- ESTILOS PARA DESHABILITAR BOTONES --- */
.rsvp-buttons .button.disabled {
    opacity: 0.6;
    pointer-events: none;
    /* ¡Esta es la clave! Impide el clic */
    cursor: not-allowed;
}

/* --- ESTILOS SECCIÓN REGALO (ACTUALIZADO) --- */
.gift-note {
    text-align: center;
}

.gift-note p:first-child {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.gift-note>p {
    /* El texto en cursiva */
    font-style: italic;
    font-size: 1.2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
    /* Espacio para los botones */
}

/* Botones "Ver IBAN" / "Ver Bizum" */
.button-reveal {
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 2px solid var(--color-accent);
    background-color: transparent;
    color: var(--color-accent);
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 0.5rem;
}

.button-reveal:hover {
    background-color: var(--color-accent);
    color: white;
}

/* El contenedor que se revela */
.gift-details {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    height: 40px;
}

/* El campo de texto (solo lectura) */
.gift-details input[readonly] {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    padding: 0.5rem;
    border: 1px dashed var(--color-accent);
    border-radius: 5px 0 0 5px;
    background-color: var(--color-bg);
    color: var(--color-text);
    width: 240px;
    /* Ancho para el IBAN */
}

/* El botón de "Copiar" */
.gift-details button {
    font-family: var(--font-body);
    font-weight: bold;
    border: 1px solid var(--color-accent);
    background-color: var(--color-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Mensaje de "Copiado!" */
#copy-success-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-sandra1);
    /* Verde de tu paleta */
    font-weight: bold;
}

/* --- RESPONSIVE (Para Escritorio) --- */
@media (min-width: 600px) {
    .rsvp-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .invitation {
        padding: 2rem;
    }

    .bus-service {
        /* Añade padding a los lados solo en escritorio */
        padding-left: 4rem;
        padding-right: 4rem;
    }

    #countdown-timer {
        gap: 1rem;
        /* Devuelve el espacio original */
    }

    .timer-box {
        padding: 1rem;
        /* Devuelve el padding original */
        flex: 0 1 80px;
        /* Quita la flexibilidad y le da un ancho de 80px */
    }

    .timer-box span[id] {
        font-size: 2.5rem;
        /* Devuelve el tamaño de número original */
    }

    .timer-box .label {
        font-size: 0.8rem;
        /* Devuelve el tamaño de etiqueta original */
    }
}