body {
    font-family: 'Montserrat', sans-serif;
    color: #5D5D5D;
    overflow-x: hidden;
    background-color: #F8F5F2;
}

.font-handwriting {
    font-family: 'Great Vibes', cursive;
}

.font-serif-display {
    font-family: 'Cormorant Garamond', serif;
}

.gold-text {
    color: #A88B5F;
}

.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#tsparticles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.content-wrapper {
    position: relative;
    z-index: 10;
}

.countdown-item {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

/* Swiper Personalización */
.padrinos-swiper {
    width: 100%;
    padding: 2rem 1rem 4rem 1rem !important;
    overflow: visible !important;
}

.padrinos-swiper .swiper-slide {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(168, 139, 95, 0.15);
    transition: all 0.5s ease;
    opacity: 0.4;
    transform: scale(0.85);
}

.padrinos-swiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    border: 1px solid rgba(168, 139, 95, 0.4);
}

.swiper-pagination-bullet-active {
    background: #A88B5F !important;
    width: 25px !important;
    border-radius: 5px !important;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.btn-gold {
    background-color: #A88B5F;
    color: white;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background-color: #8e744b;
    transform: translateY(-2px);
}

#main-content {
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease-out;
    /* Más rápida */
}

/* Elementos ocultos para la animación GSAP */
.gsap-reveal,
.gift-card {
    opacity: 0;
}

/* =============================================
   SOBRE 3D ANIMADO
   ============================================= */

/* Textura del Sobre */
.envelope-texture {
    background-color: #E3D7C1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
}

/* Overlay del sobre */
.envelope-overlay {
    transition: opacity 1.5s ease, visibility 1.5s;
}
.envelope-overlay.hidden-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Wrapper principal del sobre */
.envelope-wrapper {
    perspective: 2000px;
    width: 90vw;
    max-width: 600px;
    aspect-ratio: 1.4;
    position: relative;
    transition: transform 1.5s ease-in-out, opacity 1.5s ease;
    cursor: pointer;
}

/* Tarjeta interior que emerge */
.card-layer {
    position: absolute;
    inset: 10px;
    background: white;
    z-index: 10;
    transition: transform 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

/* Solapas del sobre */
.flap {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.flap-left {
    clip-path: polygon(0 0, 0% 100%, 55% 50%);
    background-color: #D6CBB3;
    z-index: 20;
}
.flap-right {
    clip-path: polygon(100% 0, 100% 100%, 45% 50%);
    background-color: #E3D7C1;
    z-index: 21;
}
.flap-bottom {
    clip-path: polygon(0 100%, 100% 100%, 50% 55%);
    background-color: #EBE3D3;
    z-index: 22;
    filter: drop-shadow(0 -5px 15px rgba(0,0,0,0.15));
}
.flap-top {
    transform-origin: top;
    transition: transform 2.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 30;
    clip-path: polygon(0 0, 100% 0, 50% 55%);
    background-color: #E3D7C1;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
    backface-visibility: hidden;
}

/* Interior del sobre */
.envelope-inside {
    position: absolute;
    inset: 0;
    background-color: #3D2E1A;
    z-index: 5;
}

/* Estado abierto */
.envelope-wrapper.is-open .flap-top {
    transform: rotateX(180deg);
    z-index: 1;
}
.envelope-wrapper.is-open .card-layer {
    transform: translateY(-80%);
    z-index: 15;
}
.envelope-wrapper.envelope-exit {
    transform: translateY(150%) scale(0.9);
    opacity: 0;
    pointer-events: none;
}

/* Sello de cera */
.wax-seal-btn {
    transition: opacity 1s ease;
    z-index: 40;
}
.envelope-wrapper.is-open .wax-seal-btn {
    opacity: 0;
    pointer-events: none;
}

/* Animación bounce para el texto "Abrir" */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}