/* --- Variables & Base Styles --- */
:root {
    /* Magical color palette: Dreams & Champagne Gold */
    --primary-color: #D4AF37; /* Metallic Gold */
    --primary-hover: #b38b43;
    --primary-glow: rgba(212, 175, 55, 0.6);
    --secondary-color: #2c3e50; 
    --bg-color: #FAF6F0; /* Warm elegant off-white */
    --bg-alt: #F0EAE1;
    --text-color: #4a4a4a; /* Softer profound text */
    --text-light: #7a7a7a;
    --white: #ffffff;
    --border-radius: 20px;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    --font-accent: 'Great Vibes', cursive;
    --font-display: 'Cinzel', serif;
    
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Base magical background */
.magic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top right, #fffdf8, #f8f4eb);
}

/* Floating Orbs for "Magical" effect */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatOrb 20s infinite ease-in-out;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: #FFDDA1;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #E8D3F9; /* Very faint magical lavender */
    bottom: 10%;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: #D4AF37;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
    opacity: 0.15;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, 50px) scale(1.1); }
    50% { transform: translate(0, 100px) scale(0.9); }
    75% { transform: translate(-50px, 50px) scale(1.05); }
}


img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* --- UI Classes --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    max-width: 650px;
    margin: 0 auto;
    font-size: clamp(1rem, 2vw, 1.15rem);
}

/* Glassmorphism utility */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Magical Floating Animation */
@keyframes magicalFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.floating-icon {
    animation: magicalFloat 4s ease-in-out infinite;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #E3C565);
    color: var(--white);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px var(--primary-glow);
    color: var(--white);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 5px 15px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid rgba(44, 62, 80, 0.3);
    color: var(--secondary-color);
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.15rem;
}

.btn-block {
    width: 100%;
}



/* --- Hero Section --- */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    /* Por defecto para PC: Cover suave con gradiente a 0.85 */
    background: linear-gradient(to bottom, rgba(250,246,240,0.85), rgba(250,246,240,0.95)), url("Logo y nombre sobre .jpg.jpeg") center/cover no-repeat;
    text-align: center;
}

@media (max-width: 767px) {
    .hero {
        /* Volvemos a un layout sólido universal. Eliminamos vw que rompe en algunos iPhones */
        min-height: 80vh;
        padding-top: 15%; /* Espacio seguro genérico */
        padding-bottom: 2rem;
        
        /* Imagen de fondo centrada cubriendo todo (el iPhone hará el zoom necesario) y oscurecida para leer todo bien a cualquier tamaño */
        background: linear-gradient(to bottom, rgba(250,246,240,0.8) 0%, rgba(250,246,240,0.95) 100%), url("Logo y nombre sobre .jpg.jpeg") center/cover no-repeat;
    }
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
    z-index: 10;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.glowing-pulse {
    animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 5px rgba(212,175,55,0.1); }
    100% { box-shadow: 0 0 15px rgba(212,175,55,0.5); border-color: rgba(212,175,55,0.6); }
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
}

.bounce {
    margin-top: 10px;
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* --- Features Section (Grid) --- */
.features {
    position: relative;
    z-index: 2;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.7), transparent);
    transform: skewX(-20deg);
    transition: 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.15), 0 0 20px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
}

.feature-card:hover::before {
    left: 150%;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: var(--transition);
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.5);
}

.feature-card:hover .icon-wrapper {
    background: linear-gradient(135deg, var(--primary-color), #E3C565);
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px var(--primary-glow);
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(1.3rem, 2.8vw, 1.6rem);
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.feature-card p {
    color: var(--text-light);
    font-size: 1rem;
}

/* --- Demo Section --- */
.demo-section {
    position: relative;
}

.demo-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.card {
    padding: 3rem;
    border-radius: var(--border-radius);
}

.card h3 {
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--secondary-color);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-style: italic;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.8);
    padding: 1.5rem 1rem;
    border-radius: 15px;
    min-width: 80px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(255,255,255,0.9);
}

