/* --- VARIABLES --- */
:root {
    --bg-light: #FDFBF7;
    --gold: #B49461;
    --brown-red: #D66D67; /* Color de las cajas del contador */
    --text-dark: var(--gold);
    --text-soft: var(--gold);
    --f-serif: 'Times New Roman', Times, serif;
    --f-sans: 'Montserrat', sans-serif;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

a { text-decoration: none; color: inherit; }

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--f-sans);
    overflow-x: hidden;
    line-height: 1.4;
}

/* --- OVERLAY --- */
#envelope-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-light); z-index: 2000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
}
.envelope-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.envelope-wrapper { width: 220px; cursor: pointer; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; }
.envelope-wrapper:active { transform: scale(0.9); }
.envelope-wrapper img { width: 100%; height: auto; display: block; }

/* ANIMATION HAND */
.hand-anim-container {
    position: absolute;
    bottom: -10px; 
    right: 35px; 
    width: 60px;
    height: auto;
    pointer-events: none;
    animation: handTouchMagical 2s infinite ease-in-out;
    z-index: 10;
}
.hand-touch {
    width: 100%;
    filter: drop-shadow(0 0 8px rgba(180, 148, 97, 0.6));
}

@keyframes handTouchMagical {
    0% { transform: translateY(0) scale(1); filter: brightness(1); }
    50% { transform: translateY(-12px) scale(0.92); filter: brightness(1.3) drop-shadow(0 0 15px rgba(180, 148, 97, 0.9)); }
    100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

/* ENVELOPE TEXT */
.envelope-text-group { margin-top: 30px; text-align: center; }
.envelope-title-main { 
    font-family: var(--f-serif);
    font-size: 1.4rem;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: normal;
}
.envelope-subtitle-sub {
    font-family: var(--f-serif);
    font-size: 0.95rem;
    color: var(--gold);
}
#particles-canvas { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; }

/* --- CONTENIDO --- */
.is-hidden { display: none !important; }

.block-section {
    width: 100%; max-width: 480px; margin: 0 auto;
    padding: 50px 20px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; position: relative;
    overflow: hidden;
}

.block-divider {
    border: none; border-top: 1px solid rgba(180, 148, 97, 0.3);
    width: 90%; margin: 0 auto;
}

/* BLOQUE 1 */
.audio-btns-top { display: flex; gap: 15px; margin-bottom: 30px; }
.btn-circular-audio { 
    background: none; border: none; cursor: pointer; width: 35px; height: 35px; 
}
.btn-circular-audio.paused { opacity: 0.3; }

.logo-top { width: 100%; max-width: 280px; margin-top: 40px; margin-bottom: 20px; }

.heart-icon-wrap { margin-bottom: 25px; }
.heart-gold { width: 22px; }

/* SLIDER POLAROID (Bloque 3) */
.polaroid-slider-container {
    width: 100%;
    position: relative;
    overflow: hidden; /* Ocultar las otras fotos para que no se vean las esquinas */
    margin-top: 30px;
    padding-bottom: 20px;
}
.polaroid-slider-container .slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    width: 100%;
}
.polaroid-slider-container .slide {
    min-width: 100%;
    flex-shrink: 0;
    padding: 10px 0; /* Eliminado el padding lateral extra */
    display: flex;
    justify-content: center;
}
.polaroid-frame {
    background: none;
    padding: 0;
    box-shadow: none;
    position: relative;
    width: 100%;
    max-width: 400px; /* Tamaño equilibrado para evitar recortes */
    transition: transform 0.3s ease;
}
/* Escalamiento individual por foto para compensar rotación visual y dar protagonismo */
.p-scale-1 { transform: scale(1.05); }
.p-scale-2 { transform: scale(1.1); }
.p-scale-3 { transform: scale(1.08); }
.p-scale-4 { transform: scale(1.12); }
.p-scale-5 { transform: scale(1.05); }
.p-scale-6 { transform: scale(1.12); }
.p-scale-7 { transform: scale(1.1); }
.p-scale-8 { transform: scale(1.08); }

.polaroid-frame img {
    width: 100%;
    height: auto;
    display: block;
    border: none;
    box-shadow: none;
}
.slider-arrows {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}
.arrow-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 60px;
    transition: transform 0.2s ease;
    opacity: 0.8;
}
.arrow-btn:active { transform: scale(0.9); }
.arrow-btn img { width: 100%; }

/* BADGE PLANNER - REPLICA EXACTA */
.badge-planner {
    margin-top: 6px;
    padding: 3px 0;
    background-color: #B49461;
    border-radius: 50px;
    color: white;
    font-family: var(--f-sans);
    font-size: 0.6rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    display: block;
    width: 80%; /* Equivale al 40-45% del bloque de 3 columnas */
    margin-left: auto;
    margin-right: auto;
}

.logo-mini-bottom { width: 140px; margin-bottom: 25px; margin-top: 20px; }
.phrase-intro-svg { width: 100%; max-width: 280px; margin-bottom: 45px; } /* Espacio refinado */

