/* --- Variables de Color y Estilo --- */
:root {
    --red-primary: #ff0000;
    --red-dark: #b30000;
    --red-darker: #800000;
    --red-light: #cd0000;
    --olive-green: #556B2F;
    --cream: #fdf6e3;
    --light-cream: #faf8f3;
    --dark-text: #333;
    --font-script: 'Great Vibes', cursive;
    --font-body: 'Lato', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --loading-text: #464242;
}

/* --- Estilos Globales y Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--dark-text);
    line-height: 1.6;
    overflow-x: hidden;
}



/* --- Pantalla de Carga --- */
    .loading-screen {
        position: fixed; /* Cubre toda la pantalla */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, var(--cream), var(--red-darker));
        z-index: 10000; /* Se asegura de estar por encima de todo */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    }

    /* Clase para ocultar la pantalla de carga */
    .loading-screen.hidden {
        opacity: 0;
        visibility: hidden;
    }

    .loading-logo {
        max-width: 300px;
        max-height: 300px;
        margin-bottom: 20px;
        animation: pulse 2s infinite;
    }

    .loading-text {
        font-family: 'Great Vibes', cursive;
        font-size: 4rem;
        color: var(--loading-text);
        margin-bottom: 30px;
        text-shadow: 2px 2px 2px rgba(240, 240, 240, 0.89);
    }

    .loading-button {
        padding: 15px 40px;
        font-size: 1.2rem;
        font-weight: bold;
        color: #ffffff;
        background-color: #b10101;
        border: none;
        border-radius: 50px;
        cursor: pointer;
        transition: transform 0.3s ease, background-color 0.3s ease;
        box-shadow: 0 4px 15px rgba(167, 139, 250, 0.3);
    }

    .loading-button:hover {
        background-color: #920000;
        transform: scale(1.05);
    }

    /* --- Control de Música --- */
    .music-control {
        position: fixed; /* Botón flotante */
        bottom: 25px;
        right: 25px;
        width: 60px;
        height: 60px;
        background-color: var(--red-primary);
        color: white;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        z-index: 1000; /* Por encima del contenido, pero debajo de la pantalla de carga */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease, background-color 0.3s ease;
    }

    .music-control:hover {
        background-color: var(--red-light) ;
        transform: scale(1.1);
    }

    .music-control i {
        font-size: 1.5rem;
    }

    /* Animación sutil para el logo */
    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.05); }
        100% { transform: scale(1); }
    }

    /* --- Responsividad para Móviles --- */
    @media (max-width: 600px) {
        .loading-text {
            font-size: 2.5rem;
        }
        .loading-button {
            padding: 12px 35px;
            font-size: 1rem;
        }
        .music-control {
            width: 55px;
            height: 55px;
            bottom: 20px;
            right: 20px;
        }
    }


/* --- Animación de carga de página --- */
main {
    opacity: 0;
    transition: opacity 1s ease-in;
}

body.loaded main {
    opacity: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--red-dark);
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--red-primary), transparent);
}

/* --- Clases base para animaciones al hacer scroll --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Sección Principal: Invitación --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/main.webp') no-repeat center center/cover;
}

.hero-content {
    z-index: 2;
    padding: 20px;
    background-color: rgba(128, 0, 0, 0.6);
    border-radius: 15px;
    border: 2px solid var(--cream);
    max-width: 90%;
    animation: fadeInUp 1.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-family: var(--font-script);
    font-size: 4rem;
    color: var(--cream);
    margin-bottom: 10px;
    font-weight: 400;
    line-height: 1.2;
}

.hero .and {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--red-light);
    margin: 10px 0;
}

.hero .event-date {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-top: 20px;
    color: var(--cream);
}

.hero .event-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-top: 10px;
    color: var(--cream);
    letter-spacing: 2px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--cream);
    font-size: 2rem;
    transition: color 0.3s ease;
}

.scroll-indicator:hover {
    color: var(--red-light);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-20px); }
    60% { transform: translateX(-50%) translateY(-10px); }
}

/* --- Sección de Mensaje --- */
#mensaje {
    padding: 60px 0;
    background-color: var(--light-cream);
    background-image: url('https://www.transparenttextures.com/patterns/wood-pattern.png');
}

/* --- Sección del Logo --- */

