/* Staggered animation for event cards */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Visible state - triggered by Intersection Observer */
.event-card.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Stagger delays for each card (up to 20 cards) */
.event-card:nth-child(1) { transition-delay: 0.05s; }
.event-card:nth-child(2) { transition-delay: 0.1s; }
.event-card:nth-child(3) { transition-delay: 0.15s; }
.event-card:nth-child(4) { transition-delay: 0.2s; }
.event-card:nth-child(5) { transition-delay: 0.25s; }
.event-card:nth-child(6) { transition-delay: 0.3s; }
.event-card:nth-child(7) { transition-delay: 0.35s; }
.event-card:nth-child(8) { transition-delay: 0.4s; }
.event-card:nth-child(9) { transition-delay: 0.45s; }
.event-card:nth-child(10) { transition-delay: 0.5s; }
.event-card:nth-child(11) { transition-delay: 0.55s; }
.event-card:nth-child(12) { transition-delay: 0.6s; }
.event-card:nth-child(13) { transition-delay: 0.65s; }
.event-card:nth-child(14) { transition-delay: 0.7s; }
.event-card:nth-child(15) { transition-delay: 0.75s; }
.event-card:nth-child(16) { transition-delay: 0.8s; }
.event-card:nth-child(17) { transition-delay: 0.85s; }
.event-card:nth-child(18) { transition-delay: 0.9s; }
.event-card:nth-child(19) { transition-delay: 0.95s; }
.event-card:nth-child(20) { transition-delay: 1.0s; }

/* Apply Cyberpunk Border Style to Event Cards */
.event-card {
    background: transparent;
    width: 280px;
    min-width: 280px;
    
    /* Start invisible - animation only triggers when 'visible' class is added */
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    flex: 0 0 280px;
    padding: 1px 1px;
    /*overflow: hidden;*/
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    margin: 0 15px;
    height: 100%;
    position: relative;
}

.event-card::before {
    content: "";
    position: absolute;
    background: var(--color-secondary);
    top: -10px; /* Moves the shape slightly up */
    left: -3px; /* Moves it slightly left */
    width: calc(100% + 7px); /* Expands it beyond the event card */
    height: calc(100% + 10px); /* Expands beyond the event card */
    
    clip-path: polygon(
        0px 25px,              /* Top left corner */
        26px 0px,              /* Top left diagonal */
        calc(57% - 15px) 0px,  /* Top line start */
        calc(63% - 15px) 4%,   /* Top notch */
        95% 4%,                /* Top line end */
        100% 8%,               /* Top right corner */
        100% calc(100% - 10px), /* Bottom right corner */
        calc(100% - 15px) calc(100% - 10px),   /* Bottom right notch */
        calc(80% - 10px)  calc(100% - 10px),   /* Bottom line start */
        calc(80% - 15px) calc(100% - 0px),     /* Bottom notch */
        10px  calc(100% - 0px), /* Bottom left corner */
        0% calc(100% - 10px)    /* Bottom line end */
     );
    z-index: -1; /* Moves it behind the event-card */
    padding-bottom: 10px;
}

.event-card::after {
    content: "";
    position: absolute;
    background: var(--card-background);
    top: -3px; /* Moves the shape slightly up */
    left: -3px; /* Moves it slightly left */
    width: calc(100% + 8px); /* Expands it beyond the event card */
    height: calc(100% + 7px); /* Expands beyond the event card */
    clip-path: polygon(
        0px 25px,              /* Top left corner */
        26px 0px,              /* Top left diagonal */
        calc(60% - 25px) 0px,  /* Top line */
        60% 25px,              /* Top right notch */
        100% 25px,             /* Top right corner */
        100% calc(100% - 10px), /* Bottom right corner */
        calc(100% - 15px) calc(100% - 10px),   /* Bottom right notch */
        calc(80% - 10px)  calc(100% - 10px),   /* Bottom line start */
        calc(80% - 15px) calc(100% - 0px),     /* Bottom notch */
        10px  calc(100% - 0px), /* Bottom left corner */
        0% calc(100% - 10px)    /* Bottom line end */
     );
    /*clip-path: polygon(0px 25px, 26px 0px, calc(60% - 15px) 0px, 60% 4%, 95% 4%, 100% 8%,  
                        100% calc(100% - 10px), calc(100% - 15px) calc(100% - 10px),   
                        calc(80% - 10px)  calc(100% - 10px), calc(80% - 15px) calc(100% - 0px),
                        10px  calc(100% - 0px), 0% calc(100% - 10px));*/
    z-index: -1; /* Moves it behind the event-card */
    /*box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    /*padding-bottom: 10px;*/
}

.card-wrapper {
    background: var(--card-background);
    position: relative;
    height: 360px;
    display: flex;
    flex-direction: column;
    clip-path: polygon(
        0px 25px,              /* Top left corner */
        26px 0px,              /* Top left diagonal */
        calc(60% - 25px) 0px,  /* Top line */
        60% 25px,              /* Top right notch */
        100% 25px,             /* Top right corner */
        100% calc(100% - 10px), /* Bottom right corner */
        calc(100% - 15px) calc(100% - 10px),   /* Bottom right notch */
        calc(80% - 10px)  calc(100% - 10px),   /* Bottom line start */
        calc(80% - 15px) calc(100% - 0px),     /* Bottom notch */
        10px  calc(100% - 0px), /* Bottom left corner */
        0% calc(100% - 10px)    /* Bottom line end */
     );
    /*outline: 4px solid red;
    outline-offset: -4px; */
    /*box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);*/
}

