/* =========================================
   RESET Y VARIABLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dorado: #C5A880;
    --dorado-claro: rgba(197, 168, 128, 0.3);
    --dorado-muy-claro: rgba(197, 168, 128, 0.12);
    --verde-oscuro: #2d4a2d;
    --verde-medio: #3d5e3d;
    --fondo-pagina: #f5f0e8;
    --fondo-card: #ffffff;
    --fondo-suave: #faf7f2;
    --texto-principal: #3a3028;
    --texto-secundario: #7a6f65;
    --texto-muted: #b0a89e;
}

body, html {
    min-height: 100vh;
    font-family: 'Josefin Sans', sans-serif;
    background-color: var(--fondo-pagina);
    color: var(--texto-principal);
}

/* =========================================
   WRAPPER Y TARJETA
   ========================================= */
.invitation-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px 16px 48px;
    background: linear-gradient(160deg, #fdf9f3 0%, #f5f0e8 60%, #ede5d8 100%);
}

.invitation-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
    border: 1px solid var(--dorado-claro);
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px rgba(197, 168, 128, 0.25),
                0 32px 64px rgba(0, 0, 0, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   ESQUINAS DECORATIVAS
   ========================================= */
.corner {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 2;
    pointer-events: none;
}

.corner::before,
.corner::after {
    content: '';
    position: absolute;
    background: var(--dorado);
}

.corner::before { width: 1px; height: 100%; }
.corner::after  { width: 100%; height: 1px; }

.corner-tl { top: 12px; left: 12px; }
.corner-tl::before { top: 0; left: 0; }
.corner-tl::after  { top: 0; left: 0; }

.corner-tr { top: 12px; right: 12px; }
.corner-tr::before { top: 0; right: 0; left: auto; }
.corner-tr::after  { top: 0; right: 0; }

.corner-bl { bottom: 12px; left: 12px; }
.corner-bl::before { bottom: 0; top: auto; left: 0; }
.corner-bl::after  { bottom: 0; top: auto; left: 0; }

.corner-br { bottom: 12px; right: 12px; }
.corner-br::before { bottom: 0; top: auto; right: 0; left: auto; }
.corner-br::after  { bottom: 0; top: auto; right: 0; }

/* =========================================
   BANNER SUPERIOR
   ========================================= */
.wedding-banner {
    background: var(--fondo-card);
    padding: 48px 24px 24px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--dorado-claro);
}

.banner-rings {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}

.banner-eyebrow {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--dorado);
    margin-bottom: 12px;
}

.banner-nos {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    font-style: italic;
    color: var(--texto-secundario);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.banner-names {
    font-family: 'Great Vibes', cursive;
    font-size: 58px;
    line-height: 1.15;
    color: var(--texto-principal);
    text-shadow: 2px 3px 8px rgba(197, 168, 128, 0.4),
                 0px 1px 3px rgba(0, 0, 0, 0.1);
}

.banner-amp {
    color: var(--dorado);
    display: block;
    font-size: 38px;
    margin: 2px 0;
}

.banner-flowers {
    font-size: 16px;
    margin-top: 16px;
    margin-bottom: 0;
    letter-spacing: 16px;
    color: var(--dorado);
    opacity: 0.8;
    text-align: center;
    padding-left: 16px;
}

/* =========================================
   ORNAMENTO DORADO
   ========================================= */
.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    margin-top: 0;
}

.orn-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--dorado));
}

.ornament .orn-line:last-child {
    background: linear-gradient(to left, transparent, var(--dorado));
}

.orn-diamond {
    width: 7px;
    height: 7px;
    background: var(--dorado);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* =========================================
   FRASE
   ========================================= */
.wedding-quote {
    text-align: center;
    padding: 8px 36px 24px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-style: italic;
    line-height: 2;
    color: var(--texto-secundario);
    letter-spacing: 0.5px;
    font-weight: 300;
}

/* =========================================
   CUERPO
   ========================================= */
.wedding-body {
    padding: 0 28px 32px;
    text-align: center;
    background: var(--fondo-suave);
    border-top: 1px solid var(--dorado-muy-claro);
    border-bottom: 1px solid var(--dorado-muy-claro);
}

.welcome-text {
    font-size: 13px;
    line-height: 1.9;
    color: var(--texto-secundario);
    padding-top: 24px;
    margin-bottom: 10px;
}

.mini-help {
    font-size: 11px;
    color: var(--dorado);
    font-style: italic;
    margin-bottom: 24px;
}

/* =========================================
   DIVISOR DORADO
   ========================================= */
.gold-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto 24px;
    width: 75%;
}

.gold-divider::before,
.gold-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--dorado));
}

.gold-divider::after {
    background: linear-gradient(to left, transparent, var(--dorado));
}

