/* ===================================================================
   BROMATRIX - OUR EVENTS SHOWCASE
   Transparent Glass Effect & Animations (Reference Edition)
   ThreeUI <PredictiveArcCanvas /> + ThreeUI <LiquidMetalButton variant="circle" />
   =================================================================== */

/* Page Viewport & Canvas Background (Dark Theme) */
.events-page-wrapper {
    position: relative;
    min-height: 100vh;
    background: #020204;
    color: var(--text-silver);
    overflow-x: hidden;
}

/* ThreeUI Ribbon Field Canvas Background Viewport (Dark Theme) */
.events-canvas-viewport {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    background: #020204;
}

.events-canvas-viewport .threeui-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    background: #020204;
}

.events-canvas-viewport canvas,
#predictive-arc-canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Ambient Fluid Pools disabled for clean dark theme with zero background glow */
.ambient-fluid-pool {
    display: none !important;
}

.events-ambient-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(circle at 50% 30%, transparent 25%, rgba(2, 2, 4, 0.55) 65%, rgba(2, 2, 4, 0.95) 100%);
}

/* Main Content Surface */
.events-main-content {
    position: relative;
    z-index: 10;
    padding-top: 6.5rem;
    padding-bottom: 3.5rem;
}

/* Header Section */
.events-section-header {
    text-align: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 3rem;
    padding: 0;
    animation: headerFadeIn 0.8s var(--ease-apple) forwards;
}

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

.events-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1.15rem;
    border-radius: var(--radius-pill);
    background: rgba(14, 14, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #e4e4e7;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.events-pill-tag .tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: none;
}

.events-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin-bottom: 1rem;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* ThreeUI <TextAnimationCollection variant="threeui-intro" /> Shader Frame - FULL VIEWPORT WIDTH (NO VERTICAL SEAMS) */
.events-intro-shader-frame {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 480px;
    margin-top: 0;
    margin-bottom: 0.75rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .events-intro-shader-frame {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .events-intro-shader-frame {
        height: 200px;
    }
}

.neuform-isolated {
    position: relative;
    width: 100%;
    height: 100%;
}

.neuform-isolated__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none !important;
    outline: none !important;
    background: transparent !important;
}

.events-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.65;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===================================================================
   REFERENCE CARD GRID & TRANSPARENT FROSTED GLASS CARDS
   (Exact Match to User Reference Images)
   =================================================================== */

.events-reference-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    scroll-margin-top: 7rem;
}

@media (max-width: 1080px) {
    .events-reference-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .events-reference-grid {
        grid-template-columns: 1fr;
    }
}

/* Reference Card with Transparent Glass Effect */
.ref-event-card {
    position: relative;
    border-radius: 28px;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.75rem;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: #ffffff;

    /* Frosted Dark Glassmorphism */
    background: rgba(10, 10, 16, 0.65);
    backdrop-filter: blur(36px) saturate(160%);
    -webkit-backdrop-filter: blur(36px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), inset 0 1px 1px rgba(255, 255, 255, 0.18);

    /* Animation Transitions */
    opacity: 0;
    transform: translateY(30px);
    animation: cardEntrance 0.75s var(--ease-spring) forwards;
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Staggered card entrance */
.ref-event-card:nth-child(1) { animation-delay: 0.15s; }
.ref-event-card:nth-child(2) { animation-delay: 0.30s; }
.ref-event-card:nth-child(3) { animation-delay: 0.45s; }

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ref-event-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.85), inset 0 1.5px 1.5px rgba(255, 255, 255, 0.35);
}

/* Card Background Image with Smooth Zoom on Hover */
.ref-card-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.7s var(--ease-apple), filter 0.7s ease;
    filter: brightness(0.65) contrast(1.1);
}

.ref-event-card:hover .ref-card-bg-image {
    transform: scale(1.08);
    filter: brightness(0.75) contrast(1.15);
}

/* Transparent Gradient Overlays for High Legibility */
.ref-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(8, 8, 12, 0.45) 0%,
        rgba(8, 8, 12, 0.15) 35%,
        rgba(8, 8, 12, 0.75) 70%,
        rgba(8, 8, 12, 0.94) 100%
    );
    pointer-events: none;
    transition: background 0.4s ease;
}

.ref-event-card:hover .ref-card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(8, 8, 12, 0.35) 0%,
        rgba(8, 8, 12, 0.08) 35%,
        rgba(8, 8, 12, 0.68) 70%,
        rgba(8, 8, 12, 0.92) 100%
    );
}

/* Card Top Section (Pill Tag matching "Sport center" / "Power zone") */
.ref-card-top {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ref-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1.05rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.ref-event-card:hover .ref-card-tag {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Card Bottom Section (Title, Subtitle, Liquid Metal Orb Button) */
.ref-card-bottom {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem;
}

.ref-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ref-card-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.45rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    transition: color 0.3s ease;
}

.ref-event-card:hover .ref-card-title {
    color: #ffffff;
}

.ref-card-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.45;
    letter-spacing: -0.01em;
}

