/* Variables */
:root {
    --bg-color: #FAF9F6; /* Alabastro / Blanco Perla cálido */
    --envelope-color: #FAF9F6; 
    --text-primary: #1A1A1A; /* Ónice profundo */
    --text-secondary: #737373; /* Gris cálido */
    --accent-color: #B8A792; /* Topo / Taupe */
    
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --font-script: 'Pinyon Script', cursive;
}

/* Reset basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-sans);
    line-height: 1.8;
    color: var(--text-primary);
    overflow: hidden; /* For module 1, prevent scrolling */
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-primary);
}

/* Preloader Container */
.preloader-container {
    position: relative; /* Change to relative to allow natural document flow once unlocked */
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    background-image: url('invitacion/texture.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
    transition: opacity 1s ease;
    perspective: 1000px;
}

/* Interactive Envelope Wrap */
.interactive-envelope-wrapper {
    position: relative;
    z-index: 20;
    width: 90%;
    max-width: 600px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.9);
    perspective: 1200px;
}

.env-layer {
    position: absolute;
    width: 100%;
    height: auto;
    object-fit: contain;
    will-change: transform, opacity;
}

.env-base {
    bottom: 0;
    left: 0;
    z-index: 1; /* Match Z-index correctly */
    opacity: 0;
}

.env-interior {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(-50% -100%, 150% -100%, 150% 34%, 50% 37%, -50% 34%);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
}

.env-main-card {
    position: absolute;
    bottom: 45%;
    left: 5%;
    width: 90%;
    transform: translateY(0); /* Hide inside bottom via HTML translateY if needed, but we do this in JS, initially just position it */
    z-index: 1;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.3));
}

.env-passes-container {
    position: absolute;
    bottom: 40%;
    left: 15%;
    width: 60%;
    transform: translateY(0); /* Hide inside bottom via HTML translateY, will animate via JS */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.3));
}

.env-passes-img {
    width: 100%;
    height: auto;
    display: block;
}

.env-passes-text {
    position: absolute;
    font-family: var(--font-serif);
    color: #2A4B3C;
    text-align: center;
    line-height: 1.0;
    width: 85%;
    text-transform: uppercase;
}

.passes-name {
    font-size: clamp(0.6rem, 2.8vw, 0.95rem);
    font-weight: 600;
    display: block;
    margin-bottom: 1px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.passes-number {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    font-weight: 600;
    display: block;
}

.passes-word {
    font-size: clamp(0.8rem, 3.5vw, 1.2rem);
    font-weight: 400;
    display: block;
    letter-spacing: 1px;
}

.env-closed {
    bottom: 0;
    left: 0;
    z-index: 5;
    transform: scale(1.0); /* It perfectly covers env-base */
}

/* --- Adornos Florales (Esquinas Viewport) --- */
.floral-screen {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: multiply; /* Fades white background perfectly into off-white base */
    width: 200%; /* Massive size */
    max-width: 1200px;
    z-index: 5; /* Lower than button and envelope */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
    animation: simpleFadeIn 3s ease forwards;
}

@keyframes simpleFadeIn {
    to { opacity: 1; }
}

.floral-bottom-left {
    bottom: -25%;
    left: -20%;
}

.floral-top-right {
    top: -25%;
    right: -20%;
    transform: rotate(180deg);
}

.btn-start-envelope {
    position: absolute;
    bottom: 15%;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--accent-color);
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, background 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    z-index: 10;
}

.btn-start-envelope:hover {
    background: var(--bg-color);
    transform: scale(1.05) translateY(20px);
}

.btn-scroll-down {
    position: absolute;
    bottom: 5%;
    background: var(--accent-color);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
    animation: pulseScroll 2s infinite;
}

.btn-scroll-down svg {
    width: 24px;
    height: 24px;
}

