/* --- Paleta de Colores y Tipografía --- */
:root {
    --classic-blue: #0F4C81;
    --light-blue: #A9CCE3;
    --soft-pink: #FADBD8;
    --text-dark: #333;
    --text-light: #f4f4f4;
    --font-heading: 'Great Vibes', cursive;
    --font-body: 'Cormorant Garamond', serif;
    --seal-gold-start: #D4AF37;
    --seal-gold-end: #FFD700;

    /* Nuevos colores para el sobre blanco/azul */
    --envelope-white: #ffffff;
    --envelope-border-blue: #0F4C81; /* Usamos el classic-blue para el contorno */
}

/* --- Estilos Generales --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: #fdfdfd;
    background-image: url('images/background-watercolor.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* --- Animación del Sobre 3D --- */
.envelope-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background-image: url('images/background-watercolor.png');
    background-size: cover;
    background-position: center;
    perspective: 1200px;
    transition: opacity 1s ease-in-out 1.5s;
}
.envelope {
    position: relative;
    width: 320px;
    height: 220px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.envelope-base {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--envelope-white); /* Color base blanco */
    border-radius: 8px;
    box-shadow: 0 0 0 2px var(--envelope-border-blue), 0 10px 30px rgba(0,0,0,0.3); /* Contorno azul y sombra */
}
.envelope-flap-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, var(--envelope-white) 0%, #e0e0e0 100%); /* Solapa blanca */
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    transition: transform 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 3;
    border-bottom: 2px solid var(--envelope-border-blue); /* Borde inferior azul de la solapa */
}
.envelope-letter {
    position: absolute;
    top: 0;
    left: 10px;
    width: 300px;
    height: 200px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 2;
    transition: transform 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.2s, opacity 0.5s ease-out 0.8s;
    opacity: 0;
}
.seal {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--seal-gold-end), var(--seal-gold-start));
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 4;
    transition: opacity 0.5s, transform 0.5s;
}
.envelope-prompt {
    margin-top: 25px;
    font-size: 1.2rem;
    color: var(--text-dark);
    background: rgba(255,255,255,0.7);
    padding: 8px 20px;
    border-radius: 20px;
    transition: opacity 0.5s;
}

