/* Hero banner – full background image with overlay */
.hero-banner {
    position: relative;
    background: url('https://test.icrystal.asia/assets/images/news/IMG_3203.png') no-repeat center center/cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 10%;
}

/* Content wrapper */
.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.badge {
    display: inline-block;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 24px;
    border-radius: 40px;
    transition: transform 0.2s;
    margin-top: 8px;
}

.badge:hover {
    transform: translateY(-2px);
}

/* fade & slide animation (JS triggered) */
.animate-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.8s ease;
}
.animate-item.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ----- RESPONSIVE (mobile) ----- */
@media (max-width: 768px) {
    .hero-banner {
        padding: 60px 6%;
        min-height: 80vh;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
}

/* -------- CARD CONTAINER (1280px max-width) -------- */
.event-card {
    position: relative;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 50px auto;
    min-height: 520px;
    border-radius: 40px;
    overflow: visible;
    background: transparent;
}

/* -------- SWIPER CONTAINER (card body with notch) -------- */
.event-card .card-swiper {
    position: relative;
    width: 100%;
    min-height: 520px;
    border-radius: 40px 40px 0 0;
    overflow: hidden;
    /* Smooth notch at bottom center */
    -webkit-mask-image: radial-gradient(ellipse at 50% 100%, transparent 48px, black 49px, black 100%);
    mask-image: radial-gradient(ellipse at 50% 100%, transparent 48px, black 49px, black 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.event-card .card-swiper .swiper-wrapper {
    height: 100%;
}

.event-card .card-swiper .swiper-slide {
    position: relative;
    height: 100%;
    min-height: 520px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 40px;
}

/* Dark gradient overlay on each slide */
.event-card .card-swiper .swiper-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(135deg,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.35) 40%,
            rgba(0, 0, 0, 0.70) 80%,
            rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
    z-index: 1;
}

/* -------- BADGE (top-left) -------- */
.event-card .badge {
    position: absolute;
    top: 32px;
    left: 32px;
    z-index: 3;
    background: var(--color-blue);
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 10px 26px;
    border-radius: 50px;
    box-shadow: 0 6px 18px rgba(20, 23, 53, 0.35);
    text-transform: uppercase;
    user-select: none;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* -------- CONTENT (bottom-left) -------- */
.event-card .card-content {
    position: absolute;
    bottom: 80px;
    left: 40px;
    right: 40px;
    z-index: 3;
    color: var(--color-white);
    max-width: 70%;
}

.event-card .card-content .date-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.90);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.event-card .card-content .date-row svg {
    flex-shrink: 0;
    fill: rgba(255, 255, 255, 0.90);
}

.event-card .card-content .title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-white);
    margin: 0 0 10px 0;
    max-width: 90%;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.5);
}

.event-card .card-content .location-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.01em;
}

.event-card .card-content .location-row svg {
    flex-shrink: 0;
    fill: rgba(255, 255, 255, 0.85);
}

/* -------- FOOTER (white notch + buttons) -------- */
.event-card .card-footer {
    position: relative;
    width: 100%;
    height: 60px;
    background: #F0F2F5;
    border-radius: 0 0 40px 40px;
    margin-top: -2px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* White curved notch – matches the mask cutout */
.event-card .card-footer::before {
    content: '';
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 96px;
    background: #F0F2F5;
    border-radius: 25%;
    z-index: 0;
}

.event-card .footer-buttons {
    position: relative;
    z-index: 2;
    top: -36px;
    display: flex;
    gap: 36px;
    align-items: center;
    justify-content: center;
    padding-top: 4px;
}

/* -------- NAVIGATION BUTTONS -------- */
.event-card .nav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-white);
    border: 2px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--color-black);
    outline: none;
    font-size: 1.6rem;
    padding: 0;
    user-select: none;
}

.event-card .nav-btn svg {
    width: 28px;
    height: 28px;
    fill: var(--color-black);
    transition: fill var(--transition-fast);
}

.event-card .nav-btn:hover {
    background: var(--color-light);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    transform: scale(1.05);
}

.event-card .nav-btn:hover svg {
    fill: var(--color-dark);
}