@keyframes pulseScroll {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@media (max-width: 600px) {
    .interactive-envelope-wrapper {
        height: 250px;
    }
    .env-passes-text {
        font-size: 0.8rem;
    }
    .env-seal {
        top: 35%;
        width: 60px;
    }
    .btn-scroll-down {
        bottom: 12%;
        z-index: 50; /* Ensure button sits above everything on mobile */
    }
    
    .floral-bottom-left {
        bottom: -15%;
        left: -35%;
        width: 180%;
    }
    
    .floral-top-right {
        top: -15%;
        right: -35%;
        width: 180%;
    }
}

/* ==================================
   Módulo 2: Nuestra Historia 
   ================================== */
.seccion-historia {
    background-color: var(--bg-color);
    padding: 6rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Intro: Cómo nos conocimos */
.historia-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4rem;
    margin-bottom: 8rem;
}

.historia-texto {
    flex: 1 1 400px;
    padding-right: 2rem;
}

.historia-titulo {
    font-size: 4.5rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.historia-parrafo {
    font-size: 1.15rem;
    color: var(--text-primary);
    line-height: 1.8;
    opacity: 0.85;
}

.historia-imagen-container {
    flex: 1 1 400px;
    height: 600px;
    border-radius: 50% 50% 0 0 / 20% 20% 0 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.historia-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Transform updated via GSAP for soft parallax */
    transform: scale(1.1);
}

/* Timeline */
.historia-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 8rem auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--accent-color);
    opacity: 0.6;
    transform: translateX(-50%) scaleY(0); /* Animation will draw it */
    transform-origin: top;
}

.timeline-node {
    position: relative;
    width: 50%;
    margin-bottom: 4rem;
    opacity: 0; /* GSAP */
}

.timeline-node:last-child {
    margin-bottom: 0;
}

.timeline-left {
    left: 0;
    padding-right: 3.5rem;
    text-align: right;
    transform: translateX(-30px); /* GSAP default start */
}

.timeline-right {
    left: 50%;
    padding-left: 3.5rem;
    text-align: left;
    transform: translateX(30px); /* GSAP default start */
}

/* Center dot */
.timeline-node::after {
    content: '';
    position: absolute;
    top: 6px;
    width: 10px;
    height: 10px;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    z-index: 2;
}

.timeline-left::after {
    right: -5px; /* 50% line is outside padding */
}

.timeline-right::after {
    left: -5px;
}

.timeline-content {
    background: transparent;
}

.timeline-fecha {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--accent-color);
    display: block;
    margin-bottom: 0.2rem;
    letter-spacing: 1px;
}

.timeline-titulo {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.timeline-desc {
    font-size: 1rem;
    color: var(--text-primary);
    opacity: 0.8;
    line-height: 1.6;
}

/* Galería Masonry */
.historia-galeria-seccion {
    text-align: center;
    margin-bottom: 4rem;
}

.galeria-titulo {
    font-family: var(--font-script);
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 3.5rem;
    font-weight: 400;
}

/* Card Stack Gallery */
.card-stack-gallery {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 480px;
    margin: 0 auto 1.5rem auto;
    perspective: 1000px;
}

.stack-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    background-color: #fff;
    cursor: pointer;
    transform-origin: center center;
    border: 10px solid #fff;
    border-bottom-width: 30px; /* Estilo estilo polaroid */
}

.stack-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.swipe-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    animation: pulseHint 2s infinite;
}