/* ThreeUI <LiquidMetalButton variant="circle" /> Orb Host */
.ref-card-orb-host {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.4), 0 4px 14px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: #070708;
    flex-shrink: 0;
    transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease, border-color 0.35s ease;
}

.ref-event-card:hover .ref-card-orb-host {
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(192, 132, 252, 0.7), 0 6px 20px rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.7);
}

.ref-card-orb-host .liquid-metal-button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ref-card-orb-host .liquid-metal-button__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===================================================================
   EVENT DETAIL MODAL
   =================================================================== */
.event-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-smooth), visibility 0.3s ease;
}

.event-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.event-modal-window {
    position: relative;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    background: #0b0b10;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.9), 0 0 50px rgba(147, 51, 234, 0.25);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s var(--ease-spring);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.event-modal-backdrop.active .event-modal-window {
    transform: translateY(0) scale(1);
}

.event-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.event-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.event-modal-media-banner {
    position: relative;
    width: 100%;
    height: 320px;
    background: #08080c;
}

.event-modal-media-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-modal-media-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0b0b10 0%, rgba(11, 11, 16, 0.35) 60%, transparent 100%);
}

.event-modal-content {
    padding: 2rem 2.25rem 2.25rem;
    position: relative;
    z-index: 2;
    margin-top: -3rem;
}

.event-modal-header {
    margin-bottom: 1.25rem;
}

.event-modal-tag-chip {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.65rem;
}

.event-modal-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.2vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

.event-modal-body-text {
    color: #e4e4e7;
    font-size: 0.98rem;
    line-height: 1.75;
    margin: 1.25rem 0 1.75rem;
}

.event-modal-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.event-modal-gallery img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.event-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

/* ===================================================================
   EVENTS FOOTER (FROSTED GLASS & SEAMLESS CANVAS CONTINUATION)
   =================================================================== */
.events-footer {
    position: relative;
    z-index: 10;
    background: rgba(4, 4, 8, 0.72) !important;
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 3.5rem 1.5rem 2.5rem !important;
}

.events-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
    .events-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 580px) {
    .events-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ===================================================================
   MOBILE LAYOUT — EVENTS PAGE
   =================================================================== */

/* Events main content top padding (below fixed header) */
@media (max-width: 768px) {
    .events-main-content { padding-top: 5rem; padding-bottom: 2.5rem; }

    /* Header */
    .events-section-header { margin-bottom: 2rem; }
    .events-pill-tag { font-size: 0.68rem; padding: 0.35rem 0.9rem; }
    .events-title { font-size: clamp(1.9rem, 6.5vw, 2.8rem); }
    .events-subtitle { font-size: 0.92rem; padding: 0 1rem; }

    /* Cards — reduce from 520px min-height */
    .events-reference-grid { padding: 0 1rem; gap: 1.25rem; }
    .ref-event-card { min-height: 380px; padding: 1.25rem; border-radius: 20px; }
    .ref-event-card:hover { transform: translateY(-4px) scale(1.01); }

    .ref-card-title { font-size: clamp(1.15rem, 4vw, 1.45rem); }
    .ref-card-desc { font-size: 0.82rem; }
    .ref-card-orb-host { width: 46px; height: 46px; }

    /* Event modal */
    .event-modal-backdrop { padding: 0.75rem; align-items: flex-end; }
    .event-modal-window {
        border-radius: 24px 24px 0 0;
        max-height: 94vh;
        max-width: 100%;
    }
    .event-modal-media-banner { height: 220px; }
    .event-modal-content { padding: 1.5rem 1.25rem 1.75rem; }
    .event-modal-title { font-size: clamp(1.45rem, 5vw, 1.85rem); }
    .event-modal-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .event-modal-gallery img { height: 90px; }
    .event-modal-footer { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .event-modal-footer > * { width: 100%; justify-content: center; }

    /* Footer */
    .events-footer { padding: 2.5rem 1rem 2rem !important; }
}

@media (max-width: 480px) {
    .ref-event-card { min-height: 320px; padding: 1rem; border-radius: 18px; }
    .events-reference-grid { padding: 0 0.75rem; gap: 1rem; }
    .event-modal-gallery { grid-template-columns: 1fr; }
    .event-modal-gallery img { height: 120px; }
}

.events-footer .footer-col {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

.events-footer .brand-link,
.events-footer .footer-col .brand-link {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    margin-bottom: 1.25rem !important;
    left: auto !important;
}

.events-footer .footer-logo {
    height: 38px !important;
    width: auto !important;
    display: block !important;
}

.events-footer .footer-bottom {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}
