:root {
    /* Paleta Sofisticada (Tema Cars/Racing Moderno) */
    --primary-color: #e74c3c;
    /* Rojo Vintage Mate */
    --primary-dark: #c0392b;
    --secondary-color: #2c3e50;
    /* Azul Navy Elegante */
    --accent-color: #f1c40f;
    /* Dorado sutil para detalles */

    --bg-color: #f8f9fa;
    /* Blanco humo */
    --text-color: #34495e;
    /* Gris oscuro para lectura */
    --text-light: #7f8c8d;

    --card-bg: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;

    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
    --radius-card: 24px;
    --radius-btn: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: transparent;
    /* Transparente para ver el video de fondo */
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Texto más nítido en Mac/iOS */
    overflow-x: hidden;
}

/* Overlay de Bienvenida */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-content {
    text-align: center;
    color: white;
    padding: 3rem 2rem;
    max-width: 400px;
}

.welcome-subtitle {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#welcome-name-placeholder {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 2rem;
    line-height: 1.1;
    color: var(--primary-color);
    /* Acento de color */
}

.hidden {
    display: none;
}

/* Botones */
.btn-primary,
.btn-secondary {
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-btn);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    /* Mobile first: botones anchos */
    max-width: 300px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
    margin-top: 1rem;
}

.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.98);
}

/* Música Flotante */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: none;
    font-size: 20px;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    /* Eliminamos fondos para que se vea el video global */
    background: none;
    color: white;
    text-align: center;
    padding: 6rem 1.5rem 4rem;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    margin-bottom: -40px;
    z-index: 1;
}

.hero-video {
    position: fixed;
    /* Fijo a la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -10;
    /* Muy atrás */
    opacity: 0;
    filter: blur(6px) brightness(0.7);
    transition: opacity 1.5s ease;
}

.hero-video.video-loaded {
    opacity: 1;
}

.hero-overlay {
    position: fixed;
    /* Fijo cubriendo el video */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(44, 62, 80, 0.85) 0%, rgba(44, 62, 80, 0.5) 100%);
    z-index: -9;
    /* Justo encima del video */
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    margin: 1rem 0;
    line-height: 1;
    letter-spacing: -1px;
}

.intro-text {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}

.age-badge {
    background: white;
    color: var(--secondary-color);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 2rem auto 0;
    font-family: var(--font-heading);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.age-badge span {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.age-badge small {
    font-size: 0.7rem;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 1px;
}

/* --- Scroll Sections & Animations --- */
.scroll-section {
    /* Ocupar casi toda la pantalla para centrar la atención */
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* Estado inicial (Oculto) */
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Margen para asegurar separación */
    margin-bottom: 2rem;
}

/* Estado Visible (Activado por JS) */
.scroll-section.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Cards y Layout */
.container {
    max-width: 500px;
    /* Más estrecho para mejor lectura */
    margin: 0 auto;
    padding-bottom: 40px;
    position: relative;
}

.card {
    background: var(--card-bg);
    margin: 0 20px 40px;
    /* Margen inferior agregado para separar cards */
    padding: 1.5rem;
    /* Padding reducido para ajustar tamaño */
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Títulos de Sección */
.section-title {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

/* Decoración sutil debajo de títulos */
.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    margin: 8px auto 0;
    border-radius: 2px;
}

.highlight-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* --- Calendario --- */
.calendar-wrapper {
    margin: 1.5rem auto;
    max-width: 300px;
}

.calendar-header {
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: capitalize;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    font-size: 0.9rem;
}

.calendar-day-name {
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.calendar-day {
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 0.9rem;
}

.calendar-day.event-date {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}

.calendar-day.today {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    font-weight: bold;
}

/* --- Cuenta Regresiva --- */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.countdown-item {
    background: var(--bg-color);
    padding: 10px;
    border-radius: 12px;
    min-width: 70px;
    text-align: center;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.countdown-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
    font-family: var(--font-heading);
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
    margin-top: 4px;
    display: block;
}

#event-time,
#location-address {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Ubicación */
.location-name {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.address-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.icon-pin {
    color: var(--primary-color);
    flex-shrink: 0;
}

.location-image-container {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.location-image-container img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.location-card:hover .location-image-container img {
    transform: scale(1.05);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Galería Grid */
.gallery-section {
    padding: 40px 20px;
    text-align: center;
}

.gallery-section .section-title {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Sombra para leerse sobre el video */
}

/* Personalización del Carousel de Bootstrap */
#galleryCarousel {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.carousel-item img {
    height: 300px;
    /* Altura fija para uniformidad */
    object-fit: cover;
}

/* Detalles */
.detail-item {
    margin-bottom: 2rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.detail-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Animaciones */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger animation delay para elementos si se desea agregar con JS, 
   por ahora el título principal tiene la animación base */

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.7;
}

/* Responsive */
@media (min-width: 768px) {
    .hero {
        padding: 8rem 2rem 5rem;
    }

    .hero h1 {
        font-size: 6rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .container {
        max-width: 700px;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 3rem;
    }

    .card {
        margin: 0 10px 20px;
        padding: 2rem 1.5rem;
    }
}

100% {
    transform: scale(1);
    opacity: 1;
}
}

.animate-pop {
    animation: pop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: #888;
}

/* Responsive */
@media (min-width: 768px) {
    .hero h1 {
        font-size: 5rem;
    }

}

@media (min-width: 768px) {
    .carousel-item img {
        height: 500px;
        /* Más alto en escritorio */
    }
}