@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Great+Vibes&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
    --bg-dark: #11120F;
    --bg-olive: #252A22;
    --ivory: #F5F0E7;
    --champagne: #C6AA80;
    --champagne-hover: #b3956b;
    --text-gray: #A0A09F;
    --font-serif: 'Cormorant Garamond', serif;
    --font-script: 'Great Vibes', cursive;
    --font-sans: 'Montserrat', sans-serif;
}

/* RESET GENERAL PARA EVITAR DESBORDAMIENTOS HORIZONTALES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    background-color: var(--bg-dark);
    color: var(--ivory);
    scroll-behavior: smooth;
}

.hidden {
    display: none !important;
}

/* CONTENEDOR GLOBAL DE ANCHO MÁXIMO PARA BLOQUES */
.site-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* AUDIO CONTROL FLOTANTE */
.audio-control {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 100;
    background: rgba(37, 42, 34, 0.9);
    border: 1px solid var(--champagne);
    color: var(--champagne);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}
.audio-control:hover { transform: scale(1.1); }

/* SECCIÓN 1 — PORTADA CINEMATOGRÁFICA */
.portada-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&q=80&w=1800') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.portada-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(17,18,15,0.2), rgba(17,18,15,0.9));
}

.portada-content {
    position: relative;
    z-index: 2;
    color: var(--ivory);
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.sub-title-inv {
    font-size: 0.9rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--champagne);
    font-weight: 500;
}

.portada-content h1 {
    font-family: var(--font-script);
    font-size: 5.5rem;
    margin: 10px 0;
    color: var(--ivory);
    text-shadow: 0 4px 25px rgba(0,0,0,0.7);
}

.fecha-portada {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    letter-spacing: 3px;
    color: var(--text-gray);
    margin-bottom: 35px;
}

.btn-abrir {
    background: transparent;
    color: var(--champagne);
    border: 1px solid var(--champagne);
    padding: 14px 36px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
}

.btn-abrir:hover {
    background: var(--champagne);
    color: var(--bg-dark);
    box-shadow: 0 0 25px rgba(198, 170, 128, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-gray);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-8px) translateX(-50%); }
    60% { transform: translateY(-4px) translateX(-50%); }
}

.main-content {
    background-color: var(--bg-dark);
    color: var(--ivory);
    animation: fadeIn 1.2s ease-in-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.section-title {
    text-align: center;
    padding: 80px 20px 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.section-title span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--champagne);
    font-weight: 500;
}

.section-title h2 {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--ivory);
    margin-top: 10px;
    font-weight: 400;
    font-style: italic;
}

/* SECCIÓN 2 — NUESTRA INVITACIÓN */
.invitacion-text-section {
    max-width: 750px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.invitacion-quote {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    font-style: italic;
    color: var(--champagne);
    line-height: 1.5;
    margin-bottom: 25px;
}

.invitacion-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-gray);
    letter-spacing: 0.5px;
}

/* SECCIÓN 3 — NUESTRA HISTORIA (CORREGIDA Y CONSISTENTE) */
.timeline {
    max-width: 950px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 40px;
}

.timeline-item.reverse { flex-direction: row-reverse; }

.timeline-img {
    flex: 1;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    border: 1px solid rgba(198, 170, 128, 0.2);
}

.timeline-img img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    filter: brightness(0.9);
    transition: transform 0.6s ease;
    display: block;
}

.timeline-img img:hover { transform: scale(1.03); }

.timeline-text { 
    flex: 1; 
    text-align: left; 
    padding: 10px;
}

.timeline-text h3 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--ivory);
}

.timeline-date {
    color: var(--champagne);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.timeline-text p {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* SECCIÓN 4 — CUENTA REGRESIVA (PERFECTAMENTE CENTRADA) */
.countdown-section {
    background: var(--bg-olive);
    padding: 60px 20px;
    text-align: center;
    margin: 60px auto;
    border-top: 1px solid rgba(198, 170, 128, 0.15);
    border-bottom: 1px solid rgba(198, 170, 128, 0.15);
    width: 100%;
}

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

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

.countdown-box {
    background: rgba(17, 18, 15, 0.5);
    border: 1px solid rgba(198, 170, 128, 0.3);
    padding: 15px 10px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.countdown-number {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--champagne);
    font-weight: 600;
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-gray);
    margin-top: 5px;
}

/* SECCIÓN 5 — EL GRAN DÍA (TARJETAS SIMÉTRICAS Y ALINEADAS) */
.cards-detalles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 950px;
    margin: 0 auto;
    padding: 20px;
}

