/* ============================================================
   SISTEMA DE DISEÑO LETAL - SAN JUDAS TADEO
   ============================================================ */
:root {
    --gold:        #D4AF37;
    --gold-bright: #FFD700;
    --gold-soft:   #F3E5AB;
    --gold-glow:   rgba(212, 175, 55, 0.55);
    --emerald:     #011a0e;
    --emerald-mid: #022d19;
    --cream:       #F5F0E8;
    --white-dim:   rgba(255,255,255,0.85);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--emerald);
    color: var(--cream);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ── Fondo foto del Santo ── */
.bg-photo {
    position: fixed; inset: 0;
    background-image: url('bg.png');
    background-size: cover;
    background-position: center 20%;
    z-index: 0;
    animation: subtle-pan 30s ease-in-out infinite alternate;
}
@keyframes subtle-pan {
    0%   { transform: scale(1.06) translateX(0px); }
    100% { transform: scale(1.14) translateX(-20px); }
}

/* ── Overlay multicapa ── */
.bg-overlay {
    position: fixed; inset: 0;
    background:
        linear-gradient(to bottom, rgba(1,26,14,0.45) 0%, rgba(1,26,14,0.0) 40%, rgba(1,26,14,0.9) 80%, rgba(1,26,14,1) 100%),
        radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 0%, rgba(1,26,14,0.5) 100%);
    z-index: 1;
}

/* ── Canvas de partículas ── */
#particles-canvas {
    position: fixed; inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* ── Rayos de luz divina ── */
.light-rays {
    position: fixed;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.ray {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(212,175,55,0.18) 0%, transparent 70%);
    transform-origin: top center;
    animation: ray-pulse 6s ease-in-out infinite alternate;
}
.ray:nth-child(1) { transform: rotate(-40deg); animation-delay: 0s; width: 60px; }
.ray:nth-child(2) { transform: rotate(-20deg); animation-delay: 0.8s; width: 40px; }
.ray:nth-child(3) { transform: rotate(0deg);   animation-delay: 1.2s; width: 80px; opacity: 0.7; }
.ray:nth-child(4) { transform: rotate(20deg);  animation-delay: 0.4s; width: 40px; }
.ray:nth-child(5) { transform: rotate(40deg);  animation-delay: 1.6s; width: 60px; }

@keyframes ray-pulse {
    0%   { opacity: 0.3; }
    100% { opacity: 0.9; }
}

