/* =========================================================================
   BASE STYLES - PLANTILLA MAESTRA INVITÁ CHE
   ========================================================================= */

/* Theme Variables (Editable por plantilla: dinosaurio, capibara, etc.) */
:root {
    /* Brand/Theme Colors */
    --theme-primary: #ec4899;
    /* Pink as base example */
    --theme-primary-dark: #be123c;
    --theme-secondary: #fdf2f8;
    --theme-accent: #8b5cf6;
    --theme-text: #1e293b;
    --theme-text-light: #64748b;
    --theme-bg: #fffbfd;
    --theme-card-bg: #ffffff;

    /* Utilities */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-pill: 9999px;

    /* Shadows */
    --shadow-card: 0 10px 25px -5px rgba(236, 72, 153, 0.15), 0 8px 10px -6px rgba(236, 72, 153, 0.1);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Font */
    --font-main: 'Quicksand', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Remove blue tap highlight on mobile iOS/Android */
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--theme-bg);
    color: var(--theme-text);
    line-height: 1.5;
    overflow-x: hidden;
    height: 100%;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
}

/* =========================================================================
   LAYOUT & CONTAINERS (MOBILE FIRST)
   ========================================================================= */

.invitation-container {
    width: 100%;
    max-width: 480px;
    /* Ancho máximo de celular */
    margin: 0 auto;
    padding: 1rem 1.25rem 3rem;
    background: var(--theme-bg);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    /* En escritorio parecerá un popup */
}

.section {
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--theme-primary);
}

/* =========================================================================
   LOADER & INITIAL ANIMATION
   ========================================================================= */

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--theme-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
}

.bounce-emoji {
    font-size: 4rem;
    animation: bounce 1s infinite alternate;
    margin-bottom: 1rem;
}

.loader-overlay p {
    font-weight: 600;
    color: var(--theme-text-light);
    animation: pulse 1.5s infinite;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-20px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* =========================================================================
   ANIMATIONS & REVEAL CLASSES
   ========================================================================= */

.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.floating-decorations {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.decor {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.6;
}

.d-1 {
    top: 5%;
    left: 5%;
    animation: float 6s ease-in-out infinite;
}

.d-2 {
    top: 15%;
    right: 10%;
    font-size: 2rem;
    animation: float 5s ease-in-out infinite reverse;
}

.d-3 {
    top: 40%;
    left: 15%;
    animation: float 7s ease-in-out infinite;
}

.d-4 {
    top: 60%;
    right: 5%;
    font-size: 1.8rem;
    animation: float 4s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-15px) rotate(10deg);
    }
}

/* =========================================================================
   BUTTONS
   ========================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.95);
}

/* Efecto pulsación móvil */
.btn-full {
    width: 100%;
}

.btn-primary {
    background: var(--theme-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-primary:active {
    background: var(--theme-primary-dark);
}

.btn-secondary {
    background: var(--theme-secondary);
    color: var(--theme-primary);
    border: 2px solid var(--theme-primary);
}

.btn-pulse {
    animation: heart-pulse 2s infinite;
}

@keyframes heart-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 4px 20px rgba(236, 72, 153, 0.5);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    }
}

/* =========================================================================
   COMPONENTS
   ========================================================================= */

/* Hero */
.hero-card {
    background: var(--theme-card-bg);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-accent));
}

.badge {
    display: inline-block;
    background: var(--theme-secondary);
    color: var(--theme-primary);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-title {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--theme-text);
    font-weight: 700;
}

.name {
    color: var(--theme-primary);
}

.hero-quick-info {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-capsule {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--theme-bg);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--theme-text);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.quick-capsule i {
    color: var(--theme-accent);
}

/* Message Detail */
.message-bubble {
    background: var(--theme-secondary);
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: var(--radius-md);
    position: relative;
}

.message-bubble .quote-icon {
    font-size: 2rem;
    color: var(--theme-primary);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 10px;
}

.custom-message {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--theme-text);
    position: relative;
    z-index: 2;
}

/* Info Cards Stack */
.info-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--theme-card-bg);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--theme-secondary);
    color: var(--theme-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-text h3 {
    font-size: 0.9rem;
    color: var(--theme-text-light);
    font-weight: 600;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.info-text p {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--theme-text);
    margin: 0;
    line-height: 1.2;
}

/* Countdown */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.time-box {
    background: var(--theme-primary);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 1rem 0.5rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.2);
}

.time-val {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.time-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.9;
    font-weight: 600;
}

/* Map */
.map-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
    background: #e2e8f0;
}

/* Gallery - Masonry feel */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gallery-item {
    flex: 1 1 45%;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease;
}

.gallery-item:active {
    transform: scale(0.95);
}

/* El primer elemento siempre destacará ancho completo */
.gallery-item:nth-child(1) {
    flex-basis: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 120px;
}

.gallery-item:nth-child(1) img {
    min-height: 200px;
}

/* RSVP */
.rsvp-card {
    background: var(--theme-card-bg);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 2px solid var(--theme-secondary);
}

.rsvp-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.rsvp-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--theme-text);
}

.rsvp-card p {
    font-size: 0.95rem;
    color: var(--theme-text-light);
    margin-bottom: 1.5rem;
}

.invitation-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--theme-text-light);
}

.invitation-footer a {
    color: var(--theme-primary);
    font-weight: 700;
    text-decoration: none;
}