.time-value {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(212, 175, 55, 0.2);
}

.time-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-top: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Form Styles */
.rsvp-form .form-group {
    margin-bottom: 1.8rem;
}

.rsvp-form label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.rsvp-form input,
.rsvp-form select {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background-color: rgba(255,255,255,0.8);
}

.rsvp-form input:focus,
.rsvp-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.form-message {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    min-height: 20px;
}

.form-message.success { color: #27ae60; }
.form-message.error { color: #e74c3c; }

/* --- Categories Section (Cards) --- */
.categories {
    position: relative;
    z-index: 2;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.category-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    z-index: 1;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(212,175,55,0.4), transparent);
    transform: skewX(-20deg);
    transition: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 3;
    pointer-events: none;
}

.category-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 50px rgba(212, 175, 55, 0.25), 0 0 30px var(--primary-glow);
    border-color: var(--primary-color);
}

.category-card:hover::before {
    left: 150%;
}

/* Dreamy background gradients and real images */
.bg-bodas { background-image: url("img/wedding_card.jpg"); }
.bg-15    { background-image: url("img/15_years_card.jpg"); }
.bg-baby  { background-image: url("img/baby_shower_card.png"); }

.card-image {
    height: 280px; /* Un poco más de altura para lucir las fotos */
    position: relative;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.category-card:hover .card-image {
    transform: scale(1.1); /* Efecto zoom mágico en la foto */
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(250, 246, 240, 1), transparent);
}

.card-content {
    padding: 0 2.5rem 2.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-color); /* Matches the overlay blending */
    position: relative;
    z-index: 2;
}

.card-content h3 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    letter-spacing: 2px;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    margin-top: -20px;
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

/* --- Botón Flotante WhatsApp --- */
.floating-wa {
    position: fixed;
    bottom: 25px; /* Ligeramente más arriba por si hay barras de navegación de celular */
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.5);
    z-index: 1000000; /* Z-index astronómico para que NADA lo tape */
    transition: all 0.3s ease;
    cursor: pointer;
}

.pulse-wa {
    animation: bounceAndPulse 2.5s infinite;
}

@keyframes bounceAndPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.floating-wa:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white; /* Maintain icon color */
}

/* Tooltip message next to WhatsApp button */
.tooltip-wa {
    position: absolute;
    right: 75px;
    background-color: white;
    color: #4a4a4a;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tooltip-wa::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent white;
}

.floating-wa:hover .tooltip-wa {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}


/* --- Footer --- */
.footer {
    background-color: #1a252f;
    color: var(--white);
    padding: 5rem 0 2rem;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 70px;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: #a0aab5;
    font-size: 1.4rem;
    font-family: var(--font-accent);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.4rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px var(--primary-glow);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2.5rem;
    color: #7a8693;
    font-size: 0.9rem;
}

/* --- Media Queries Generales --- */
@media (max-width: 575px) {
    .floating-wa {
        bottom: 20px;
        right: 20px !important;
        width: 55px;
        height: 55px;
        font-size: 30px;
    }
    .tooltip-wa { display: none !important; }

    /* Fix Demo Section Cards */
    .card {
        padding: 1.5rem;
    }

    .countdown-timer {
        gap: 0.5rem;
    }

    .time-box {
        min-width: 65px;
        padding: 1rem 0.5rem;
    }

    .time-value {
        font-size: 1.8rem;
    }

    .time-label {
        font-size: 0.7rem;
        margin-top: 0.5rem;
    }

    .rsvp-form {
        padding: 0; /* Already inside card padding */
    }
}

@media (min-width: 576px) {
    .time-box {
        min-width: 90px;
        padding: 2rem 1rem;
    }
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .demo-container {
        grid-template-columns: repeat(2, 1fr);
        align-items: start;
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .footer-brand {
        max-width: 350px;
        text-align: left;
    }
}