/* ── Fila de Velas ── */
.candles-row {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 8%;
    z-index: 3;
    pointer-events: none;
}
.candle {
    width: 12px;
    height: 70px;
    background: linear-gradient(to top, #b8860b, #f5deb3, #fffaf0);
    border-radius: 3px 3px 1px 1px;
    position: relative;
    box-shadow: 0 0 10px rgba(212,175,55,0.3);
}
.candle::before {
    content: '';
    position: absolute;
    top: -3px; left: 50%;
    transform: translateX(-50%);
    width: 2px; height: 10px;
    background: #555;
    border-radius: 1px;
}
.flame {
    position: absolute;
    top: -28px; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 26px;
    background: radial-gradient(ellipse at 50% 80%, #FFD700, #ff8c00 50%, transparent 80%);
    border-radius: 50% 50% 30% 30%;
    filter: blur(1px);
    animation: flicker 1.8s ease-in-out infinite alternate;
    box-shadow: 0 0 15px 5px rgba(255,160,0,0.5);
}
@keyframes flicker {
    0%   { transform: translateX(-50%) scaleX(1)   scaleY(1)    rotate(-2deg); opacity: 0.9; }
    25%  { transform: translateX(-50%) scaleX(0.9) scaleY(1.05) rotate(1deg);  opacity: 1;   }
    50%  { transform: translateX(-50%) scaleX(1.1) scaleY(0.95) rotate(-1deg); opacity: 0.95;}
    75%  { transform: translateX(-50%) scaleX(0.95) scaleY(1.08) rotate(2deg); opacity: 1;   }
    100% { transform: translateX(-50%) scaleX(1)   scaleY(1)    rotate(0deg);  opacity: 0.85;}
}

/* ── MAIN ── */
main {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 0 1.5rem 120px;
}

/* ── SECCIÓN HERO ── */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: clamp(3rem, 15vw, 7rem);
    position: relative;
    margin-bottom: 2.5rem;
}

.halo-ring {
    position: absolute;
    top: clamp(2rem, 10vw, 5rem);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(200px, 50vw, 380px);
    height: clamp(200px, 50vw, 380px);
    border-radius: 50%;
    border: 1px solid rgba(212,175,55,0.25);
    box-shadow:
        0 0 40px rgba(212,175,55,0.12),
        inset 0 0 40px rgba(212,175,55,0.08);
    animation: halo-breathe 4s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes halo-breathe {
    0%   { box-shadow: 0 0 30px rgba(212,175,55,0.1),  inset 0 0 30px rgba(212,175,55,0.05); }
    100% { box-shadow: 0 0 80px rgba(212,175,55,0.35), inset 0 0 60px rgba(212,175,55,0.2);  }
}

.eyebrow {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.6rem, 2vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--gold-soft);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fade-up 1s ease forwards 0.3s;
}

.hero-title {
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-align: center;
    margin-bottom: 1.8rem;
}
.title-line1 {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(3rem, 12vw, 7rem);
    color: var(--gold-bright);
    text-shadow:
        0 0 30px var(--gold-glow),
        0 0 80px rgba(212,175,55,0.3),
        0 4px 20px rgba(0,0,0,0.8);
    opacity: 0;
    animation: fade-up 1s ease forwards 0.6s;
}
.title-line2 {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 900;
    font-size: clamp(4rem, 18vw, 11rem);
    color: transparent;
    -webkit-text-stroke: 2px var(--gold);
    text-shadow: 0 0 60px rgba(212,175,55,0.4);
    letter-spacing: 8px;
    opacity: 0;
    animation: fade-up 1s ease forwards 0.9s;
}

.golden-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
    margin: 0 auto 1.5rem;
    opacity: 0;
    animation: fade-in-only 1s ease forwards 1.2s;
}

.tagline {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    color: rgba(245,240,232,0.8);
    max-width: 500px;
    line-height: 1.7;
    opacity: 0;
    animation: fade-up 1s ease forwards 1.4s;
}

/* ── SISTEMA DE GRID (DUAL CAJA) ── */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1100px;
    margin-top: 1rem;
    opacity: 0;
    animation: fade-up 1.2s ease forwards 1.8s;
}
@media (min-width: 900px) {
    .cards-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* ── TARJETA DE DEVOCIÓN ── */
.devotion-card {
    width: 100%;
}
.testimonials-card {
    width: 100%;
}
.card-inner {
    background: linear-gradient(145deg, rgba(5,45,25,0.8), rgba(1,26,14,0.95));
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 24px;
    padding: clamp(1.8rem, 5vw, 3rem);
    text-align: center;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow:
        0 0 0 1px rgba(212,175,55,0.1),
        0 30px 80px -20px rgba(0,0,0,0.9),
        0 0 80px rgba(212,175,55,0.08);
    position: relative;
    overflow: hidden;
}
.card-inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 12px rgba(255,180,0,0.8));
    animation: icon-glow 3s ease-in-out infinite alternate;
}
@keyframes icon-glow {
    0%   { filter: drop-shadow(0 0 8px rgba(255,180,0,0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(255,180,0,1)); }
}

.card-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.3rem, 4vw, 1.9rem);
    font-weight: 700;
    color: var(--gold-bright);
    margin-bottom: 1.2rem;
    text-shadow: 0 0 20px var(--gold-glow);
}

