/* ============================================
   EVENTS SECTION WITH ENHANCED ANIMATIONS
   ============================================ */

.events-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #e6f0ff 0%, #d1e8ff 100%);
    position: relative;
    overflow: hidden;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.event-card {
    height: 400px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: all 0.5s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(26, 35, 126, 0.2);
}

.event-card-inner {
    height: 100%;
}

.event-front, .event-back {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 30px;
}

.event-front {
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
}

.event-back {
    background: linear-gradient(135deg, #a4c288 0%, #bbdb7f 100%);
    color: var(--white);
}

/* Enhanced Icon with Animations */
.event-icon {
    position: relative;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    animation: iconFloat 4s ease-in-out infinite;
}

.event-icon i {
    font-size: 3rem;
    color: var(--white);
    position: relative;
    z-index: 2;
}

.icon-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.icon-sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: sparkle 2s infinite;
}

.icon-sparkle:nth-child(3) { top: 10px; left: 20px; animation-delay: 0s; }
.icon-sparkle:nth-child(4) { top: 20px; right: 15px; animation-delay: 0.5s; }
.icon-sparkle:nth-child(5) { bottom: 15px; left: 30px; animation-delay: 1s; }

/* Animated Text */
.animated-text {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--heading-color);
    position: relative;
    display: inline-block;
    animation: textGlow 3s infinite alternate;
}

.event-content h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    animation: lineExpand 3s infinite;
}

/* Event Meta with Pulse Animation */
.event-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--gray);
    font-size: 0.95rem;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.pulse {
    animation: pulseIcon 2s infinite;
}

/* Floating Badge */
.floating-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
    margin-top: 20px;
    animation: floatUpDown 3s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(255, 64, 129, 0.3);
}

/* Back Side Details */
.event-details {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.event-details h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--white);
    animation: fadeIn 0.8s ease;
}

.event-details .event-meta {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

.event-details .event-meta i {
    color: var(--accent-light);
}

.slide-in {
    margin-bottom: 25px;
    line-height: 1.6;
    opacity: 0.9;
    flex: 1;
    animation: slideInLeft 0.8s ease;
}

.event-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    animation: shine 3s infinite linear;
    z-index: 1;
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    border-radius: 24px;
    transition: opacity 0.5s ease;
    z-index: -1;
    filter: blur(20px);
}

.event-card:hover .card-glow {
    opacity: 0.3;
}

/* Background Animations */
.events-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bg-circle, .bg-square {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: floatBackground 25s infinite linear;
}

.bg-circle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-square {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    border-radius: 20px;
}

.circle-1 { width: 200px; height: 200px; top: 10%; left: 5%; animation-delay: 0s; }
.circle-2 { width: 150px; height: 150px; bottom: 20%; right: 10%; animation-delay: 8s; }
.circle-3 { width: 100px; height: 100px; top: 40%; right: 20%; animation-delay: 16s; }
.square-1 { width: 180px; height: 180px; top: 60%; left: 10%; animation-delay: 4s; }
.square-2 { width: 120px; height: 120px; top: 20%; right: 15%; animation-delay: 12s; }

.bg-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: particleFloat 20s infinite linear;
}

.particle-1 { top: 30%; left: 15%; animation-delay: 0s; }
.particle-2 { top: 60%; left: 85%; animation-delay: 5s; }
.particle-3 { top: 80%; left: 25%; animation-delay: 10s; }
.particle-4 { top: 40%; left: 70%; animation-delay: 15s; }
.particle-5 { top: 20%; left: 40%; animation-delay: 20s; }

/* ============================================
   NEW ANIMATIONS
   ============================================ */

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    }
    100% {
        text-shadow: 0 0 20px rgba(102, 126, 234, 0.6),
                     0 0 30px rgba(102, 126, 234, 0.3);
    }
}

@keyframes lineExpand {
    0%, 100% {
        width: 60px;
    }
    50% {
        width: 100px;
    }
}

@keyframes pulseIcon {
    0%, 100% {
        transform: scale(1);
        color: var(--primary);
    }
    50% {
        transform: scale(1.2);
        color: var(--accent);
    }
}

@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatBackground {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(40px, -40px) rotate(90deg);
    }
    50% {
        transform: translate(0, 80px) rotate(180deg);
    }
    75% {
        transform: translate(-40px, 40px) rotate(270deg);
    }
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.2;
    }
    25% {
        transform: translate(100px, -50px);
        opacity: 0.5;
    }
    50% {
        transform: translate(50px, 100px);
        opacity: 0.8;
    }
    75% {
        transform: translate(-100px, 50px);
        opacity: 0.5;
    }
}