/*
 * Nuevo estilo: Elegancia Clásica con Tonos Dorados y Marfil.
 * Paleta de colores:
 * --bg-color: #f8f4e3 (Marfil cálido)
 * --text-color: #3f3e3e (Gris oscuro)
 * --accent-color: #d4af37 (Dorado clásico)
 * --secondary-accent: #a52a2a (Terracota / Ladrillo)
 * --box-shadow-color: rgba(212, 175, 55, 0.3);
 */
:root {
    --bg-color: #f8f4e3;
    --text-color: #3f3e3e;
    --accent-color: #d4af37;
    --secondary-accent: #a52a2a;
    --box-shadow-color: rgba(212, 175, 55, 0.3);
}

/* --- Estilos Generales y Tipografía --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent-color);
    text-align: center;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background-color: var(--secondary-accent);
}

p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: 15px;
}

a {
    color: var(--secondary-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* --- Botones --- */
.button-link, .copy-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: #fff; /* Color de texto blanco para contraste */
    text-align: center;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
}

.button-link:hover, .copy-btn:hover {
    background-color: var(--secondary-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button-small {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: #fff;
    text-align: center;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    margin-top: 20px;
}

.button-small:hover {
    background-color: var(--secondary-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* --- Loader --- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

body.loading-active .page-loader {
    visibility: visible;
    opacity: 1;
}

body.loading-complete .page-loader {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    border: 8px solid var(--text-color);
    border-top: 8px solid var(--accent-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loader-message {
    color: var(--text-color);
    font-style: italic;
    font-size: 1.1rem;
}

/* --- Música --- */
.music-toggle-button {
    position: fixed;
    bottom: clamp(10px, 5vw, 20px);
    right: clamp(10px, 5vw, 20px);
    width: clamp(40px, 10vw, 50px);
    height: clamp(40px, 10vw, 50px);
    border-radius: 50%;
    background-color: var(--secondary-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: clamp(1rem, 4vw, 1.2rem);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.music-toggle-button:hover {
    transform: scale(1.1);
}

/* --- Hero Section --- */
.hero {
    background-image: url('images/hero-bg.jpg'); /* Asegúrate de tener una imagen clara y elegante */
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    color: var(--text-color);
    flex-direction: column;
    padding: 20px;
    width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5); /* Superposición blanca para un efecto más suave */
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: clamp(20px, 5vw, 30px);
    background-color: rgba(255, 255, 255, 0.7); /* Recuadro semi-transparente más claro */
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    box-shadow: 0 0 20px var(--box-shadow-color);
    width: 90%; 
    max-width: 500px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2rem, 10vw, 5rem);
    line-height: 1;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: var(--secondary-accent);
}

.subtitle {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
    margin-bottom: 5px;
}

.names {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 400;
    margin-top: 10px;
    color: var(--text-color);
}

.date-location {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    margin-top: 20px;
    font-style: italic;
    color: var(--secondary-accent);
}

.date-location i {
    margin-right: 8px;
    color: var(--accent-color);
}

.countdown {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: clamp(15px, 4vw, 25px);
    border-radius: 10px;
    gap: clamp(10px, 4vw, 30px);
    flex-wrap: nowrap;
    max-width: 100%;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    text-align: center;
    min-width: 50px;
}

.countdown-item span:first-child {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    line-height: 1;
    color: var(--secondary-accent);
    text-shadow: 0 0 10px rgba(165, 42, 42, 0.5);
}

.countdown-item span:last-child {
    font-size: clamp(0.6rem, 1.8vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    color: var(--text-color);
}

.wedding-finished-message {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 30px;
}

/* --- Sections --- */
section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: #f1ede1; /* Un color ligeramente más oscuro que el fondo */
}

.section-intro-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    opacity: 0.8;
}

/* --- Story Section --- */
.story-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.story-text {
    flex: 1;
}

.story-image {
    flex: 1;
    text-align: center;
}

.story-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Details Section --- */
.details {
    text-align: center;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.detail-item {
    background-color: #f1ede1;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-5px);
}

.detail-item i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.detail-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--secondary-accent);
    margin-bottom: 10px;
}

.detail-item p {
    font-size: 0.9rem;
    color: var(--text-color);
}

.detail-item a {
    margin-top: 15px;
}

/* --- Gallery Section --- */
.gallery {
    text-align: center;
}

.gallery-lightbox {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.image-grid a {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.image-grid a::after {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.6);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-grid a:hover::after {
    opacity: 1;
}

.image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-grid a:hover img {
    transform: scale(1.05);
}

/* --- Upload Photos Section (Swiper styles) --- */
.upload-photos {
    text-align: center;
}

.upload-form-container {
    max-width: 500px;
    margin: 0 auto 50px;
    background-color: #f1ede1;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-color);
}

/* Estilo para el input de tipo 'file' */
.form-group input[type="file"] {
    display: none;
}

/* Estilo para el label que actúa como el botón 'Seleccionar archivo' */
.file-upload-label {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--accent-color);
    color: #fff;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.file-upload-label:hover {
    background-color: var(--secondary-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Estilo para el texto que muestra el nombre del archivo seleccionado */
.file-name-display {
    display: inline-block;
    margin-left: 10px;
    font-style: italic;
    color: var(--secondary-accent);
}

/* Nuevo estilo para el botón de subir foto */
.upload-submit-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-accent);
    color: #fff;
    text-align: center;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    margin-top: 15px;
}

.upload-submit-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.uploaded-photos-carousel {
    max-width: 800px;
    margin: 0 auto;
}

.carousel-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--secondary-accent);
}

.swiper {
    width: 100%;
    height: 100%;
    padding: 20px 0;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #f1ede1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--secondary-accent);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-photos-message {
    text-align: center;
    font-style: italic;
    opacity: 0.7;
    margin-top: 20px;
}

/* --- Gifts Section --- */
.gifts {
    text-align: center;
}

.gift-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gift-item {
    background-color: #f1ede1;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gift-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--secondary-accent);
    margin-bottom: 15px;
}

.gift-item p {
    font-size: 0.9rem;
    color: var(--text-color);
}

.gift-item .copy-btn {
    margin-top: 15px;
}

/* --- RSVP Section --- */
.rsvp {
    text-align: center;
}

.rsvp-call-to-action {
    background-color: #f1ede1;
    max-width: 600px;
    margin: 40px auto 0;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#rsvpForm {
    text-align: left;
}

#rsvpForm .form-group {
    margin-bottom: 15px;
}

#rsvpForm label {
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    color: var(--secondary-accent);
}

#rsvpForm input, #rsvpForm textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--secondary-accent);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
}

#rsvpForm textarea {
    resize: vertical;
}

#rsvpForm button {
    margin-top: 20px;
    width: 100%;
}

.form-message {
    margin-top: 15px;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

/* --- FAQ Section --- */
.faq {
    text-align: center;
}

.faq-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    background-color: #f1ede1;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid var(--accent-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-item:hover {
    background-color: var(--bg-color);
}

.faq-item summary {
    font-weight: 700;
    font-size: 1.1rem;
    outline: none;
    cursor: pointer;
    color: var(--accent-color);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    margin-top: 15px;
    padding-left: 20px;
    font-size: 0.95rem;
    color: var(--text-color);
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--secondary-accent);
    color: #fff;
    font-size: 0.8rem;
    border-top: 1px solid var(--accent-color);
}

/* --- Media Queries (Responsiveness) --- */
@media (min-width: 768px) {
    .story-content {
        flex-direction: row;
    }
}
@media (max-width: 767px) {
     .story-content {
        flex-direction: column;
    }
}