/* Events Page Specific Styles - College Fest Vibe */

/* Animated background particles */
body {
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(37, 99, 235, 0.08) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
    animation: backgroundFlow 20s ease-in-out infinite;
}

@keyframes backgroundFlow {
    0%, 100% { opacity: 0.3; transform: scale(1) rotate(0deg); }
    33% { opacity: 0.5; transform: scale(1.1) rotate(2deg); }
    66% { opacity: 0.4; transform: scale(0.9) rotate(-1deg); }
}

/* Current Events Button Section */
.current-events-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    margin-top: 70px; /* Reduced to match smaller navbar */
    background: 
        linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(124, 58, 237, 0.15) 50%, rgba(37, 99, 235, 0.15) 100%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.click-instruction {
    margin-bottom: 15px;
    color: #6B7280;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* SPECTACULAR FESTS HEADING */
.fests-heading {
    margin-top: 30px;
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    position: relative;
    padding: 20px 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(45deg, #0066FF, #2563EB, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Current Events Button */
.current-events-btn {
    background: linear-gradient(135deg, #0066FF, #3399FF, #7C3AED, #9F7AEA);
    background-size: 300% 300%;
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 25px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 
        0 15px 35px -5px rgba(0, 102, 255, 0.4),
        0 10px 20px -5px rgba(124, 58, 237, 0.3),
        inset 0 -3px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: buttonGradient 3s ease-in-out infinite;
}

@keyframes buttonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.current-events-btn::after {
    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.6s;
}

.current-events-btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 25px 50px -10px rgba(0, 102, 255, 0.6),
        0 15px 30px -5px rgba(124, 58, 237, 0.4),
        inset 0 -4px 0 rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.current-events-btn:hover::after {
    left: 100%;
}

.current-events-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* Events Container */
.events-container {
    max-width: 1200px;
    margin: 20px auto 0 auto;
    padding: 0 20px 60px 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Center the last card if it's alone in its row */
.event-card:nth-child(5) {
    grid-column: 1 / -1; /* Span across both columns */
    max-width: 570px; /* Maintain original card width */
    margin: 0 auto; /* Center the card */
}

/* Event Card Styling - College Fest Vibes */
.event-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 10px 30px rgba(255, 107, 53, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    margin-bottom: 0; /* Remove margin since we're using grid gap */
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #FF6B35, #FF8E53, #2563EB, #4F46E5, #7C3AED, #9F7AEA);
    transition: all 0.24s ease;
}

.event-card:hover::before {
    left: 0;
    animation: colorWave 2s ease-in-out infinite;
}

@keyframes colorWave {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.event-card:hover {
    transform: translateY(-6px) scale(1.008);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.06),
        0 6px 16px rgba(255, 107, 53, 0.08),
        0 2px 8px rgba(124, 58, 237, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

/* Event Image */
.event-image {
    width: 100%;
    height: 300px; /* Reduced height for grid layout */
    object-fit: cover;
    display: block;
    transition: all 0.2s ease;
    position: relative;
}

.event-card:hover .event-image {
    filter: brightness(1.04) saturate(1.08);
    transform: scale(1.02);
}

/* No Image Placeholder */
.no-image-placeholder {
    width: 100%;
    height: 300px; /* Match the reduced height */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    transition: all 0.3s ease;
}

.no-image-placeholder:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #94a3b8;
}

.no-image-message {
    text-align: center;
    padding: 2rem;
    max-width: 350px;
}

.no-image-message p {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

.no-image-message i {
    display: block;
    margin-bottom: 1rem;
}

/* Event Content */
.event-content {
    padding: 30px;
    position: relative;
}

/* SPECTACULAR EVENT TITLES */
.event-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 25px;
    font-family: 'Anton', sans-serif;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px 0;
}

/* Blitzschlag - Cultural Fest (Orange/Red theme) */
.event-card:nth-child(1) .event-title {
    background: linear-gradient(135deg, #FF6B35, #FF8E53, #E53E3E, #FF6B35);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sphinx - Technical Fest (Blue theme) */
.event-card:nth-child(2) .event-title {
    background: linear-gradient(135deg, #2563EB, #3B82F6, #1E40AF, #2563EB);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Malaviya Sports (Green theme) */
.event-card:nth-child(3) .event-title {
    background: linear-gradient(135deg, #059669, #10B981, #047857, #059669);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Department Days (Purple theme) */
.event-card:nth-child(4) .event-title {
    background: linear-gradient(135deg, #7C3AED, #9F7AEA, #6D28D9, #7C3AED);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mini Events (Red theme) */
.event-card:nth-child(5) .event-title {
    background: linear-gradient(135deg, #DC2626, #EF4444, #B91C1C, #DC2626);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dynamic hover effects on titles */
.event-title:hover {
    transform: translateY(-0.8px) scale(1.008);
}

/* Confetti effect on title click */
.event-title::after {
    content: '🎉✨🎊⭐🎉✨🎊⭐';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    opacity: 0;
    animation: confettiFall 2s ease-out;
    pointer-events: none;
}

@keyframes confettiFall {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0px); }
    100% { opacity: 0; transform: translateX(-50%) translateY(40px); }
}

.event-title:active::after {
    animation: confettiFall 0.8s ease-out;
}

.event-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #4a5568;
    text-align: justify;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    padding: 20px 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 252, 0.9));
    border-radius: 15px;
    padding: 25px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

/* Dynamic border colors matching the title themes */
.event-card:nth-child(1) .event-description {
    border-left-color: #FF6B35;
}
.event-card:nth-child(2) .event-description {
    border-left-color: #2563EB;
}
.event-card:nth-child(3) .event-description {
    border-left-color: #059669;
}
.event-card:nth-child(4) .event-description {
    border-left-color: #7C3AED;
}
.event-card:nth-child(5) .event-description {
    border-left-color: #DC2626;
}

.event-description:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 1));
    transform: translateX(2px);
}

/* Responsive Design - Maintaining Fest Vibes */
@media (max-width: 1200px) {
    .events-container {
        max-width: 1000px;
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .events-container {
        padding: 0 15px 60px 15px;
        grid-template-columns: 1fr; /* Single column on tablets and below */
        gap: 25px;
    }
    
    /* Reset the centering for smaller screens */
    .event-card:nth-child(5) {
        grid-column: 1; /* Reset to single column */
        max-width: none; /* Reset max-width */
        margin: 0; /* Reset margin */
    }
    
    .event-card {
        margin-bottom: 15px; /* Add some margin back for smaller screens */
    }
    
    .event-image {
        height: 350px; /* Intermediate height for tablets */
    }
    
    .no-image-placeholder {
        height: 350px;
    }
    
    .fests-heading {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .event-title {
        font-size: 2.2rem;
        letter-spacing: 1.5px;
    }
    
    .event-description {
        font-size: 1.05rem;
    }
}

@media (max-width: 768px) {
    .current-events-section {
        padding: 40px 15px;
        margin-top: 65px; /* Further reduced to match smaller navbar */
    }
    
    .current-events-btn {
        font-size: 1.2rem;
        padding: 15px 25px;
        letter-spacing: 1.5px;
    }
    
    .click-instruction {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .fests-heading {
        margin-top: 25px;
        font-size: 2rem;
        padding: 15px 0;
        letter-spacing: 2px;
    }
    
    .fests-heading::after {
        width: 150px;
        height: 5px;
    }
    
    .events-container {
        padding: 0 10px 40px 10px;
        grid-template-columns: 1fr; /* Ensure single column on mobile */
        gap: 20px;
    }
    
    /* Reset centering for mobile */
    .event-card:nth-child(5) {
        grid-column: 1;
        max-width: none;
        margin: 0;
    }
    
    .event-card {
        margin-bottom: 15px;
        border-radius: 20px;
    }
    
    .event-image {
        height: 250px;
    }
    
    .no-image-placeholder {
        height: 250px; /* Match mobile image height */
    }
    
    .event-content {
        padding: 25px 20px;
    }
    
    .event-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }
    
    .event-description {
        font-size: 1rem;
        line-height: 1.7;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    /* Simplified but still festive for small screens */
    body::before {
        animation-duration: 15s;
    }
    
    .current-events-section {
        padding: 30px 10px;
        margin-top: 60px;
    }
    
    .current-events-btn {
        font-size: 1rem;
        padding: 12px 20px;
        letter-spacing: 1px;
    }
    
    .click-instruction {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .fests-heading {
        margin-top: 20px;
        font-size: 1.8rem;
        padding: 12px 0;
        letter-spacing: 1.5px;
    }
    
    .fests-heading::after {
        width: 120px;
        height: 4px;
    }
    
    .events-container {
        padding: 0 5px 30px 5px;
    }
    
    .event-card {
        margin-bottom: 25px;
        border-radius: 18px;
    }
    
    .event-image {
        height: 200px;
    }
    
    .event-content {
        padding: 20px 15px;
    }
    
    .event-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
        letter-spacing: 0.8px;
    }
    
    .event-title::after {
        font-size: 1rem;
        top: -25px;
    }
    
    .event-description {
        font-size: 0.95rem;
        line-height: 1.6;
        padding: 15px;
    }
}

/* Additional Premium Styling */
.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF6B35, #2563EB, #059669, #7C3AED, #DC2626);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-card:hover::before {
    opacity: 1;
}

.event-card {
    position: relative;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Typography improvements */
.event-title,
.event-description {
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
}

/* Focus states for accessibility */
.current-events-btn:focus,
.back-home-btn:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Loading animation for images */
.event-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive navbar margin adjustments for smaller screens */
@media (max-width: 768px) {
    .current-events-section {
        margin-top: 65px; /* Further reduced to match smaller navbar */
    }
}

@media (max-width: 640px) {
    .current-events-section {
        margin-top: 62px; /* Further reduced for medium-small screens */
    }
}

@media (max-width: 480px) {
    .current-events-section {
        margin-top: 58px; /* Most compact for very small screens */
    }
}