@keyframes pulseHint {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Responsivo para Módulo 2 */
@media (max-width: 900px) {
    .historia-titulo {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .historia-intro {
        gap: 3rem;
        margin-bottom: 5rem;
    }
    
    .historia-texto {
        padding-right: 0;
        text-align: center;
    }
    
    .historia-imagen-container {
        height: 500px;
    }
    
    .timeline-node {
        width: 100%;
        left: 0 !important;
        padding-left: 2.5rem !important;
        padding-right: 0 !important;
        text-align: left !important;
        transform: translateY(30px) translateX(0) !important; /* Adapt for mobile */
    }
    
    .timeline-line {
        left: 0;
        transform: scaleY(0);
    }
    
    .timeline-left::after, .timeline-right::after {
        left: -5px;
        right: auto;
    }
}

@media (max-width: 600px) {
    .historia-imagen-container {
        height: 400px;
    }
    .galeria-titulo {
        font-size: 3.5rem;
    }
    
    .seccion-historia {
        padding: 4rem 1rem;
    }
}

/* ==================================
   Módulo 3: Las Coordenadas 
   ================================== */
.seccion-coordenadas {
    background: radial-gradient(circle at center, #ffffff 0%, var(--bg-color) 100%);
    padding: 8rem 1.5rem;
    position: relative;
}

.coordenadas-header {
    text-align: center;
    margin-bottom: 5rem;
}

.coordenadas-titulo {
    font-size: 4.5rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.coordenadas-subtitulo {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--accent-color);
}

.coordenadas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    justify-content: center;
}

.tarjeta-ubicacion {
    flex: 1 1 400px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0; /* GSAP stagger start */
    transform: translateY(60px); /* GSAP stagger start */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* To ensure the top image respects rounded corners */
}

/* Image appended to the top of cards */
.tarjeta-hero-img {
    margin: -3rem -2.5rem 2rem -2.5rem; /* Negate the parent padding */
    width: calc(100% + 5rem);
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
}

.tarjeta-ubicacion:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(196, 164, 132, 0.15); /* Soft beige shadow */
}

.tarjeta-icono {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem auto;
    color: var(--accent-color);
}

.tarjeta-icono svg {
    width: 100%;
    height: 100%;
}

.tarjeta-titulo {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tarjeta-hora {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.tarjeta-lugar {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tarjeta-direccion {
    font-size: 1rem;
    color: var(--text-primary);
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    flex-grow: 1; /* Pushes buttons to bottom if mixed heights */
}

/* Modifiers for Buttons GSAP */
.tarjeta-botones > * {
    opacity: 0;
    transform: translateY(10px);
}

.tarjeta-botones {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Base button styles */
.tarjeta-botones a {
    text-decoration: none;
    display: inline-block;
    padding: 0.9rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-color);
}

.btn-principal {
    background-color: transparent;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tarjeta-botones a:hover {
    background-color: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

.btn-group-secundario {
    display: flex;
    gap: 0.8rem;
}

.btn-group-secundario a {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.7rem 1rem;
}

.btn-transporte, .btn-calendario {
    font-size: 0.85rem;
    color: var(--text-primary);
    opacity: 0.9;
}

@media (max-width: 600px) {
    .coordenadas-titulo {
        font-size: 3.5rem;
    }
    .coordenadas-subtitulo {
        font-size: 2.5rem;
    }
    .tarjeta-ubicacion {
        padding: 2.5rem 1.5rem;
    }
    .seccion-coordenadas {
        padding: 5rem 1rem;
    }
}

/* ==================================
   Módulo 3.5: Agendar Fecha
   ================================== */
.seccion-agendar {
    position: relative;
    padding: 6rem 1.5rem;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(42, 42, 42, 0.95) 100%);
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.seccion-agendar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('invitacion/texture.png') center/cover;
    mix-blend-mode: overlay;
    opacity: 0.1;
    pointer-events: none;
}

.agendar-glass-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    border-radius: 20px;
}

.agendar-titulo {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.agendar-subtitulo {
    font-family: var(--font-script);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.agendar-botones-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 600px) {
    .agendar-botones-container {
        flex-direction: row;
        justify-content: center;
    }
}

.btn-glam {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(10px);
}

.btn-glam .glam-icon {
    display: inline-flex;
    margin-right: 12px;
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    transition: transform 0.4s ease;
}

.btn-glam .glam-icon svg {
    width: 100%;
    height: 100%;
}

.btn-glam::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: none;
}

.btn-glam:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(184, 167, 146, 0.2);
    transform: translateY(-3px);
}

.btn-glam:hover::before {
    animation: shine 1.5s ease-out;
}

.btn-glam:hover .glam-icon {
    transform: scale(1.1) rotate(-5deg);
}

@keyframes shine {
    100% {
        left: 200%;
    }
}

/* Decoraciones discretas */
.agendar-decor-top,
.agendar-decor-bottom {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.5;
}

.agendar-decor-top { top: 2rem; }
.agendar-decor-bottom { bottom: 2rem; }

/* ==================================
   Módulo 4: Itinerario del Evento 
   ================================== */
.seccion-itinerario {
    background-color: var(--bg-color);
    padding: 8rem 1.5rem;
    position: relative;
}

.itinerario-header {
    text-align: center;
    margin-bottom: 5rem;
}

.itinerario-titulo {
    font-size: 4.5rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.itinerario-subtitulo {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--accent-color);
}

.itinerario-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.itinerario-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    border-left: 2px dashed var(--accent-color);
    opacity: 0.4;
    transform-origin: top;
    height: 0; /* GSAP animates height */
}

.itinerario-node {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 5rem;
}

.itinerario-node:last-child {
    margin-bottom: 0;
}

.iti-left {
    justify-content: flex-start;
}

.iti-right {
    justify-content: flex-end;
}

.iti-icono-wrapper {
    position: absolute;
    left: 50%;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    z-index: 2;
    opacity: 0;
    /* initial state transform defined via gsap for perfect scaling alongside x offset */
}

.iti-icono-wrapper svg {
    width: 26px;
    height: 26px;
    color: var(--accent-color);
}

.iti-content {
    width: calc(50% - 60px); 
    opacity: 0; /* GSAP */
}

.iti-left .iti-content {
    text-align: right;
    padding-right: 2.5rem;
    transform: translateX(-30px);
}

.iti-right .iti-content {
    text-align: left;
    padding-left: 2.5rem;
    transform: translateX(30px);
}

.iti-hora {
    font-size: 2rem;
    color: var(--accent-color);
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
}

.iti-actividad {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.15rem;
    color: var(--text-primary);
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Responsivo para Módulo 4 */
@media (max-width: 768px) {
    .itinerario-titulo {
        font-size: 3.5rem;
    }
    .itinerario-subtitulo {
        font-size: 2.5rem;
    }
    
    .itinerario-line {
        left: 40px;
    }
    
    .iti-icono-wrapper {
        left: 40px;
    }
    
    .itinerario-node {
        justify-content: flex-start;
        margin-bottom: 4rem;
    }
    
    .iti-content {
        width: calc(100% - 80px);
        margin-left: 80px;
        text-align: left !important;
        padding-left: 1rem !important;
        padding-right: 0 !important;
        /* Force entrance from right/bottom on mobile overriding right-side padding */
        transform: translateY(20px) translateX(0) !important;
    }
}

@media (max-width: 600px) {
    .seccion-itinerario {
        padding: 6rem 1rem;
    }
    .iti-icono-wrapper {
        width: 50px;
        height: 50px;
        left: 25px;
    }
    .iti-icono-wrapper svg {
        width: 22px;
        height: 22px;
    }
    .itinerario-line {
        left: 25px;
    }
    .iti-content {
        margin-left: 65px;
    }
}

/* ==================================
   Módulo 5: Detalles Logística 
   ================================== */
:root {
    --color-vestido-1: #2B3A42; /* Azul oscuro */
    --color-vestido-2: #8F9779; /* Verde Olivo */
    /* --color-vestido-3 is var(--accent-color) #C4A484 Beige */
    --color-vestido-4: #B46A55; /* Terracota */
}

.seccion-logistica {
    background-color: var(--bg-color);
    padding: 8rem 1.5rem;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden; /* Prevent horizontal scroll from GSAP animations from outside bounds */
}

.logistica-bloque {
    margin-bottom: 8rem;
    text-align: center;
    opacity: 0; /* GSAP */
}

.logistica-bloque:last-child {
    margin-bottom: 0;
}

.logistica-titulo {
    font-size: 3.5rem; /* slightly smaller than main headers */
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.logistica-subtitulo {
    font-family: var(--font-script);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.logistica-texto {
    font-size: 1.15rem;
    color: var(--text-primary);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
    opacity: 0.85;
}

/* Vestimenta */
.paleta-colores {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.color-circulo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.color-1 { background-color: var(--color-vestido-1); }
.color-2 { background-color: var(--color-vestido-2); }
.color-3 { background-color: var(--accent-color); }
.color-4 { background-color: var(--color-vestido-4); }

/* Regalos Grid */
.regalos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.tarjeta-glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; /* To ensure the top image respects rounded corners */
}
/* Reusing .tarjeta-hero-img for .tarjeta-glass but adjusting margin for 2.5rem padding */
.tarjeta-glass .tarjeta-hero-img {
    margin: -3rem -2.5rem 2rem -2.5rem;
    width: calc(100% + 5rem);
    height: 220px;
}

.tarjeta-glass .tarjeta-icono {
    width: 55px;
    height: 55px;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.tarjeta-glass .tarjeta-texto {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.7;
    flex-grow: 1;
}

/* Modificadores botones dentro de tarjetas */
.tarjeta-glass .tarjeta-botones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.tarjeta-glass .btn-secundario, .tarjeta-glass .btn-principal {
    text-decoration: none;
    display: inline-block;
    padding: 0.9rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-color);
    width: 100%;
    cursor: pointer;
    font-family: var(--font-serif);
}

.tarjeta-glass .btn-secundario {
    background: transparent;
    color: var(--text-primary);
}

.tarjeta-glass .btn-principal {
    background-color: transparent;
    color: var(--text-primary);
    font-weight: 600;
}

.tarjeta-glass .btn-secundario:hover, .tarjeta-glass .btn-principal:hover {
    background-color: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

.btn-ver-datos {
    margin-bottom: 1rem;
}

/* Datos Bancarios Desplegable */
.datos-bancarios-container {
    width: 100%;
    overflow: hidden;
    height: 0; /* JS animates */
    opacity: 0;
}

.datos-bancarios-content {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px dashed rgba(196, 164, 132, 0.5); /* Sutil beige */
    text-align: left;
}

.dato-item {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.dato-copiar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin-top: 0.8rem;
    font-size: 0.9rem;
}

.dato-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.dato-numero {
    font-family: monospace;
    color: var(--text-primary);
}

.btn-copiar {
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-copiar:hover {
    background: #a88a6b;
}

/* Musica */
.btn-sugerir-cancion {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-family: var(--font-serif);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(196, 164, 132, 0.3);
}

.btn-sugerir-cancion:hover {
    background-color: #a88a6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 164, 132, 0.4);
}

.spotify-container {
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .logistica-titulo { font-size: 3rem; }
    .logistica-subtitulo { font-size: 2.2rem; }
    .seccion-logistica { padding: 6rem 1rem; }
    .dato-copiar { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .btn-copiar { width: 100%; text-align: center; }
    .tarjeta-glass { padding: 2.5rem 1.5rem; }
}

/* ==================================
   Módulo 6: RSVP (Confirmación) 
   ================================== */
.seccion-rsvp {
    background-color: var(--bg-color);
    padding: 10rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Para animación inicial ScrollTrigger */
}

.tarjeta-glass-grande {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--accent-color);
    border-radius: 16px;
    padding: 5rem 3rem;
    max-width: 800px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.05);
}

.rsvp-titulo {
    font-size: 3.5rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.rsvp-subtitulo {
    font-family: var(--font-script);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 3rem;
}

.rsvp-datos-invitado {
    background: rgba(196, 164, 132, 0.08); /* Sutil touch beige */
    border: 1px dashed var(--accent-color);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    margin-bottom: 3.5rem;
}

.rsvp-familia {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.rsvp-pases {
    font-size: 1.2rem;
    color: var(--text-primary);
    opacity: 0.9;
}

.rsvp-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn-rsvp-confirmar, .btn-rsvp-declinar {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    letter-spacing: 2px;
    padding: 1.2rem 2.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1 1 250px;
    max-width: 350px;
}

.btn-rsvp-confirmar {
    background-color: var(--accent-color);
    color: #fff;
    border: 1px solid var(--accent-color);
    box-shadow: 0 10px 20px rgba(196, 164, 132, 0.3);
}

.btn-rsvp-confirmar:hover {
    background-color: #a88a6b;
    border-color: #a88a6b;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(196, 164, 132, 0.4);
}

.btn-rsvp-declinar {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--accent-color);
}

.btn-rsvp-declinar:hover {
    background-color: rgba(196, 164, 132, 0.1);
    transform: translateY(-2px);
}

.btn-rsvp-confirmar:disabled, .btn-rsvp-declinar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rsvp-exito {
    margin-bottom: 3rem;
}

.exito-icono {
    width: 60px;
    height: 60px;
    background-color: var(--color-vestido-2); /* Verde olivo */
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 10px 20px rgba(143, 151, 121, 0.3);
}

.exito-icono svg {
    width: 30px;
    height: 30px;
}

.exito-texto {
    font-size: 1.5rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.rsvp-whatsapp {
    padding-top: 2.5rem;
    border-top: 1px solid rgba(44, 48, 46, 0.1);
}

.rsvp-whatsapp p {
    font-size: 1rem;
    color: var(--text-primary);
    opacity: 0.8;
}

.rsvp-whatsapp a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rsvp-whatsapp a:hover {
    color: #a88a6b;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .tarjeta-glass-grande {
        padding: 4rem 1.5rem;
    }
    .rsvp-titulo {
        font-size: 2.8rem;
    }
    .rsvp-subtitulo {
        font-size: 2.2rem;
    }
    .rsvp-familia {
        font-size: 1.6rem;
    }
    .seccion-rsvp {
        padding: 6rem 1rem;
    }
}

/* ==================================
   Módulo 7: Cierre y Footer
   ================================== */
.seccion-cierre {
    background-color: var(--bg-color);
    padding: 8rem 1.5rem 6rem;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.cierre-bloque {
    margin-bottom: 6rem;
}

/* Redes Sociales */
.cierre-subtitulo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.cierre-hashtag {
    font-family: var(--font-script);
    font-size: 5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    /* initial state for GSAP */
    opacity: 0;
    transform: scale(0.8);
}

.cierre-texto {
    font-size: 1.1rem;
    color: var(--text-primary);
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.cierre-iconos {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.icono-social {
    width: 50px;
    height: 50px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.icono-social svg {
    width: 22px;
    height: 22px;
}

.icono-social:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(196, 164, 132, 0.3);
}

/* Fotos */
.tarjeta-fotos {
    /* Extending glassmorphism styles from modulo 3/5 */
    max-width: 600px;
    margin: 0 auto;
    background: transparent;
    border: 1px dashed var(--accent-color);
    box-shadow: none;
    /* GSAP */
    opacity: 0;
    transform: translateY(40px);
}

/* Trust Badge */
.cierre-recordatorio {
    margin-bottom: 0;
}

.trust-badge {
    background: rgba(196, 164, 132, 0.1);
    max-width: 550px;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    text-align: left;
    /* GSAP */
    opacity: 0;
    transform: translateY(40px);
}

.trust-icono {
    color: var(--accent-color);
    flex-shrink: 0;
}

.trust-icono svg {
    width: 28px;
    height: 28px;
}

.trust-texto {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    opacity: 0.9;
}

/* Footer Principal */
.footer-principal {
    background-color: #2C302E;
    color: #F9F8F3;
    padding: 5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer-marcadeagua {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-script);
    font-size: 15rem;
    color: rgba(249, 248, 243, 0.03); /* Subtle white trace */
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
}

.footer-creditos {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.7;
    position: relative;
    z-index: 2;
}

.footer-creditos a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-creditos a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .cierre-hashtag { font-size: 3.5rem; }
    .footer-marcadeagua { font-size: 10rem; }
    .seccion-cierre { padding: 6rem 1rem 4rem; }
    .trust-badge { flex-direction: column; text-align: center; gap: 0.8rem; }
}

/* ==================================
   OLD MONEY / QUIET LUXURY OVERRIDES
   ================================== */

/* Annihilate "Cajitas" and gradients */
.seccion-coordenadas {
    background: transparent !important;
}

.tarjeta-glass, .tarjeta-ubicacion, .logistica-bloque, .rsvp-container, .tarjeta-glass-grande {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 8rem !important;
    padding: 0 !important;
}

/* Cancel the negative margin used for previous padding hack */
.tarjeta-hero-img {
    margin: 0 0 2rem 0 !important;
    width: 100% !important;
}

/* Images as artwork */
.tarjeta-hero-img, .historia-imagen, .historia-imagen-container img, .galeria-item img {
    border-radius: 10rem 10rem 0 0 !important;
}

/* Editorial Buttons */
.btn-principal, .btn-secundario, .btn-rsvp-confirmar, .btn-rsvp-declinar, .tarjeta-botones a, .btn-sugerir-cancion, .btn-copiar, .btn-ver-datos {
    background: transparent !important;
    border: 1px solid var(--text-primary) !important; 
    color: var(--text-primary) !important;
    font-family: var(--font-sans) !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.15em !important;
    padding: 1rem 2.5rem !important;
    border-radius: 0 !important;
    transition: all 0.4s ease !important;
    box-shadow: none !important;
}

.btn-principal:hover, .btn-secundario:hover, .btn-rsvp-confirmar:hover, .btn-rsvp-declinar:hover, .tarjeta-botones a:hover, .btn-sugerir-cancion:hover, .btn-copiar:hover, .btn-ver-datos:hover {
    background-color: var(--text-primary) !important;
    color: var(--bg-color) !important;
    border-color: var(--text-primary) !important;
}

/* Fix typography inside the RSVP and footer since bg changed */
.rsvp-titulo, .rsvp-subtitulo, .rsvp-familia, .rsvp-pases, .exito-texto, .footer-creditos a, .footer-creditos {
    color: var(--text-primary) !important;
}

/* Iconography Minimalist */
svg {
    stroke-width: 0.8 !important;
    color: var(--accent-color) !important; 
}

/* Replace script with sleek sans for sub-labels */
.timeline-fecha, .tarjeta-hora, .coordenadas-subtitulo.script, .cierre-subtitulo {
    font-family: var(--font-sans) !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: var(--text-secondary) !important;
}

/* Make global background consistent canvas */
.preloader-container, .seccion-historia, .seccion-coordenadas, .seccion-itinerario, .seccion-logistica, .seccion-rsvp, .seccion-cierre, .footer-principal {
    background-color: var(--bg-color) !important;
    background-image: none !important;
}

.footer-marcadeagua {
    color: rgba(26, 26, 26, 0.04) !important; /* Subtle dark trace on light bg */
}

/* Thin out elements */
.timeline-line, .itinerario-line {
    border-left: 1px solid var(--accent-color) !important;
    opacity: 0.6;
}

.trust-badge {
    border: none !important;
    border-top: 1px solid var(--accent-color) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

/* ==================================
   RESPONSIVE DESIGN & SCRIPT FIXES
   ================================== */

html, body {
    overflow-x: hidden !important;
}

.footer-principal, .seccion-cierre {
    overflow: hidden !important;
}

/* Script fonts must not be uppercase and spacing should be normal */
.envelope-btn, .cierre-hashtag, .galeria-titulo {
    font-family: var(--font-script) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 400 !important;
}

/* Fluid typography and word wrapping for huge hashtags */
.cierre-hashtag {
    font-size: clamp(2.5rem, 8vw, 6rem) !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
    padding: 0 1rem;
    text-align: center;
}

/* Responsive adjustments for headings and paddings */
@media (max-width: 768px) {
    h2.historia-titulo, h2.coordenadas-titulo, h2.itinerario-titulo, h2.logistica-titulo, h2.rsvp-titulo {
        font-size: clamp(2.5rem, 6vw, 3.5rem) !important;
    }
    .seccion-historia, .seccion-coordenadas, .seccion-itinerario, .seccion-logistica, .seccion-rsvp, .seccion-cierre {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }
    .tarjeta-hero-img, .historia-imagen, .historia-imagen-container img, .galeria-item img {
        border-radius: 5rem 5rem 0 0 !important;
    }
    .tarjeta-glass, .tarjeta-ubicacion, .logistica-bloque, .rsvp-container, .tarjeta-glass-grande {
        margin-bottom: 5rem !important;
    }
    .audio-toggle {
        bottom: 1.5rem !important;
        right: 1.5rem !important;
        width: 40px !important;
        height: 40px !important;
    }
}

/* Floating Audio Control */
.audio-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50% !important;
    background: transparent !important;
    border: 1px solid var(--text-primary) !important;
    color: var(--text-primary) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0; /* Initially hidden, GSAP will show it */
    pointer-events: none;
    transition: all 0.4s ease !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.audio-toggle:hover {
    background-color: var(--text-primary) !important;
    color: var(--bg-color) !important;
}

.audio-toggle svg {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 1 !important;
    color: inherit !important;
}

/* ==================================
   CUENTA REGRESIVA BODA
   ================================== */
.countdown-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 30px;
}

.countdown-layout .count-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-layout .count-box span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem; /* Increased size */
    color: #e5c07b; /* dorado/champaña */
    line-height: 1;
}

.countdown-layout .count-box small {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem; /* Increased size */
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.85); /* Changed to light color to stand out on dark bg */
    margin-top: 0.8rem;
}

.countdown-layout .count-divider {
    width: 1px;
    height: 50px; /* Increased to match larger text */
    background-color: var(--accent-color);
    opacity: 0.5;
}

@media (max-width: 600px) {
    .countdown-layout {
        gap: 1.2rem;
    }
    
    .countdown-layout .count-box span {
        font-size: 2.8rem; /* Increased for mobile */
    }

    .countdown-layout .count-box small {
        font-size: 0.75rem; /* Increased for mobile */
        letter-spacing: 1px;
    }
    
    .countdown-layout .count-divider {
        height: 40px;
    }
}

/* Fix spacing between Sugerir Cancion and RSVP */
.logistica-bloque:last-child {
    margin-bottom: 0 !important;
}

.seccion-rsvp {
    padding-top: 4rem !important;
}
