/**
 * Enhanced Events Page Styles
 * Additional animations, transitions, and responsive enhancements
 */

/* ============================================
   SMOOTH SCROLL BEHAVIOR
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   LOADING STATES & SKELETON SCREENS
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    width: 100%;
    height: 24rem;
    border-radius: 0.75rem;
}

/* ============================================
   ENHANCED HOVER EFFECTS
   ============================================ */
.event-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(244, 130, 52, 0.1),
        rgba(22, 29, 93, 0.1)
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.event-card:hover::before {
    opacity: 1;
}

/* ============================================
   PARALLAX SCROLL EFFECT FOR HERO
   ============================================ */
.hero-banner {
    background-image: linear-gradient(135deg, #161d5d 0%, #27318b 100%);
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

/* ============================================
   SEARCH BOX ENHANCEMENTS
   ============================================ */
.search-box {
    position: relative;
    overflow: hidden;
}

.search-box::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--orange);
    transition: width 0.3s ease;
}

.search-box:focus-within::after {
    width: 100%;
}

/* ============================================
   CARD FLIP ANIMATION (OPTIONAL)
   ============================================ */
.event-card-flip {
    perspective: 1000px;
}

.event-card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.event-card-flip:hover .event-card-flip-inner {
    transform: rotateY(180deg);
}

.event-card-front,
.event-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.event-card-back {
    transform: rotateY(180deg);
}

/* ============================================
   FLOATING ANIMATION
   ============================================ */
@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   PULSE ANIMATION FOR BADGES
   ============================================ */
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.event-date-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   GRADIENT TEXT EFFECT
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, #f48234, #f88b40);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   GLASSMORPHISM EFFECTS
   ============================================ */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   RIPPLE EFFECT ON CLICK
   ============================================ */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   SHINE EFFECT ON HOVER
   ============================================ */
.shine {
    position: relative;
    overflow: hidden;
}

.shine::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;
}

.shine:hover::before {
    left: 100%;
}

/* ============================================
   ZOOM IN ON HOVER FOR IMAGES
   ============================================ */
.event-card .event-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card:hover .event-image {
    transform: scale(1.1);
}

/* ============================================
   MODAL/FILTER OVERLAY
   ============================================ */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

.filter-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filter-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   TOOLTIP STYLES
   ============================================ */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #171717;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #171717;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .hero-banner,
    .newsletter-section,
    .footer-section,
    .search-filter {
        display: none;
    }

    .event-card {
        page-break-inside: avoid;
    }
}

/* ============================================
   DARK MODE SUPPORT (OPTIONAL)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .events-container {
        background: #1a1a1a;
    }

    .event-card {
        background: #2a2a2a;
    }

    .search-box {
        background: #333;
        border-color: #444;
    }

    .search-input {
        color: white;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
.event-image {
    will-change: transform;
}

.event-card {
    will-change: transform, box-shadow;
}

/* ============================================
   MOBILE-FIRST RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 640px) {
    .section-title {
        font-size: 2rem;
        line-height: 2.5rem;
    }

    .newsletter-title {
        font-size: 2rem;
        line-height: 2.5rem;
    }

    .event-card {
        height: 20rem;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .events-container,
    .newsletter-section,
    .footer-section {
        max-width: 1728px;
        margin: 0 auto;
    }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
