/* --- Variables de Color (Paleta Boda Elegante) --- */
:root {
    --bg-paper: #f5f0e2;      /* Crema suave (Beige) */
    --text-dark: #4a4a4a;     /* Gris carbón suave */
    --gold-accent: #bfa181;   /* Dorado mate */
    --gold-dark: #8c735a;
    --card-white: #ffffff;    /* (Ya no se usará para el fondo de la tarjeta) */
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
}

/* --- Configuración Base --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Cormorant Garamond', serif;
    background-color: var(--bg-paper); /* Fondo BEIGE para toda la web */
    color: var(--text-dark);
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Tipografía y Estructura General --- */
.container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
}

h1 {
    font-family: 'Dancing Script', serif;
    font-size: 3rem; /* Un poco más grande para elegancia */
    margin: 10px 0;
    color: #2c2c2c;
    letter-spacing: 2px;
}

.logo-monogram {
    font-family: 'Dancing Script', serif;
    font-size: 3rem;
    color: var(--gold-accent);
    margin-bottom: 10px;
    border: 2px solid var(--gold-accent);
    display: inline-block;
    padding: 15px;
    border-radius: 50%;
}

.date {
    font-style: italic;
    font-size: 1.3rem;
    color: var(--gold-dark);
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    display: inline-block;
    padding: 10px 30px;
    margin-top: 15px;
}

/* --- TARJETA CENTRAL (MODIFICADA: Ahora es transparente) --- */
.card {
    /* CAMBIO: Fondo transparente para que se vea beige */
    background: transparent; 
    padding: 40px 20px;
    position: relative;
    /* CAMBIO: Quitamos la sombra y el borde gris para que sea más limpio */
    box-shadow: none;
    border: none; 
    margin: 40px 0;
}

/* El borde punteado (efecto costura) se mantiene */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0; /* Ocupa toda el área */
    border: 1px dashed var(--gold-accent);
    pointer-events: none;
    border-radius: 4px;
}

.description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
}

/* --- Botones e Inputs --- */
input[type="file"] { display: none; }

.file-label {
    display: block;
    padding: 15px;
    /* CAMBIO: Fondo blanco ligero para resaltar el botón de selección */
    background: #f5f0e2; 
    border: 1px solid #d6d4d4;
    cursor: pointer;
    margin-bottom: 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    transition: all 0.3s;
    color: var(--text-dark);
}

.file-label:hover {
    background: #f5f0e2;
    border-color: var(--gold-accent);
}

.btn-primary {
    background-color: var(--gold-accent);
    color: white;
    border: none;
    padding: 15px 40px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, background 0.3s;
}

.btn-primary:active { transform: scale(0.98); }
.btn-primary:hover { background-color: var(--gold-dark); }

/* --- Botones Elegantes (Secundarios) --- */
.btn-secondary, .back-link {
    display: inline-block;
    text-decoration: none;
    padding: 10px 30px;
    margin-top: 10px;
    background-color: transparent; 
    border: 1px solid var(--gold-dark);
    color: var(--gold-dark);
    border-radius: 2px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover, .back-link:hover {
    background-color: var(--gold-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(140, 115, 90, 0.2);
}

/* =========================================
   ESTILOS: CARRUSEL (SLIDER) + LIGHTBOX
   ========================================= */

.carousel-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.collage-header { 
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* --- ESCENARIO PRINCIPAL (FOTO GRANDE) --- */
.main-stage {
    position: relative;
    width: 100%;
    height: 60vh;
    background: #1a1a1a;
    border-radius: 20px; 
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-stage:hover .expand-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.media-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fade-element {
    opacity: 0;
    transition: opacity 1s ease-in-out; 
    max-width: 100%; 
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.fade-element.visible {
    opacity: 1;
}

/* --- BOTÓN DE AMPLIAR --- */
.expand-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 60px; height: 60px;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0; 
    transition: all 0.3s ease;
    z-index: 20;
    display: flex; justify-content: center; align-items: center;
}

.expand-btn:hover {
    background: rgba(191, 161, 129, 0.9);
    border-color: white;
}

/* --- BOTONES DE NAVEGACIÓN --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
    user-select: none;
    z-index: 10;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
}

.prev { left: 15px; }
.next { right: 15px; }

.photo-counter {
    position: absolute;
    top: 15px; right: 20px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    pointer-events: none;
}

/* --- TIRA DE MINIATURAS --- */
.film-strip-container {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.film-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 5px;
    justify-content: flex-start;
}

.film-strip::-webkit-scrollbar { height: 6px; }
.film-strip::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }
.film-strip::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }

.thumb-item {
    min-width: 90px;
    height: 70px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: #ddd;
}

.thumb-item img, .thumb-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-item:hover { opacity: 0.9; }

.thumb-item.active {
    opacity: 1;
    border-color: var(--gold-dark);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- LIGHTBOX --- */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex; justify-content: center; align-items: center;
    z-index: 3000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1; pointer-events: auto;
}

.lightbox-content {
    width: 90%; height: 90%;
    display: flex; justify-content: center; align-items: center;
}

.lightbox-content img, .lightbox-content video {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.close-lightbox {
    position: absolute; top: 20px; right: 20px;
    color: white; font-size: 3rem;
    background: none; border: none;
    cursor: pointer; z-index: 3001;
}

/* --- Responsivo --- */
@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    .container { width: 90%; padding: 10px; }
    .main-stage { height: 40vh; } 
    .nav-btn { font-size: 1.5rem; padding: 5px 10px; }
    .thumb-item { min-width: 70px; height: 50px; }
}