:root {
    --primary-color: #B85C38; /* Terracota */
    --primary-dark: #9A4A2E;
    --primary-light: #D4896A;
    --text-dark: #4A3C34;
    --text-light: #6B5B52;
    --bg-light: #FAF6F0; /* Beige claro */
    --bg-cream: #F0E8DC;
    --bg-beige: #E5D9C8;
    --surface: #FFFBF7;
    --overlay-warm: rgba(74, 60, 52, 0.4);
    --border-terracotta: rgba(184, 92, 56, 0.22);
}

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

.beau-rivage-regular {
    font-family: "Beau Rivage", cursive;
    font-weight: 400;
    font-style: normal;
    font-size: 5.5rem;
}


body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
    text-align: center;
}

h1, h2, .romantic-font {
    font-family: 'beau-rivage-regular', cursive;
    color: var(--primary-color);
}

h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

section {
    padding: 80px 20px;
    position: relative;
}

.btn {
    background-color: var(--primary-color);
    color: var(--surface);
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(184, 92, 56, 0.25);
}

.btn:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 18px rgba(154, 74, 46, 0.3);
}

/* --- MÚSICA DE FONDO --- */
.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--surface);
    color: var(--primary-color);
    border: 1px solid var(--primary-light);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(74, 60, 52, 0.12);
}

/* --- HEADER CON PAPEL TROZADO --- */
header {
    position: relative;
    height: 100vh;
    /* Reemplaza con el link de tu foto de fondo */
    background: linear-gradient(var(--overlay-warm), var(--overlay-warm)), url('./IMG_9680.jpg') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.5);
}

header h1 {
    font-size: 5.5rem;
    color: white;
    margin-bottom: 10px;
}

header p {
    color: white;
    font-size: 1.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Efecto Papel Trozado (SVG de borde irregular) */
.torn-paper-edge {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 60px;
    fill: var(--bg-cream);
    transform: scaleY(-1); /* Voltear para que encaje abajo */
}

/* --- CONTADOR --- */
.countdown-container {
    background-color: var(--bg-cream);
    padding: 40px 20px;
}

/* --- CONTADOR --- */
.countdown-container-footer  {
    background-color: var(--bg-cream);
    background: url('./hat4.png') no-repeat center center/cover;
    padding: 40px 20px;
    height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.countdown-item {
    background: var(--surface);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(74, 60, 52, 0.06);
    border: 1px solid var(--border-terracotta);
    min-width: 80px;
}

.countdown-item span {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* --- PADRES DE LOS NOVIOS --- */
.parents-section {
    background-color: var(--bg-beige);
    border-top: 1px solid var(--border-terracotta);
}

.parents-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    max-width: 1000px;
    margin: 40px auto 0 auto;
    flex-wrap: wrap;
}

.parents-column h3 {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.parents-column p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

#lugares {
    background: linear-gradient(var(--overlay-warm), var(--overlay-warm)), url('./IMG_9657.jpg') no-repeat center center/cover;
}

#lugares h2 {
    color: var(--surface);
    text-shadow: 1px 1px 8px rgba(74, 60, 52, 0.5);
}
/* --- LUGARES E ITINERARIO --- */
.places-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px auto;
    flex-wrap: wrap;
}

.card {
    background: var(--surface);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(74, 60, 52, 0.08);
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    border: 1px solid var(--border-terracotta);
    opacity: 0.7;
}

.card h3 {
    color: var(--primary-dark);
}

.card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.itinerary-timeline {
    max-width: 600px;
    margin: 40px auto 0 auto;
    position: relative;
    padding-left: 20px;
}

.timeline-item {
    margin-bottom: 30px;
    text-align: left;
    position: relative;
    padding-left: 30px;
    border-left: 2px solid var(--primary-color);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
}

.timeline-time {
    font-weight: 600;
    color: var(--primary-color);
}

.details-section {
    background: url('./IMG_9761.jpg') no-repeat center center/cover;
}

.details-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    max-width: 900px;
    margin: 40px auto 0 auto;
    flex-wrap: wrap;
}

.details-box {
    flex: 1;
    min-width: 250px;
    background: rgba(255, 251, 247, 0.85);
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-terracotta);
    opacity: 0.7;
}

.details-box h3 {
    color: var(--primary-dark);
}

/* --- GALERÍA --- */
.gallery {
    background-color: var(--bg-light);
    padding-bottom: 60px;
}

