/* =========================================================================
   EVENTS PAGE — Redesign CSS
   Light cinematic hero + Asymmetric editorial event cards
   ========================================================================= */

/* =========================================================================
   HERO — Light Cinematic Showcase
   ========================================================================= */
.events-hero-wrap {
    background: linear-gradient(160deg, #f5f9ff 0%, #eef4ff 40%, #f7faff 100%);
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.events-hero-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    opacity: 0.35;
    pointer-events: none;
    z-index: 1;
}

/* Ambient glow orbs */
.events-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(130px);
}

.events-orb.orb-1 {
    width: 600px; height: 600px;
    top: -150px; left: -100px;
    background: rgba(37, 99, 235, 0.1);
}

.events-orb.orb-2 {
    width: 500px; height: 500px;
    bottom: -200px; right: -50px;
    background: rgba(99, 102, 241, 0.08);
}

/* Giant background watermark */
.events-watermark {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.75);
    font-family: 'Outfit', sans-serif;
    font-size: clamp(4rem, 12vw, 15rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.09em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #0f172a 30%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 2s cubic-bezier(0.16, 1, 0.3, 1),
                letter-spacing 2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, letter-spacing;
    z-index: 2;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}

.events-hero-wrap.is-active .events-watermark {
    opacity: 0.04;
    letter-spacing: 0.05em;
    transform: translate(-50%, -50%) scale(1);
}

.events-hero-inner {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.events-hero-content {
    padding-right: 30px;
}

.events-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.events-eyebrow-line {
    width: 40px; height: 1px;
    background: #2563eb;
}

.events-eyebrow-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: #2563eb;
    text-transform: uppercase;
}

.events-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.8rem, 5.5vw, 5.2rem);
    font-weight: 900;
    color: #0f172a;
    line-height: 1.05;
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

.events-hero-title .accent {
    display: block;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    color: #2563eb;
    font-size: 0.85em;
}

