/* Variables de color y fuentes basadas en el PDF */
:root {
    --color-fondo: #FDFCF8; /* Marfil muy claro */
    --color-texto: #4A4F54; /* Gris oscuro para texto */
    --color-acento-rosa: #D49A9B; /* Rosa tenue para "Nos casamos" y script */
    --color-acento-verde: #769080; /* Verde salvia para botones y countdown */
    --color-acento-vino: #8D3B4C; /* Vino para iconos */
    --color-tarjeta: #F6F3EC; /* Beige para tarjetas */
    
    --fuente-titulos: 'Cormorant Garamond', serif;
    --fuente-script: 'Great Vibes', cursive;
    --fuente-texto: 'Cormorant Garamond', serif;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--color-fondo);
}

body {
    color: var(--color-texto);
    font-family: var(--fuente-texto);
    line-height: 1.6;
    overflow-x: hidden;
    text-align: center;
    background-color: transparent;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../assets/img/flores-borde.png');
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    z-index: -1;
    pointer-events: none;
}

@media (min-width: 768px) {
    body::before {
        background-image: url('../assets/img/fondo-horizontal-1920x1080.png');
        background-size: cover;
        background-position: bottom center;
    }
}

/* Tipografía global */
h1, h2, h3, h4 {
    font-family: var(--fuente-titulos);
    font-weight: 500;
    letter-spacing: 2px;
    text-align: center;
    color: var(--color-texto);
}

.title-main {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.subtitle-pink {
    font-family: var(--fuente-texto);
    color: var(--color-acento-rosa);
    font-size: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.date-text {
    font-size: 1.4rem;
    letter-spacing: 5px;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.script-pink {
    font-family: var(--fuente-script);
    color: var(--color-acento-rosa);
    font-size: 2.2rem;
    text-transform: none;
    letter-spacing: 1px;
    font-weight: normal;
    margin: 1rem 0;
}

p {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--color-texto);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}



.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-acento-verde);
    color: var(--color-acento-verde);
    padding: 10px 25px;
    font-family: var(--fuente-texto);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

.btn-outline:hover {
    background-color: var(--color-acento-verde);
    color: white;
}

.btn-solid {
    background-color: var(--color-acento-verde);
    border: none;
    color: white;
    padding: 12px 30px;
    font-family: var(--fuente-texto);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-solid:hover {
    background-color: #5c7465;
}

/* Secciones como páginas del PDF */
.pdf-page {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 1.5rem 6rem 1.5rem;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 800px) {
    .pdf-page {
        background-size: 800px auto;
    }
}

/* Page 1: Hero */
.hero-img {
    width: 100%;
    max-width: 350px;
    height: auto;
    margin: 1rem auto;
    display: block;
    border-radius: 10px;
}

/* Page 2: Countdown & Audio */
.countdown-container {
    background-color: var(--color-acento-verde);
    border-radius: 40px;
    padding: 15px 30px;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem auto 3rem;
    color: white;
    box-shadow: 0 4px 15px rgba(118, 144, 128, 0.3);
}

.count-item {
    text-align: center;
}

.count-item span {
    display: block;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.2;
    font-family: var(--fuente-texto);
}

.count-item label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--fuente-texto);
}

.audio-title {
    font-family: var(--fuente-texto);
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: var(--color-texto);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Tarjetas (Cards) */
.card-beige {
    background-color: var(--color-tarjeta);
    border-radius: 12px;
    padding: 2.5rem;
    margin: 1.5rem auto;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
}

.card-beige h3 {
    color: var(--color-acento-verde);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-transform: none;
}

.card-beige p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.icon-svg {
    width: 40px;
    height: 40px;
    fill: var(--color-acento-vino);
    margin-bottom: 1rem;
}

/* Dress Code Card */
.dress-code-card {
    background-color: #EBE5DB;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem auto;
    max-width: 450px;
    position: relative;
    z-index: 10;
}

.dress-code-title {
    color: var(--color-acento-rosa);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.dress-code-inner {
    background-color: #FDFCF8;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.dress-code-inner h4 {
    color: var(--color-acento-rosa);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-transform: none;
}

.dress-code-inner p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Galería */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 2rem 0;
    width: 100%;
    
    /* Estilo tipo álbum / marco blanco */
    background-color: #FFFFFF;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border: 1px solid #EBE5DB;
}

@media (min-width: 600px) {
    .galeria-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 20px;
    }
}