.card-wrapper a {
    text-decoration: none;
    color: inherit;
    height: 95%;
    display: flex;
    flex-direction: column;
}

.event-image {
    height: 180px;
    min-height: 180px;
}
.event-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 160px;
}

.event-details h3 {
    font-size: 1.2rem;
    color: var(--color-secondary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.4rem;
}

.event-details p {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin: 0;
    gap: 8px;
}

.event-details .event-date,
.event-details .event-time,
.event-details .event-location {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-date, .event-time, .event-location {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin: 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.4;
}

.event-date::before, .event-time::before, .event-location::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-size: contain;
}

.event-date::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"/></svg>') no-repeat center;
    filter: var(--icon-filter);
}

.event-time::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></svg>') no-repeat center;
    filter: var(--icon-filter);
}

.event-location::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></svg>') no-repeat center;
    filter: var(--icon-filter);
}

.gallery-container {
    position: relative;
    padding: 0;
}

.gallery-scroll {
    display: flex;
    gap: 0rem;
    overflow-x: auto;
    padding: 1rem 0 2rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-secondary) #f0f0f0;
    cursor: grab;
    user-select: none;
    align-items: stretch;
}

.gallery-scroll.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.gallery-scroll::-webkit-scrollbar {
    height: 8px;
}

.gallery-scroll::-webkit-scrollbar-track {
    background: var(--input-background);
    border-radius: 4px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 4px;
}

.gallery-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary-light);
}

.swiper-container, .swiper-wrapper, .swiper-slide {
    display: none;
}

/* Category title styles */
.category-title {
    position: relative;
    padding: 15px 25px;
    margin: 3rem 0 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    background: linear-gradient(90deg, var(--color-quaternary), var(--color-secondary-light), var(--color-quaternary));
    border-top: 1px solid var(--color-primary);
    border-bottom: 1px solid var(--color-primary);
    clip-path: polygon(
        0 5px,
        3% 0px,       
        100% 0px,
        100% 100%,
        0 100%,
        0 5px
    );
}

.category-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--color-primary-light), transparent);
    animation: categoryTitleScanline 3s linear infinite;
    z-index: 0;
}

.category-title::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    background: transparent;
    border: 1px solid var(--color-primary);
    clip-path: polygon(
        0 0,
        22px 0,
        42px 15px,
        calc(100% - 42px) 15px,
        calc(100% - 22px) 0,
        100% 0,
        100% calc(100% - 0px),
        calc(100% - 22px) calc(100% - 0px),
        calc(100% - 42px) calc(100% - 15px),
        42px calc(100% - 15px),
        22px calc(100% - 0px),
        0 calc(100% - 0px)
    );
    z-index: -1;
}

.category-title h2 {
    color: var(--color-primary);
    font-size: 1.8rem;
    font-weight: 500;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 5px var(--shadow-color);
    letter-spacing: 1px;
    margin: 0;
    z-index: 1;
}

.category-title .arrow-buttons {
    margin-left: auto;
    z-index: 1;
}

@keyframes categoryTitleScanline {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* See all card styles */
.see-all-card {
    width: 280px;
    min-width: 280px;
    flex: 0 0 280px;
    border: 2px dashed var(--color-secondary);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.see-all-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.see-all-button {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-secondary);
    padding: 20px;
}

.see-all-content {
    text-align: center;
}

.see-all-text {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.events-count {
    font-size: 0.9rem;
    color: var(--text-color-light);
}

/* Event Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.carousel-container {
    padding: 10px 0;
}

.carousel-hidden {
    opacity: 0;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    position: absolute;
    visibility: hidden;
}

.carousel-visible {
    opacity: 1;
    height: auto;
    margin: 20px 0;
    transition: all 0.5s ease-in-out;
    position: relative;
    visibility: visible;
}

/* Load More Button - Moved to load-more.css for better organization */
/* Circular button styles removed to avoid conflicts with cyberpunk design */

.load-more-btn.hidden {
    display: none;
}

.arrow-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.arrow-btn {
    background-color: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.arrow-btn:hover {
    background-color: var(--color-secondary-light);
}

.user-section button {
    background-color: var(--color-secondary);
    color: var(--text-color);
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Dark mode specific styles */
[data-theme="dark"] .event-card::after {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .card-wrapper {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .event-details h3 {
    color: var(--color-primary);
}

[data-theme="dark"] .event-date,
[data-theme="dark"] .event-location,
[data-theme="dark"] .info-item {
    color: var(--text-color-light);
}

[data-theme="dark"] .category-tag {
    background: var(--input-background);
    color: var(--text-color-light);
}

[data-theme="dark"] .see-all-card {
    border-color: var(--color-primary);
}

[data-theme="dark"] .see-all-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .see-all-button {
    color: var(--color-primary);
}

[data-theme="dark"] .events-count {
    color: var(--text-color-light);
}