.event-card .nav-btn:active {
    transform: scale(0.94);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

/* -------- RESPONSIVE -------- */

/* Tablet / medium screens */
@media (max-width: 1024px) {
    .event-card {
        min-height: 460px;
        max-width: 90%;
    }
    .event-card .card-swiper,
    .event-card .card-swiper .swiper-slide {
        min-height: 460px;
    }
    .event-card .card-content .title {
        font-size: 2.4rem;
    }
    .event-card .card-content {
        max-width: 80%;
        bottom: 70px;
        left: 32px;
    }
    .event-card .badge {
        font-size: 0.85rem;
        padding: 8px 20px;
        top: 28px;
        left: 28px;
    }
    .event-card .card-footer {
        height: 80px;
    }
    .event-card .card-footer::before {
        width: 200px;
        height: 84px;
        top: -42px;
    }
    .event-card .nav-btn {
        width: 50px;
        height: 50px;
    }
    .event-card .nav-btn svg {
        width: 24px;
        height: 24px;
    }
    .event-card .footer-buttons {
        gap: 30px;
    }
}

/* Small tablets / large phones */
@media (max-width: 768px) {
    .event-card {
        min-height: 380px;
        max-width: 95%;
        border-radius: 32px;
    }
    .event-card .card-swiper,
    .event-card .card-swiper .swiper-slide {
        min-height: 380px;
        border-radius: 32px 32px 0 0;
    }
    .event-card .card-swiper {
        -webkit-mask-image: radial-gradient(ellipse at 50% 100%, transparent 34px, black 35px, black 100%);
        mask-image: radial-gradient(ellipse at 50% 100%, transparent 34px, black 35px, black 100%);
    }
    .event-card .card-content .title {
        font-size: 1.8rem;
        max-width: 100%;
    }
    .event-card .card-content {
        bottom: 60px;
        left: 24px;
        right: 24px;
        max-width: 88%;
    }
    .event-card .badge {
        font-size: 0.75rem;
        padding: 6px 18px;
        top: 22px;
        left: 22px;
    }
    .event-card .card-content .date-row,
    .event-card .card-content .location-row {
        font-size: 0.9rem;
    }
    .event-card .card-footer {
        height: 70px;
        border-radius: 0 0 32px 32px;
    }
    .event-card .card-footer::before {
        width: 170px;
        height: 72px;
        top: -36px;
    }
    .event-card .nav-btn {
        width: 44px;
        height: 44px;
    }
    .event-card .nav-btn svg {
        width: 20px;
        height: 20px;
    }
    .event-card .footer-buttons {
        gap: 24px;
    }
}

/* Mobile (≤600px) */
@media (max-width: 600px) {
    .event-card {
        min-height: 340px;
        max-width: 100%;
        border-radius: 28px;
        padding: 0 20px;
        margin: 50px auto 0 auto;
    }
    .event-card .card-swiper,
    .event-card .card-swiper .swiper-slide {
        min-height: 340px;
        border-radius: 28px 28px 0 0;
    }
    .event-card .card-swiper {
        -webkit-mask-image: radial-gradient(ellipse at 50% 100%, transparent 28px, black 29px, black 100%);
        mask-image: radial-gradient(ellipse at 50% 100%, transparent 28px, black 29px, black 100%);
    }
    .event-card .card-content .title {
        font-size: 1.4rem;
        max-width: 100%;
    }
    .event-card .card-content {
        bottom: 48px;
        left: 18px;
        right: 18px;
        max-width: 92%;
    }
    .event-card .badge {
        font-size: 0.65rem;
        padding: 5px 14px;
        top: 16px;
        left: 16px;
    }
    .event-card .card-content .date-row,
    .event-card .card-content .location-row {
        font-size: 0.8rem;
    }
    .event-card .card-content .date-row svg,
    .event-card .card-content .location-row svg {
        width: 16px;
        height: 16px;
    }
    .event-card .card-footer {
        height: 60px;
        border-radius: 0 0 28px 28px;
    }
    .event-card .card-footer::before {
        width: 140px;
        height: 60px;
        top: -30px;
    }
    .event-card .nav-btn {
        width: 38px;
        height: 38px;
    }
    .event-card .nav-btn svg {
        width: 18px;
        height: 18px;
    }
    .event-card .footer-buttons {
        gap: 20px;
    }
}

/* Very small phones (≤420px) */
@media (max-width: 420px) {
    .event-card {
        min-height: 280px;
        border-radius: 24px;
    }
    .event-card .card-swiper,
    .event-card .card-swiper .swiper-slide {
        min-height: 280px;
        border-radius: 24px 24px 0 0;
    }
    .event-card .card-swiper {
        -webkit-mask-image: radial-gradient(ellipse at 50% 100%, transparent 24px, black 25px, black 100%);
        mask-image: radial-gradient(ellipse at 50% 100%, transparent 24px, black 25px, black 100%);
    }
    .event-card .card-content .title {
        font-size: 1.1rem;
    }
    .event-card .card-content {
        bottom: 40px;
        left: 14px;
        right: 14px;
    }
    .event-card .badge {
        font-size: 0.6rem;
        padding: 4px 12px;
        top: 14px;
        left: 14px;
    }
    .event-card .card-content .date-row,
    .event-card .card-content .location-row {
        font-size: 0.7rem;
    }
    .event-card .card-footer {
        height: 52px;
        border-radius: 0 0 24px 24px;
    }
    .event-card .card-footer::before {
        width: 110px;
        height: 50px;
        top: -25px;
    }
    .event-card .nav-btn {
        width: 32px;
        height: 32px;
    }
    .event-card .nav-btn svg {
        width: 14px;
        height: 14px;
    }
    .event-card .footer-buttons {
        gap: 16px;
    }
}

/* ===== EVENTS LIST ===== */
.app-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Filter Bar */
.filter-bar {
    width: 100%;
    background: var(--color-white);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

.filter-tabs {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-tab {
    background: transparent;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    font-family: var(--font-family);
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.filter-tab.active { color: var(--color-blue); }

/* Swiper Container */
.event-swiper {
    width: 100%;
    height: auto !important;
    overflow: hidden;
    border-radius: 20px;
}

.event-swiper .swiper-wrapper {
    display: flex;
    flex-direction: column;
}

.event-swiper .swiper-slide.event-slide {
    display: flex;
    flex-direction: column;
    gap: 0 1.5rem;
    height: auto !important;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

/* Loader Overlay */
.loader-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    z-index: 10;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.loader-wrapper.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Individual Card */
.event-listing-card {
    display: flex;
    background: var(--color-white);
    border-radius: 20px;
    padding: 1.2rem;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 20px;
}

.event-listing-card:hover { box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08); }
.event-listing-card.hidden { display: none !important; }

/* Image */
.event-image { flex: 0 0 180px; }
.event-image img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

/* Content */
.event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
}

.event-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--color-pill-bg);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #4b5563;
    width: fit-content;
}
.meta-item { display: flex; align-items: center; gap: 0.4rem; }
.meta-item i { font-size: 0.8rem; }
.meta-divider { width: 1px; height: 1rem; background: #d1d5db; }

.event-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-primary);
}
.event-location i { font-size: 0.85rem; }