.card-text {
    font-size: clamp(0.95rem, 2.5vw, 1.08rem);
    color: rgba(245,240,232,0.82);
    line-height: 1.85;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* ── Botones de monto sugerido ── */
.amount-suggestion {
    margin-bottom: 2rem;
}
.amount-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(212,175,55,0.7);
    margin-bottom: 0.9rem;
    font-family: 'Cinzel', serif;
}
.amounts {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.amount-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    border: 1px solid rgba(212,175,55,0.4);
    background: transparent;
    color: var(--gold-soft);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.amount-btn:hover,
.amount-btn.active {
    background: var(--gold);
    color: #0b1a12;
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
    font-weight: 700;
}

/* ── BOTÓN PRINCIPAL DE DONACIÓN ── */
.main-donate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1.3rem 2rem;
    border-radius: 60px;
    background: linear-gradient(135deg, #FFD700 0%, #C8980A 50%, #FFD700 100%);
    background-size: 200% auto;
    color: #0b1a12;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.2rem);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow:
        0 8px 30px -5px rgba(212,175,55,0.6),
        0 0 60px rgba(212,175,55,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    animation: btn-bg-shift 4s linear infinite;
    margin-bottom: 1.2rem;
}
@keyframes btn-bg-shift {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}
.main-donate-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        0 20px 50px -5px rgba(212,175,55,0.8),
        0 0 100px rgba(212,175,55,0.35);
}
.main-donate-btn:active { transform: translateY(0) scale(0.99); }

.btn-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shine-sweep 4s ease-in-out infinite;
}
@keyframes shine-sweep {
    0%, 70% { left: -100%; }
    100%     { left: 250%;  }
}

.btn-icon {
    font-size: 0.8rem;
    opacity: 0.8;
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    color: rgba(226,232,240,0.6);
    font-weight: 300;
}

/* ── SELLO INFERIOR ── */
.footer-seal {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    opacity: 0;
    animation: fade-in-only 1s ease forwards 2.4s;
    padding: 0 1rem;
}
.seal-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.4), transparent);
    min-width: 30px;
}
.seal-text {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.55rem, 1.5vw, 0.75rem);
    color: rgba(212,175,55,0.55);
    letter-spacing: 1.5px;
    text-align: center;
    white-space: nowrap;
}

/* ── ANIMACIONES DE ENTRADA ── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0);    }
}
@keyframes fade-in-only {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── SECCIÓN TESTIMONIOS (FEED Y FORM) ── */
.feed-container {
    max-height: 380px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}
.feed-container::-webkit-scrollbar {
    width: 6px;
}
.feed-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}
.feed-container::-webkit-scrollbar-thumb {
    background: rgba(212,175,55,0.4);
    border-radius: 4px;
}

.cargando-feed {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(212,175,55,0.6);
    font-style: italic;
    padding: 2rem 0;
}

.testimonio-item {
    background: rgba(0,0,0,0.4);
    border-left: 2px solid var(--gold-soft);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    animation: fade-in-only 0.5s ease;
}
.t-nombre {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--gold-bright);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.t-fecha {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.t-texto {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(245,240,232,0.9);
}

.testimonio-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.testimonio-form input,
.testimonio-form textarea {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 8px;
    color: var(--cream);
    padding: 0.8rem;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    resize: none;
}
.testimonio-form textarea {
    min-height: 80px;
}
.testimonio-form input:focus,
.testimonio-form textarea:focus {
    border-color: var(--gold-bright);
    box-shadow: 0 0 10px rgba(212,175,55,0.2);
}

.submit-testimonio-btn {
    background: transparent;
    border: 1px solid var(--gold-soft);
    color: var(--gold-soft);
    padding: 0.8rem;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.submit-testimonio-btn:hover {
    background: var(--gold-soft);
    color: #0b1a12;
    box-shadow: 0 0 15px var(--gold-glow);
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
    .candles-row { padding: 0 2%; }
    .title-line2 { letter-spacing: 3px; }
    .footer-seal { flex-direction: column; gap: 0.5rem; }
    .seal-text   { white-space: normal; }
}