.gallery-intro {
    margin-bottom: 32px;
    font-size: 1.05rem;
}

.gallery-carousel {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1100px;
    margin: 0 auto;
}

.gallery-carousel-viewport {
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
    padding: 12px 0;
}

.gallery-carousel-track {
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.gallery-carousel-slide {
    flex: 0 0 62%;
    padding: 0;
    border: none;
    background: var(--bg-beige);
    cursor: zoom-in;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    opacity: 0.45;
    transform: scale(0.88);
    transition:
        opacity 0.65s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.65s ease;
    box-shadow: 0 4px 16px rgba(74, 60, 52, 0.08);
    border: 1px solid transparent;
}

.gallery-carousel-slide.is-prev,
.gallery-carousel-slide.is-next {
    opacity: 0.72;
    transform: scale(0.94);
}

.gallery-carousel-slide.is-active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 16px 40px rgba(74, 60, 52, 0.18);
    border-color: var(--border-terracotta);
    z-index: 1;
}

.gallery-carousel-slide img {
    width: 100%;
    height: min(420px, 55vh);
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.gallery-carousel-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-terracotta);
    background: var(--surface);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.gallery-carousel-btn:hover {
    background: var(--primary-color);
    color: var(--surface);
}

.gallery-carousel-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--bg-beige);
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-carousel-dot.active,
.gallery-carousel-dot:hover {
    background: var(--primary-color);
    transform: scale(1.15);
}

/* Lightbox */
body.gallery-lightbox-open {
    overflow: hidden;
}

.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(20, 16, 14, 0.94);
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.show {
    display: flex;
    opacity: 1;
}

.gallery-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 251, 247, 0.15);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gallery-lightbox-close:hover {
    background: rgba(184, 92, 56, 0.85);
}

.gallery-lightbox-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 56px 12px;
    min-height: 0;
}

.gallery-lightbox-stage img {
    max-width: 100%;
    max-height: calc(100vh - 180px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.gallery-lightbox-counter {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 251, 247, 0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s ease;
}

.gallery-lightbox-nav:hover {
    background: var(--primary-color);
}

.gallery-lightbox-prev {
    left: 16px;
}

.gallery-lightbox-next {
    right: 16px;
}

.gallery-lightbox-thumbs-wrap {
    flex-shrink: 0;
    padding: 12px 16px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.35));
}

.gallery-lightbox-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    max-width: 100%;
    padding: 4px 8px;
    scroll-behavior: smooth;
    justify-content: flex-start;
}

.gallery-lightbox-thumbs::-webkit-scrollbar {
    height: 6px;
}

.gallery-lightbox-thumbs::-webkit-scrollbar-thumb {
    background: rgba(184, 92, 56, 0.6);
    border-radius: 3px;
}

.gallery-lightbox-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    opacity: 0.65;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.gallery-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-lightbox-thumb:hover,
.gallery-lightbox-thumb.active {
    opacity: 1;
    border-color: var(--primary-light);
    transform: scale(1.05);
}

/* --- CONFIRMACIÓN --- */
.confirmation-section {
    background-color: var(--bg-cream);
}

.invitation-text {
    max-width: 600px;
    margin: 0 auto 30px auto;
    font-size: 1.2rem;
}

/* --- MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--surface);
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: left;
    box-shadow: 0 5px 25px rgba(74, 60, 52, 0.18);
    border: 1px solid var(--border-terracotta);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); }
    to { transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bg-beige);
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(184, 92, 56, 0.15);
}

.rsvp-form-status {
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.rsvp-form-status--error {
    color: #9a3b2e;
}

.rsvp-form-status--success {
    color: var(--primary-dark);
}

#rsvpSubmitBtn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Responsivo */
@media (max-width: 768px) {
    header h1 { font-size: 3.5rem; }
    h2 { font-size: 2.2rem; }
    .parents-grid { gap: 40px; }
    .gallery-carousel-btn {
        width: 36px;
        height: 36px;
    }
    .gallery-carousel-slide {
        flex: 0 0 78%;
    }

    .gallery-carousel-slide img {
        height: min(320px, 45vh);
    }
    .gallery-lightbox-stage {
        padding: 56px 12px 8px;
    }
    .gallery-lightbox-nav {
        width: 40px;
        height: 40px;
    }
    .gallery-lightbox-prev { left: 8px; }
    .gallery-lightbox-next { right: 8px; }
    .gallery-lightbox-thumb {
        width: 56px;
        height: 56px;
    }
}