.events-hero-desc {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.7;
    max-width: 500px;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Event stats list */
.events-hero-metrics {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.events-metric-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 18px 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 140px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.events-metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px -8px rgba(37, 99, 235, 0.16), 0 0 0 1px rgba(37, 99, 235, 0.25);
    border-color: rgba(37, 99, 235, 0.35);
}

.events-metric-card .metric-card-val {
    font-family: 'Outfit', sans-serif;
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.events-metric-card .metric-card-lbl {
    font-size: 0.72rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Right side decorative elements */
.events-hero-gfx {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.events-gfx-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.03);
    max-width: 380px;
    position: relative;
    z-index: 5;
    transform: rotate(2deg);
}

.events-gfx-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid #2563eb;
    transform: translate(-10px, 10px) rotate(-4deg);
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.events-hero-gfx:hover .events-gfx-card::before {
    transform: translate(-6px, 6px) rotate(-2deg);
}

.gfx-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.gfx-icon {
    width: 44px; height: 44px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.gfx-header h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.gfx-body p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Animations */
.reveal-slide-up {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-gfx {
    opacity: 0;
    transform: scale(0.92) rotate(-2deg);
    transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.events-hero-wrap.is-active .reveal-slide-up,
.events-hero-wrap.is-active .reveal-gfx {
    opacity: 1;
    transform: translate(0) scale(1) rotate(2deg);
}

.events-hero-wrap.is-active .reveal-gfx {
    transform: scale(1) rotate(2deg);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
.delay-4 { transition-delay: 0.48s; }

/* Scroll Hint */
.events-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-hint-bar {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, #94a3b8, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.3); }
}

/* =========================================================================
   BODY — Events Editorial Grid Section
   ========================================================================= */
.events-body-section {
    background: #ffffff;
    padding: clamp(60px, 7vw, 120px) 0;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.events-editorial-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    padding: 0 10px;
}

.events-editorial-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.events-editorial-number {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.12em;
}

.events-editorial-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    max-width: 360px;
    line-height: 1.5;
}

.events-editorial-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.2rem, 4vw, 4rem);
    font-weight: 900;
    color: #0f172a;
    line-height: 1.05;
    text-align: right;
}

/* Results Count */
.events-count-bar {
    padding: 0 10px;
    margin-bottom: 30px;
}

.events-results-lbl {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.events-results-lbl strong {
    color: #0f172a;
}

/* Asymmetric Editorial Grid */
.events-editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(16px, 2vw, 28px);
    padding: 0 10px;
    min-height: 500px;
    transition: opacity 0.3s ease;
}

/* Flat Row Styling */
.events-grid-card {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(25px);
    padding: 48px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.events-grid-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.events-grid-card:hover {
    transform: none;
    box-shadow: none;
}

/* Image */
.events-card-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.events-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.events-grid-card:hover .events-card-img-wrap img {
    transform: scale(1.03);
}

/* Date overlay badge */
.events-card-date-badge {
    position: absolute;
    top: 20px; left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 10px 16px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    z-index: 5;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.events-grid-card:hover .events-card-date-badge {
    transform: scale(1.05);
}

.events-card-date-badge .badge-day {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
}

.events-card-date-badge .badge-month {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Event Status Badge */
.events-status {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 30px;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.events-status.upcoming {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.events-status.concluded {
    background: rgba(148, 163, 184, 0.08);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

/* Link Arrow */
.events-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    transition: all 0.3s ease;
    text-decoration: none;
}

.events-card-link svg {
    transition: transform 0.3s ease;
}

.events-grid-card:hover .events-card-link {
    color: #2563eb;
}

.events-grid-card:hover .events-card-link svg {
    transform: translateX(4px);
}

/* Card Content */
.events-card-body {
    padding: clamp(20px, 3vw, 32px);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.events-card-loc {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.events-card-loc svg {
    flex-shrink: 0;
}

.events-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.events-grid-card:hover .events-card-title {
    color: #2563eb;
}

.events-card-desc {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Placement rules — Horizontal Alternating Split */
.events-editorial-grid > * {
    grid-column: span 12 !important;
    flex-direction: row !important;
}

/* Alternate directions */
.events-editorial-grid > :nth-child(even) {
    flex-direction: row-reverse !important;
}

.events-editorial-grid > * .events-card-img-wrap {
    width: 45%;
    min-height: 350px;
}

.events-editorial-grid > * .events-card-body {
    width: 55%;
    padding: clamp(24px, 4vw, 48px);
    justify-content: center;
}

/* Keep long description readable on horizontal splits */
.events-editorial-grid > * .events-card-desc {
    -webkit-line-clamp: 4;
}

/* Load More Section */
.events-load-wrap {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.events-load-btn {
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 40px;
    padding: 16px 40px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Outfit', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.events-load-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.events-load-btn:active {
    transform: translateY(0);
}

.events-load-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.events-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: btnSpin 0.8s ease-in-out infinite;
    display: none;
}

.events-load-btn.loading .events-spinner {
    display: inline-block;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* Floating Back to Top */
.events-top-btn {
    position: fixed;
    bottom: 30px;
    right: -60px;
    width: 48px;
    height: 48px;
    background: #0f172a;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    z-index: 999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.events-top-btn.show {
    right: 30px;
    opacity: 1;
}

.events-top-btn:hover {
    background: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

.events-top-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.events-top-btn:hover svg {
    transform: translateY(-2px);
}

/* Empty State */
.events-empty-box {
    grid-column: 1/-1;
    text-align: center;
    padding: 80px 0;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.events-empty-icon {
    font-size: 4rem;
    color: #e2e8f0;
    margin-bottom: 20px;
}

.events-empty-box h3 {
    font-family: 'Outfit', sans-serif;
    color: #0f172a;
    font-weight: 800;
}

.events-empty-box p {
    color: #64748b;
}

/* =========================================================================
   Responsive Overrides
   ========================================================================= */
@media (max-width: 1024px) {
    .events-hero-inner {
        grid-template-columns: 1fr;
        gap: 45px;
    }
    .events-hero-gfx {
        display: none; /* Hide illustrative card on smaller viewports */
    }
    .events-hero-wrap {
        min-height: auto;
        padding: 140px 0 60px;
    }
    .events-editorial-grid > * {
        flex-direction: column !important;
    }
    .events-editorial-grid > :nth-child(even) {
        flex-direction: column !important;
    }
    .events-editorial-grid > * .events-card-img-wrap {
        width: 100% !important;
        min-height: 250px !important;
    }
    .events-editorial-grid > * .events-card-body {
        width: 100% !important;
        padding: 24px !important;
    }
}

@media (max-width: 768px) {
    .events-hero-wrap { padding: 120px 0 50px; }
    .events-hero-title { font-size: 2.5rem; }
    .events-hero-metrics { gap: 30px; }
    .metric-card-val { font-size: 1.6rem; }
    .events-scroll-hint { display: none; }
    .events-editorial-header { flex-direction: column; gap: 16px; }
    .events-editorial-title { text-align: left; font-size: 1.8rem; }
    .events-editorial-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .events-body-section { padding: 50px 0 60px; }
}