.galeria-item {
    aspect-ratio: 3/4;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px; /* Suavizar apenas las esquinas de la foto */
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.galeria-item:hover img {
    transform: scale(1.05);
}

/* RSVP Form */
.rsvp-form {
    background: #FDFCF8;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-top: 1rem;
    width: 100%;
    max-width: 450px;
    border: 1px solid #EBE5DB;
}

.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-family: var(--fuente-texto);
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--color-texto);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #EBE5DB;
    border-radius: 6px;
    font-family: var(--fuente-texto);
    font-size: 1.1rem;
    background: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-acento-verde);
}

/* Mensaje RSVP */
#rsvp-mensaje {
    display: none;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    font-family: var(--fuente-texto);
    font-size: 0.9rem;
}
.msg-success { background: #e8f5e9; color: #2e7d32; }
.msg-error { background: #ffebee; color: #c62828; }

/* Lightbox */
#lightbox {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
#lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border: 2px solid white;
}
#lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    color: white; font-size: 2.5rem;
    cursor: pointer;
}

/* Animaciones de scroll (Fade in) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mariposas SVG Animadas */
.mariposa {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    width: 40px;
    height: 40px;
    opacity: 0.6;
}

.mariposa svg {
    width: 100%;
    height: 100%;
    animation: aleteo 0.3s infinite alternate ease-in-out;
}

.m1 { top: 20%; right: 10%; fill: #E5B25D; color: #E5B25D; animation: flotar1 6s infinite ease-in-out; }
.m2 { top: 30%; left: 10%; fill: #D49A9B; color: #D49A9B; animation: flotar2 8s infinite ease-in-out; }
.m3 { top: 15%; right: 15%; fill: #769080; color: #769080; animation: flotar1 7s infinite ease-in-out reverse; }
.m4 { top: 25%; left: 15%; fill: #8D3B4C; color: #8D3B4C; animation: flotar2 9s infinite ease-in-out alternate-reverse; }
.m5 { top: 40%; left: 80%; fill: #E5B25D; color: #E5B25D; animation: flotar1 8s infinite ease-in-out; }
.m6 { top: 35%; right: 80%; fill: #D49A9B; color: #D49A9B; animation: flotar2 7.5s infinite ease-in-out reverse; }

@keyframes aleteo {
    0% { transform: scaleY(1); }
    100% { transform: scaleY(0.4); }
}
@keyframes flotar1 {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-20px) translateX(-10px); }
}
@keyframes flotar2 {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(25px) translateX(15px); }
}

/* Botón flotante de música */
.btn-music {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--color-tarjeta);
    border: 2px solid #EBE5DB;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: var(--color-acento-verde);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-music:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Reproductor de audio personalizado */
.custom-audio-player {
    display: flex;
    align-items: center;
    background-color: var(--color-tarjeta);
    border: 1px solid #EBE5DB;
    border-radius: 12px;
    padding: 15px;
    max-width: 320px;
    margin: 3rem auto 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.album-art {
    width: 50px;
    height: 50px;
    background-color: #FFFFFF;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}
.track-info {
    flex-grow: 1;
    text-align: left;
}
.track-title {
    font-family: var(--fuente-texto);
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0;
    color: var(--color-texto);
}
.track-artist {
    font-family: var(--fuente-texto);
    font-size: 0.9rem;
    margin: 0;
    color: #888;
}
.play-btn {
    background: var(--color-acento-verde);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.play-btn:hover {
    transform: scale(1.05);
}