/* Action Area */
.event-action {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0.2rem 0 0.2rem 1.2rem;
    position: relative;
}
.action-divider {
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: #e5e7eb;
}
.btn-buy {
    background: transparent;
    border: 1.5px solid var(--color-blue);
    color: var(--color-blue);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}
.btn-buy:hover { background: var(--color-blue); color: var(--color-white); }

/* ===== AVATARS FIXED ===== */
.event-listing-card .speaker-avatars {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    padding-left: 10px;
    flex-wrap: nowrap;
}
.event-listing-card .speaker-avatars img,
.event-listing-card .speaker-avatars .speaker-count {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-white);
    margin-right: -10px;
    flex-shrink: 0;
    display: block;
}
.event-listing-card .speaker-avatars .speaker-count {
    margin-right: 0;
    background: var(--color-blue);
    color: var(--color-white);
    font-size: 0.55rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pagination */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding-top: 0.5rem;
}
.page-arrow {
    background: transparent; border: none; color: #4b5563; font-size: 1rem;
    cursor: pointer; padding: 0.4rem; border-radius: 50%; transition: all 0.2s;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
}
.page-arrow:hover { background: #f3f4f6; }

.swiper-pagination {
    display: flex; gap: 0.5rem; position: relative; width: auto !important;
}
.swiper-pagination-bullet {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid #d1d5db;
    background: var(--color-white); 
    font-weight: 600; font-size: 0.8rem;
    display: flex !important; align-items: center !important; justify-content: center !important;
    text-align: center; line-height: 1; padding: 0; 
    transition: all 0.2s ease; cursor: pointer; opacity: 1 !important; 
    font-family: var(--font-family);
    color: #4b5563;
}
.swiper-pagination-bullet-active {
    background: var(--color-blue); color: var(--color-white);
    border-color: var(--color-blue); box-shadow: 0 4px 12px rgba(43, 110, 240, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .app-container { padding: 0 20px; }
    .event-listing-card { flex-direction: column; padding: 1rem; gap: 1rem; }
    .event-image { flex: 0 0 auto; width: 100%; }
    .event-image img { aspect-ratio: 16 / 9; max-height: 200px; }
    .event-action { flex: 1; flex-direction: row; align-items: center; justify-content: space-between; padding: 0; }
    .action-divider { display: none; }
    .pagination-bar { margin-bottom: 30px; }
}
@media (max-width: 480px) {
    .filter-bar { padding: 0.3rem 0.8rem; border-radius: 30px; }
    .filter-tab { font-size: 0.75rem; padding: 0.3rem 0; }
    .event-title { font-size: 1rem; }
    .swiper-pagination-bullet { width: 32px; height: 32px; font-size: 0.7rem; }
}