.message-logo-box {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    opacity: 0.8;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.message-logo-box:hover {
    transform: scale(1.05);
    opacity: 1;
}

.message-logo-box img {
    width: 100%;
    height: auto;
    display: block;
}


.message-box {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 5px solid var(--red-primary);
    text-align: center;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.message-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* --- Cuenta Regresiva (NUEVO ESTILO) --- */
#cuenta-regresiva {
    padding: 80px 0;
    text-align: center;
    background-image: url('../img/contador.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.corner-rose {
    position: absolute;
    width: 100px;
    height: 100px;
    color: var(--red-light);
    opacity: 0.2;
    z-index: 0;
}

.corner-rose.top-left {
    top: 0;
    left: 0;
    transform: rotate(-15deg);
}

.corner-rose.top-right {
    top: 0;
    right: 0;
    transform: rotate(15deg) scaleX(-1);
}

.corner-rose.bottom-left {
    bottom: 0;
    left: 0;
    transform: rotate(15deg) scaleY(-1);
}

.corner-rose.bottom-right {
    bottom: 0;
    right: 0;
    transform: rotate(-15deg) scale(-1);
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.countdown-item {
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--red-light);
    color: var(--red-dark);
    padding: 25px;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 25px rgba(179, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 12px 30px rgba(179, 0, 0, 0.2);
    border-color: var(--red-primary);
}

.countdown-item i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--red-primary);
}

.countdown-item span {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--light-cream);
    line-height: 1;
}

.countdown-item p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    font-family: var(--font-body);
    font-weight: 600;
}

/* --- Itinerario --- */
#itinerario {
    padding: 60px 0;
    background-color: var(--light-cream);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--red-primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -12px;
    background-color: white;
    border: 4px solid var(--red-primary);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -12px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.timeline-content:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transform: scale(1.02);
}

.timeline-content h3 {
    color: var(--red-dark);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

@media screen and (max-width: 768px) {
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::before { left: 60px; border: medium solid white; border-width: 10px 10px 10px 0; border-color: transparent white transparent transparent; }
    .left::after, .right::after { left: 21px; }
    .right { left: 0%; }
}

/* --- Galería de Fotos (CARRUSEL) --- */
#galeria {
    padding: 60px 0;
    background-color: white;
}

.carousel-container {
    position: relative;
    max-width: 900px;
    margin: auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    /* Se ha eliminado la altura mínima para una mejor responsividad */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    aspect-ratio: 16 / 9; /* Proporción para escritorio (panorámica) */
    background-color: #f0f0f0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(128, 0, 0, 0.7);
    color: var(--cream);
    border: none;
    padding: 15px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 0 10px 10px 0;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.carousel-button.prev {
    left: 0;
    border-radius: 10px 0 0 10px;
}

.carousel-button.next {
    right: 0;
}

.carousel-button:hover {
    background-color: var(--red-darker);
    transform: translateY(-50%) scale(1.1);
}

/* --- Ubicaciones --- */
#ubicaciones {
    padding: 60px 0;
    background-color: var(--light-cream);
}

.location-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.location-card h3 {
    color: var(--red-dark);
    margin-bottom: 15px;
}

.map-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    background-color: var(--red-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.map-link:hover {
    background-color: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* --- Dress Code --- */
#dress-code {
    padding: 60px 0;
    background-color: white;
    
}

.dress-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}


.dress-code-box {
    background-color: var(--light-cream);
    padding: 30px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dress-code-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.dress-code-box h3 {
    color: var(--red-dark);
    margin-bottom: 15px;
}

.dress-code-box p {
    margin-bottom: 20px;
    line-height: 1.8;
    
}

.dress-code-image {
    max-width: 300px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 5px;
}



/* --- Hospedaje --- */
#hospedaje {
    padding: 60px 0;
    background-color: var(--light-cream);
}

.hotel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.hotel-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 0;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.hotel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.hotel-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.hotel-card h3 {
    color: var(--red-dark);
    margin: 20px 10px 10px 10px;
}

.hotel-card p {
    margin-bottom: 10px;
    padding: 0 10px;
}

.hotel-card a {
    color: var(--red-primary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.hotel-card a:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 30px 0;
    /*background-color: var(--red-darker);*/
    color: var(--cream);
    background: radial-gradient(circle at center bottom , #fa7e7e, var(--red-darker));
    
}

footer p {
    font-family: var(--font-script);
    font-size: 2rem;
}

.footer-logo {
    display: inline-block;
    margin-top: 20px;
    max-height: 40px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* --- Responsividad --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero .and { font-size: 2rem; }
    h2 { font-size: 2rem; }
    .countdown-container { gap: 20px; }
    .countdown-item { width: 120px; height: 120px; padding: 20px; }
    .countdown-item span { font-size: 2rem; }
    .corner-rose { width: 70px; height: 70px; }
    
    /* --- Ajuste del carrusel para mobile --- */
    .carousel-slide {
        aspect-ratio: 3 / 4; /* Proporción para mobile (vertical) */
    }

    .carousel-button { padding: 10px 15px; font-size: 1.2rem; }
    .footer-logo { max-height: 35px; }
}x