/* ===== VARIABLES CSS ===== */
:root {
    /* Colores principales - Fácilmente personalizables */
    --primary-color: #ff69b4;
    --primary-dark: #ff1493;
    --secondary-color: #ffd700;
    --accent-color: #9b59b6;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --bg-light: #fff5f8;
    --bg-white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    
    /* Tipografía */
    --font-title: 'Dancing Script', cursive;
    --font-body: 'Poppins', sans-serif;
}

/* ===== RESET Y ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-light);
}

/* ===== LOADER ===== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    display: flex;
    gap: 15px;
}

.circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    animation: bounce 0.5s alternate infinite;
}

.circle:nth-child(2) {
    animation-delay: 0.2s;
}

.circle:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    to {
        transform: translateY(-30px);
        opacity: 0.5;
    }
}

.loader-overlay p {
    margin-top: 20px;
    color: white;
    font-size: 1.2rem;
}

.loader-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

/* ===== BOTÓN DE MÚSICA ===== */
.music-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.music-toggle:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.music-toggle i {
    font-size: 24px;
}

.music-status {
    font-size: 10px;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.pre-title {
    font-size: 1.2rem;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.quince-name {
    font-family: var(--font-title);
    font-size: 4rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.2s both;
}

.name-first, .name-last {
    display: block;
}

.date-badge {
    display: inline-flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 50px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s both;
}

.date-badge i {
    margin-right: 8px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-indicator span {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

/* ===== SECTION TÍTULOS ===== */
.section-title {
    font-family: var(--font-title);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
    margin: 15px auto 0;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

/* ===== COUNTDOWN ===== */
.countdown-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 20px;
    min-width: 120px;
}

.countdown-number {
    font-size: 3rem;
    font-weight: bold;
    font-family: var(--font-body);
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-top: 10px;
}

.countdown-separator {
    font-size: 2rem;
    font-weight: bold;
}

/* ===== GALERÍA ===== */
.gallery-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px;
    transition: bottom 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    bottom: 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.close-lightbox:hover {
    color: var(--primary-color);
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 10px;
}

/* ===== UBICACIÓN ===== */
.location-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.location-info {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.location-info i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.location-info h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.btn-waze {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #1e90ff;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-waze:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    display: block;
}

/* ===== RSVP FORM ===== */
.rsvp-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.rsvp-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-light);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

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

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

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-submit {
    width: 100%;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.form-status {
    margin-top: 15px;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
}

.form-status.success {
    background: #d4edda;
    color: #155724;
}

.form-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* ===== LIBRO DE VISITAS ===== */
.guestbook-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.guestbook-form {
    max-width: 600px;
    margin: 0 auto 40px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.guestbook-messages {
    max-width: 800px;
    margin: 0 auto;
}

.message-card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: slideIn 0.3s ease;
}

.message-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-light);
}

.message-name {
    font-weight: bold;
    color: var(--primary-color);
}

.message-date {
    font-size: 0.8rem;
    color: #999;
}

.message-content {
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-family: var(--font-title);
    margin-bottom: 20px;
}

.footer-logo i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.footer-quote {
    font-style: italic;
    margin-bottom: 30px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-copyright {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .quince-name {
        font-size: 2.5rem;
    }
    
    .countdown-item {
        min-width: 80px;
        padding: 15px;
    }
    
    .countdown-number {
        font-size: 2rem;
    }
    
    .location-content {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .rsvp-form,
    .guestbook-form {
        padding: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .countdown-wrapper {
        gap: 15px;
    }
    
    .countdown-item {
        min-width: 70px;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}