/**
 * CTA Donation Pattern Styles
 *
 * Estilos para el patrón de Call to Action de Donación
 * Usa la paleta oficial: #B7272F, #FFC00A, #41ADCD, #374F59
 */

/* ============================================
   Container Principal
   ============================================ */
.core-cta-donation {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #B7272F 0%, #41ADCD 100%) !important;
    background-size: 200% 200% !important;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Efecto de partículas animadas (pseudo-elementos) */
.core-cta-donation::before,
.core-cta-donation::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 192, 10, 0.1);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.core-cta-donation::before {
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.core-cta-donation::after {
    bottom: -100px;
    right: -100px;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(30px, -30px) scale(1.2);
        opacity: 0.6;
    }
}

/* ============================================
   Contenedor Interno
   ============================================ */
.core-cta-donation .wp-block-group.has-white-background-color {
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2),
                0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideUpFadeIn 0.8s ease-out;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.core-cta-donation .wp-block-group.has-white-background-color:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25),
                0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Título
   ============================================ */
.core-cta-donation-title {
    color: #374F59 !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
    animation: titlePulse 2s ease-in-out infinite;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

@keyframes titlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Emojis en el título con animación */
.core-cta-donation-title {
    display: inline-block;
}

.core-cta-donation-title::before,
.core-cta-donation-title::after {
    display: inline-block;
    animation: emojiBounce 1.5s ease-in-out infinite;
}

.core-cta-donation-title::before {
    animation-delay: 0s;
}

.core-cta-donation-title::after {
    animation-delay: 0.75s;
}

@keyframes emojiBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-10deg);
    }
    75% {
        transform: translateY(-10px) rotate(10deg);
    }
}

/* ============================================
   Mensaje
   ============================================ */
.core-cta-donation-message {
    color: #374F59 !important;
    line-height: 1.8 !important;
    margin-bottom: 2rem !important;
    animation: fadeInUp 1s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.core-cta-donation-message strong {
    color: #B7272F;
    font-weight: 600;
    position: relative;
}

.core-cta-donation-message strong::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #FFC00A 0%, #B7272F 100%);
    animation: underlineExpand 0.5s ease-out;
}

@keyframes underlineExpand {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* ============================================
   Botón
   ============================================ */
.core-cta-donation-button {
    animation: buttonSlideIn 1s ease-out 0.4s both;
}

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

.core-cta-donation-button .wp-block-button__link {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #B7272F 0%, #FFC00A 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(183, 39, 47, 0.3),
                0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Efecto de brillo animado en el botón */
.core-cta-donation-button .wp-block-button__link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    transition: left 0.5s ease;
}

.core-cta-donation-button .wp-block-button__link:hover::before {
    left: 100%;
}

/* Hover del botón */
.core-cta-donation-button .wp-block-button__link:hover {
    background: linear-gradient(135deg, #FFC00A 0%, #B7272F 100%) !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(183, 39, 47, 0.4),
                0 6px 16px rgba(0, 0, 0, 0.2);
}

.core-cta-donation-button .wp-block-button__link:active {
    transform: translateY(-1px) scale(1.02);
}

/* Emoji en el botón con animación */
.core-cta-donation-button .wp-block-button__link {
    position: relative;
}

.core-cta-donation-button .wp-block-button__link:hover {
    animation: buttonPulse 0.6s ease-in-out;
}

@keyframes buttonPulse {
    0%, 100% {
        transform: translateY(-3px) scale(1.05);
    }
    50% {
        transform: translateY(-5px) scale(1.08);
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .core-cta-donation {
        padding: 3rem 1.5rem !important;
    }
    
    .core-cta-donation .wp-block-group.has-white-background-color {
        padding: 2rem 1.5rem !important;
    }
    
    .core-cta-donation-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem) !important;
    }
    
    .core-cta-donation-message {
        font-size: 1.125rem !important;
    }
    
    .core-cta-donation-button .wp-block-button__link {
        font-size: 1.125rem !important;
        padding: 1rem 2rem !important;
    }
}

@media (max-width: 480px) {
    .core-cta-donation {
        padding: 2rem 1rem !important;
    }
    
    .core-cta-donation .wp-block-group.has-white-background-color {
        padding: 1.5rem 1rem !important;
    }
    
    .core-cta-donation-title {
        font-size: 1.5rem !important;
    }
    
    .core-cta-donation-message {
        font-size: 1rem !important;
    }
    
    .core-cta-donation-button .wp-block-button__link {
        font-size: 1rem !important;
        padding: 0.875rem 1.5rem !important;
    }
}

/* ============================================
   Accesibilidad
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .core-cta-donation,
    .core-cta-donation::before,
    .core-cta-donation::after,
    .core-cta-donation-title,
    .core-cta-donation-message,
    .core-cta-donation-button,
    .core-cta-donation-button .wp-block-button__link {
        animation: none !important;
        transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }
    
    .core-cta-donation {
        background: linear-gradient(135deg, #B7272F 0%, #41ADCD 100%) !important;
        background-size: 100% 100% !important;
    }
    
    .core-cta-donation-button .wp-block-button__link:hover {
        transform: translateY(-2px);
    }
}

/* Focus states para accesibilidad */
.core-cta-donation-button .wp-block-button__link:focus {
    outline: 3px solid rgba(183, 39, 47, 0.5);
    outline-offset: 3px;
}

/* ============================================
   Efectos Adicionales
   ============================================ */
/* Partículas decorativas adicionales */
.core-cta-donation .wp-block-group.has-white-background-color::before {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.1;
    animation: sparkle 3s ease-in-out infinite;
    pointer-events: none;
}

.core-cta-donation .wp-block-group.has-white-background-color::after {
    content: '💝';
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 1.5rem;
    opacity: 0.1;
    animation: sparkle 3s ease-in-out infinite 1.5s;
    pointer-events: none;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.2) rotate(180deg);
    }
}