.gold-diamond {
    width: 7px;
    height: 7px;
    background: var(--dorado);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* =========================================
   BOTONES
   ========================================= */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border-radius: 2px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
}

.btn:hover::after { left: 125%; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.btn-primary {
    background: linear-gradient(
        90deg,
        var(--dorado) 0%,
        #e8d5b0 40%,
        #fff8ee 50%,
        #e8d5b0 60%,
        var(--dorado) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(197, 168, 128, 0.4);
}

.btn-primary:hover {
    background-color: #b8976e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 168, 128, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--dorado);
    border: 1px solid var(--dorado);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(197, 168, 128, 0.08) 50%,
        transparent 100%
    );
    border-color: var(--dorado);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 168, 128, 0.2);
}

.hidden-input { display: none; }

/* =========================================
   LOADING
   ========================================= */
.loading-area {
    margin-top: 20px;
    font-size: 13px;
    font-style: italic;
    color: var(--dorado);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.file-list {
    margin-top: 10px;
    list-style: none;
    font-size: 12px;
    text-align: left;
    color: var(--texto-secundario);
}

/* =========================================
   SEPARADOR PAREJA
   ========================================= */
.couple-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 28px 0;
}

.couple-line {
    flex: 1;
    height: 1px;
    background: var(--dorado-claro);
}

.couple-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* =========================================
   GALERÍA
   ========================================= */
.gallery-section {
    padding: 20px 28px 32px;
}

.gallery-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.gallery-heading::before,
.gallery-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dorado-claro);
}

.gallery-title {
    font-family: 'Josefin Sans', serif;
    font-size: 18px;
    font-style: italic;
    color: var(--texto-secundario);
    white-space: nowrap;
}

.gallery-grid {
    column-count: 2;
    column-gap: 8px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 8px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    animation: fadeIn 0.4s ease;
    border: 1px solid var(--dorado-muy-claro);
    background: var(--fondo-suave);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.03);
}

.empty-gallery {
    column-span: all;
    width: 100%;
    font-size: 12px;
    color: var(--texto-muted);
    font-style: italic;
    text-align: center;
    padding: 32px 16px;
    border: 1px dashed var(--dorado-claro);
    border-radius: 4px;
    line-height: 1.8;
}

/* =========================================
   FOOTER
   ========================================= */
.wedding-footer {
    background: var(--fondo-suave);
    border-top: 1px solid var(--dorado-claro);
    padding: 24px 16px;
    text-align: center;
}

.footer-rings {
    font-size: 22px;
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.wedding-footer p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-style: italic;
    color: var(--dorado);
    margin-bottom: 12px;
}

.footer-dev {
    font-family: 'Josefin Sans', sans-serif !important;
    font-size: 11px !important;
    color: var(--texto-muted) !important;
    font-style: normal !important;
    letter-spacing: 1px;
}

.dev-link {
    color: var(--dorado);
    text-decoration: none;
    font-weight: 600;
}

.dev-link:hover {
    color: var(--texto-principal);
}
/* =========================================
   PÉTALOS Y DESTELLOS ANIMADOS
   ========================================= */
.petal {
    position: fixed;
    top: -20px;
    pointer-events: none;
    z-index: 999;
    animation: caerPetalo linear infinite;
    opacity: 0;
}

.petal.rosa {
    font-size: 14px;
}

.petal.dorado {
    width: 6px;
    height: 6px;
    background: var(--dorado);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(197, 168, 128, 0.8);
}

@keyframes caerPetalo {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(0deg) scale(0.8);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg) scale(1.1);
    }
}
/* =========================================
   SPINNER ANILLOS ANIMADOS
   ========================================= */
.rings-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
}

.rings-container {
    position: relative;
    width: 70px;
    height: 40px;
}

.ring {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    top: 0;
}

.ring-1 {
    border-color: var(--dorado);
    left: 0;
    animation: ringPulse 1.8s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(197, 168, 128, 0.3);
}

.ring-2 {
    border-color: var(--texto-principal);
    left: 28px;
    animation: ringPulse 1.8s ease-in-out infinite 0.9s;
    box-shadow: 0 0 10px rgba(58, 48, 40, 0.2);
}

@keyframes ringPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.spinner-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-style: italic;
    color: var(--dorado);
    text-align: center;
    line-height: 1.6;
    animation: fadeInOut 1.8s ease-in-out infinite;
}

.spinner-counter {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--texto-muted);
    text-align: center;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
/* =========================================
   TRANSICIÓN SUAVE LOADING
   ========================================= */
.loading-area {
    transition: opacity 0.5s ease, max-height 0.5s ease, padding 0.5s ease;
    max-height: 300px;
    overflow: hidden;
}

.loading-area.fadeout {
    opacity: 0;
    max-height: 0;
    padding: 0;
}
.dev-link i {
    font-size: 14px;
    vertical-align: middle;
    margin-right: 3px;
}