/* Countdown Estilo Imagen */
#countdown-v3 { margin-bottom: 40px; }
.cd-group { display: flex; align-items: center; gap: 8px; }
.cd-box { display: flex; flex-direction: column; align-items: center; }
.cd-box span { 
    background: #D56D67; color: white; 
    font-family: var(--f-sans); font-weight: 600; font-size: 1.4rem;
    padding: 6px 10px; border-radius: 4px; min-width: 45px;
    box-shadow: 0 4px 10px rgba(214, 109, 103, 0.2);
}
.cd-box label { font-size: 0.6rem; margin-top: 6px; color: var(--text-soft); text-transform: uppercase; }
.cd-sep { font-size: 1.2rem; margin-bottom: 18px; color: #D56D67; font-weight: bold; }

.btn-share-circ { background: none; border: none; cursor: pointer; width: 40px; }

/* BLOQUE 2 */
.photo-floral-frame {
    position: relative; width: 320px; 
    margin-bottom: 30px;
}
.photo-img { 
    width: 100%; height: auto; border-radius: 0; 
    animation: floatingMain 6s ease-in-out infinite;
}
@keyframes floatingMain {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.romance-phrase {
    font-family: var(--f-serif); font-style: italic; font-size: 1.15rem;
    color: var(--gold); max-width: 85%; line-height: 1.3; margin-bottom: 30px;
}

.fecha-svg { width: 100%; max-width: 250px; margin-bottom: 30px; }
.cer-rec-svg { width: 100%; max-width: 400px; margin-bottom: 40px; }

.info-icons-row { display: flex; justify-content: space-around; width: 100%; margin-top: 10px; }
.info-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.info-item img { width: 35px; height: 35px; opacity: 0.8; }
.info-item span { font-size: 0.65rem; color: var(--gold); letter-spacing: 1px; font-weight: 600; }

.corner-flower { position: absolute; width: 80px; pointer-events: none; opacity: 0.7; }
.left-b { bottom: 0; left: 0; }
.right-b { bottom: 0; right: 0; }

/* SEPARADOR FLORAL */
.floral-divider {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.floral-divider hr {
    width: 90%;
    border: none;
    border-top: 1px solid rgba(180, 148, 97, 0.3);
    margin: 0;
}
.flower-divider-left, .flower-divider-right {
    position: absolute;
    width: 70px;
    top: 50%;
    pointer-events: none;
}
.flower-divider-left {
    left: 4%;
    transform: translateY(-50%);
}
.flower-divider-right {
    right: 4%;
    transform: translateY(-50%);
}

/* BLOQUE 3 */
#block-3 { padding-bottom: 0; padding-right: 0; }
.closing-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%;
    align-items: start;
}

.polaroids-stack { display: flex; flex-direction: column; gap: 25px; padding-left: 10px; }
.polaroid-item {
    position: relative; transition: transform 0.3s ease;
    width: 100%;
}
.polaroid-item::before { display: none; }
.polaroid-item img { width: 100%; display: block; }
.p1 { transform: rotate(-4deg); }
.p2 { transform: rotate(3deg); margin-top: -15px; }
.p3 { transform: rotate(-2deg); margin-top: -15px; }

.closing-content { 
    display: flex; flex-direction: column; align-items: center; 
    text-align: center; padding: 0;
}
.logo-mini { display: none; }
.phrase-closing-wrap { width: 100%; margin-bottom: 20px; }
.final-phrase-text {
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 1.4rem;
    color: var(--text-dark);
    line-height: 1.4;
    text-align: center;
}

.btn-rsvp-gold {
    display: inline-block;
    background: var(--gold);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, background 0.3s ease;
}
.btn-rsvp-gold:active { transform: scale(0.95); }

.final-photo-wrap { 
    width: 100%; 
    overflow: visible; 
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0;
    line-height: 0; /* Removing descender space */
}
.final-couple-img { 
    width: 140%; 
    max-width: none;
    margin-right: 0; 
    margin-bottom: -5px; 
    display: block;
    pointer-events: none; 
}

.main-footer {
    width: 100%; background: #000; color: var(--gold);
    padding: 15px 0; font-family: var(--f-serif); font-size: 0.75rem;
    letter-spacing: 1px; text-align: center;
}

/* NEW DATE & CEREMONY TEXT FORMAT */
.date-text {
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 30px;
    letter-spacing: 1px;
}
.date-text span {
    font-style: normal;
    font-size: 1.8rem;
    color: var(--gold);
    margin: 0 5px;
    font-family: var(--f-sans);
    font-weight: 300;
}

/* --- NUEVOS ESTILOS PARA BLOQUES DE EVENTO --- */
.event-blocks-container {
    width: 100%;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.event-block {
    padding: 0 10px;
}
.event-block h3 {
    font-family: var(--f-serif);
    font-size: 1.2rem;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: normal;
}
.event-info p {
    font-family: var(--f-serif);
    font-size: 0.95rem;
    color: var(--gold);
    font-style: italic;
    margin-bottom: 5px;
    line-height: 1.4;
}
.event-info strong {
    font-family: var(--f-sans);
    font-weight: 600;
    font-style: normal;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 5px;
}
.btn-maps-minimal {
    display: inline-block;
    margin-top: 10px;
    font-family: var(--f-sans);
    font-size: 0.7rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(180, 148, 97, 0.4);
    padding: 5px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.btn-maps-minimal:active {
    background: rgba(180, 148, 97, 0.1);
}
.event-divider-mini {
    width: 40px;
    height: 1px;
    background: rgba(180, 148, 97, 0.3);
    margin: 0 auto;
}

/* --- ESTILOS SECCIÓN INFERIOR ACTUALIZADA --- */
.bottom-info-block {
    width: 100%;
    margin-bottom: 35px;
}
.dress-details {
    margin-top: 15px;
}
.dress-details p {
    font-family: var(--f-serif);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 10px;
    line-height: 1.4;
}
.wa-number {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 1.6rem;
    font-weight: normal;
    color: var(--gold);
    margin: 15px 0 10px 0;
    letter-spacing: 1px;
}
.btn-wa-minimal {
    display: inline-block;
    background: var(--gold);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-family: var(--f-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.te-esperamos {
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 1.8rem;
    color: var(--gold);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: normal;
}

/* REVEALS */
.gs-reveal { opacity: 0; }