/* --- Estados al Abrir --- */
.envelope-wrapper.open .envelope-flap-top { transform: rotateX(180deg); }
.envelope-wrapper.open .envelope-letter { transform: translateY(-120px); opacity: 1; }
.envelope-wrapper.open .seal { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
.envelope-wrapper.open .envelope-prompt { opacity: 0; }
.envelope-wrapper.open .envelope { transform: rotateY(-90deg) translateX(-300px) scale(0.5); }
.envelope-wrapper.open { opacity: 0; pointer-events: none; }

/* --- Contenido de la Invitación --- */
.hidden-content { display: none; }
.envelope-wrapper.open + .hidden-content {
    display: block;
    animation: fadeInContent 1s forwards;
    animation-delay: 1.5s;
}
@keyframes fadeInContent { from { opacity: 0; } to { opacity: 1; } }

.invitation-container {
    max-width: 700px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
section, header, footer { text-align: center; padding: 40px 20px; border-bottom: 1px solid var(--light-blue); }
h1, h2, .final-names { font-family: var(--font-heading); color: var(--classic-blue); }
h2 { font-size: 2.8rem; margin-bottom: 20px; }
p { font-size: 1.1rem; line-height: 1.8; }
.cover-section { position: relative; min-height: 90vh; display: flex; flex-direction: column; justify-content: center; align-items: center; border-bottom: none; }
.cover-section .names, .cover-section .tagline, .cover-section .date { position: relative; z-index: 2; }
.cover-section h1 { font-size: 4rem; }
.cover-section .tagline { font-size: 1.3rem; margin: 10px 0 20px; font-style: italic; }
.cover-section .date { font-size: 1.5rem; font-weight: 700; }
#particles-js { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 1; }
.parents-box { background-color: #ffffff; border-radius: 10px; padding: 30px; max-width: 500px; margin: 0 auto; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.parent-name { font-family: var(--font-heading); font-size: 1.8rem; }
.welcome-message { margin-top: 30px; }
.countdown-timer { display: flex; justify-content: space-around; max-width: 400px; margin: 0 auto; }
.time-circle { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, var(--soft-pink) 0%, var(--light-blue) 100%); color: var(--classic-blue); font-weight: bold; }
.time-circle span { font-size: 1.8rem; }
.music-player { display: flex; align-items: center; justify-content: center; gap: 20px; max-width: 400px; margin: 0 auto; padding: 20px; background-color: rgba(240, 248, 255, 0.7); border-radius: 15px; }
#play-pause-btn { background: var(--classic-blue); border: none; border-radius: 50%; width: 60px; height: 60px; color: white; font-size: 1.5rem; cursor: pointer; }
.song-title { font-weight: bold; }
.location-item { margin-bottom: 30px; }
.map-link { display: inline-block; margin-top: 10px; padding: 10px 20px; background-color: var(--classic-blue); color: var(--text-light); text-decoration: none; border-radius: 5px; }
#rsvpForm { display: flex; flex-direction: column; gap: 15px; max-width: 400px; margin: 0 auto; }
#rsvpForm input, #rsvpForm textarea { width: 100%; padding: 12px; border: 1px solid var(--light-blue); border-radius: 5px; font-family: var(--font-body); }
#rsvpForm button { padding: 15px; border: none; background-color: var(--classic-blue); color: white; cursor: pointer; }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.photo-grid img { width: 100%; height: 180px; object-fit: cover; border-radius: 5px; }
.closing-section { border-bottom: none; }
.final-names { margin-top: 20px; font-size: 2.5rem; }
.calendar-card { max-width: 520px; margin: 0 auto; background: rgba(255,255,255,0.9); border: 1px solid var(--light-blue); border-radius: 12px; padding: 16px; }
.calendar-table { width: 100%; }
.wedding-day { background: radial-gradient(circle, var(--soft-pink) 0%, var(--light-blue) 100%); border-radius: 50%; display: inline-block; width: 36px; height: 36px; line-height: 36px; }
.story-collapsible { max-height: 0; overflow: hidden; transition: max-height 0.7s ease-in-out; }
.story-toggle-btn { display: inline-block; margin-top: 20px; padding: 10px 25px; background-color: var(--classic-blue); color: var(--text-light); border: none; border-radius: 5px; cursor: pointer; }

/* --- Estilos Corregidos para Recomendaciones --- */
.recommendations-section h2 {
    font-size: 3rem; /* Aumentamos un poco el tamaño del título principal */
    margin-bottom: 15px;
}
.accordion-item { 
    border: 1px solid var(--light-blue); 
    margin-bottom: 10px; 
    border-radius: 8px; 
    overflow: hidden; /* Importante para el efecto del acordeón */
}
.accordion-header {
    width: 100%;
    padding: 15px 20px;
    background-color: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}
.accordion-header:hover {
    background-color: rgba(240, 248, 255, 0.7);
}
.accordion-title {
    font-family: var(--font-heading); /* Tipografía caligráfica */
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--classic-blue);
}
.accordion-icon {
    transition: transform 0.3s ease-in-out;
}
.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fdfdfd;
}
.accordion-content p {
    padding: 0 20px 15px;
    font-size: 1.1rem; /* Aumentamos ligeramente el tamaño para mejor lectura */
    line-height: 1.7;
    text-align: left;
}
.gift-link { 
    display: inline-block; 
    margin: 5px 20px 15px;
    padding: 8px 15px; 
    background-color: var(--classic-blue); 
    color: var(--text-light); 
    text-decoration: none; 
    border-radius: 5px; 
}

@media (min-width: 600px) {
    .cover-section h1 { font-size: 6rem; }
    .photo-grid { grid-template-columns: repeat(4, 1fr); }
    .photo-grid img { height: 200px; }
}