.detalles-card {
    background: var(--bg-olive);
    border: 1px solid rgba(198, 170, 128, 0.2);
    border-radius: 6px;
    padding: 45px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s;
    height: 100%;
}

.detalles-card:hover { transform: translateY(-5px); }

.detalles-card-content {
    flex-grow: 1;
}

.detalles-card i {
    font-size: 2.2rem;
    color: var(--champagne);
    margin-bottom: 20px;
}

.detalles-card h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--ivory);
}

.detalles-card p {
    color: var(--text-gray);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.hora-evento {
    font-family: var(--font-serif);
    color: var(--champagne) !important;
    font-size: 1.4rem !important;
    margin: 15px 0 !important;
}

.btn-mapa {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: transparent;
    color: var(--ivory);
    border: 1px solid var(--champagne);
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn-mapa:hover {
    background: var(--champagne);
    color: var(--bg-dark);
}

/* SECCIÓN 6 — NUESTROS MOMENTOS (GALERÍA MODERNA SIN DESBORDAMIENTOS) */
.galeria-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    width: 100%;
}

.galeria-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    height: 320px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    grid-column: span 6;
}

.galeria-item.tall {
    grid-column: span 6;
    height: 420px;
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    transition: transform 0.6s ease;
    display: block;
}

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

/* LIGHTBOX MODAL */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(17, 18, 15, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    color: var(--champagne);
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* SECCIÓN 7 — RSVP AVANZADO Y CENTRADO */
.rsvp-section {
    padding: 80px 20px;
    background: radial-gradient(circle at center, #1e231b 0%, var(--bg-dark) 100%);
    text-align: center;
}

.rsvp-box {
    max-width: 580px;
    margin: 0 auto;
    background: var(--bg-olive);
    padding: 45px 35px;
    border-radius: 6px;
    border: 1px solid rgba(198, 170, 128, 0.25);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    text-align: left;
}

.rsvp-box h2 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: var(--ivory);
    font-weight: 400;
    font-style: italic;
    text-align: center;
}

.rsvp-box p.rsvp-subtitle {
    color: var(--text-gray);
    margin-bottom: 25px;
    font-size: 0.95rem;
    text-align: center;
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--champagne);
    margin-bottom: 8px;
}

.rsvp-box input, .rsvp-box select, .rsvp-box textarea {
    width: 100%;
    padding: 13px;
    background: rgba(17, 18, 15, 0.6);
    border: 1px solid rgba(198, 170, 128, 0.3);
    border-radius: 4px;
    color: var(--ivory);
    font-size: 0.95rem;
}

.rsvp-box input:focus, .rsvp-box select:focus, .rsvp-box textarea:focus {
    outline: none;
    border-color: var(--champagne);
}

.backend-aviso {
    font-size: 0.75rem;
    color: var(--champagne);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

.btn-rsvp {
    width: 100%;
    padding: 15px;
    background: var(--champagne);
    color: var(--bg-dark);
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-rsvp:hover { background: var(--champagne-hover); }

/* SECCIÓN 8 — CIERRE CINEMATOGRÁFICO */
.cierre-section {
    position: relative;
    height: 90vh;
    background: url('https://images.unsplash.com/photo-1511285560929-80b456fea0bc?auto=format&fit=crop&q=80&w=1800') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cierre-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 18, 15, 0.75);
}

.cierre-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
    max-width: 700px;
    width: 100%;
}

.cierre-content h2 {
    font-family: var(--font-script);
    font-size: 4.5rem;
    color: var(--ivory);
    margin-bottom: 15px;
}

.cierre-content p {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--champagne);
    margin-bottom: 30px;
    line-height: 1.6;
}

footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-dark);
    color: var(--text-gray);
    font-size: 0.8rem;
    letter-spacing: 2px;
    border-top: 1px solid rgba(198, 170, 128, 0.1);
}

/* MEDIA QUERIES RESPONSIVE PARA DISPOSITIVOS MÓVILES */
@media(max-width: 768px) {
    .portada-content h1 { font-size: 3.8rem; }
    .timeline-item, .timeline-item.reverse { flex-direction: column; text-align: center; gap: 20px; }
    .timeline-text { text-align: center; padding: 0; }
    .countdown-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 320px; margin: 0 auto; }
    .galeria-item, .galeria-item.tall { grid-column: span 12; height: 280px; }
    .rsvp-box { padding: 30px 20px; }
}
