/* ===== EVENT PAGE & ADMIN EVENT UI ===== */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

.event-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
    color: #fff;
    padding: 48px 0 42px;
    border-radius: 0 0 32px 32px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.16);
}

.event-hero h1 {
    font-size: clamp(1.65rem, 3.2vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.025em;
}

.event-hero p {
    color: rgba(255, 255, 255, 0.92);
    max-width: 620px;
    font-size: 1rem;
    line-height: 1.65;
}

/* ===== MOBILE NAVBAR & DRAWER (EVENT PAGE) ===== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #0f172a;
    border-radius: 99px;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 270px;
    max-width: 82vw;
    background: #ffffff;
    z-index: 1100;
    box-shadow: -8px 0 30px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    transform: translateX(0);
    visibility: visible;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.drawer-header .brand {
    font-size: 0.95rem;
    line-height: 1.3;
}

.drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 1.45rem;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    overflow-y: auto;
}

.drawer-item {
    padding: 12px 14px;
    border-radius: 12px;
    color: #1e293b;
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.drawer-item:hover {
    background: #eff6ff;
    color: #2563eb;
}

.drawer-login {
    margin-top: 8px;
    text-align: center;
}

/* Filter & Search Bar */
.event-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.event-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.event-pill {
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.event-pill:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #f8fafc;
}

.event-pill.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.26);
}

.event-search-box {
    flex: 1;
    min-width: 240px;
    max-width: 340px;
}

/* Grid & Card Event (Desktop) */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
    margin-bottom: 52px;
}

.event-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.event-card:hover {
    transform: translateY(-5px);
    border-color: #bfdbfe;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.09);
}

.event-poster-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    overflow: hidden;
    cursor: pointer;
}

.event-poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s ease;
}

.event-card:hover .event-poster-wrap img {
    transform: scale(1.05);
}

/* Status Badges */
.event-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.event-status-inline {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.status-berlangsung {
    background: #dcfce7;
    color: #15803d;
}

.status-akan-datang {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-selesai {
    background: #f1f5f9;
    color: #475569;
}

/* Rating Badge di Card */
.event-rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 4px 11px;
    border-radius: 999px;
    margin-bottom: 10px;
    width: fit-content;
}

.event-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-title {
    font-size: 1.14rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.35;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 0.86rem;
    color: #475569;
    margin-bottom: 12px;
}

.event-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
}

.event-meta-item strong {
    color: #1e293b;
}

.event-desc {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.58;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-sponsor {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 9px 13px;
    font-size: 0.82rem;
    color: #334155;
    margin-bottom: 12px;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
}

.event-tag {
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 999px;
}

.event-footer {
    padding: 12px 20px 18px;
    border-top: 1px solid #f1f5f9;
}

.event-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 52px 20px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    color: #64748b;
}

/* ===== MODAL DETAIL EVENT MODERN (DESKTOP) ===== */
.event-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.65);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.event-modal.hidden {
    display: none;
}

.event-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.38);
    animation: eventModalDesktopIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes eventModalDesktopIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.event-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    flex-shrink: 0;
}

.event-modal-header h3 {
    font-size: 1.22rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.event-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.event-modal-close:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.event-modal-body {
    padding: 22px 24px 28px;
    overflow-y: auto;
}

.event-detail-poster {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 18px;
}

.event-detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.event-detail-meta-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
}

.event-detail-meta-card small {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.event-detail-meta-card strong {
    font-size: 0.9rem;
    color: #0f172a;
    line-height: 1.35;
}

/* ===== SECTION RATING & ULASAN ===== */
.event-rating-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.event-rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.event-rating-header h4 {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 800;
    color: #0f172a;
}

.event-rating-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 18px;
}

.star-picker {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.star-btn {
    background: none;
    border: none;
    font-size: 1.9rem;
    line-height: 1;
    color: #cbd5e1;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.15s ease, color 0.15s ease;
}

.star-btn:hover,
.star-btn.active {
    color: #f59e0b;
    transform: scale(1.12);
}

.rating-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 13px 15px;
}

.rating-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.rating-stars-text {
    color: #f59e0b;
    font-size: 0.92rem;
    letter-spacing: 1px;
}

.rating-item-comment {
    font-size: 0.87rem;
    color: #475569;
    margin: 4px 0 0;
    line-height: 1.55;
}

/* Admin Event Preview */
.admin-event-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* ===== RESPONSIVE MOBILE (BEDA LAYOUT DARI DESKTOP) ===== */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .navbar .brand {
        font-size: 1rem;
    }

    .event-hero {
        padding: 28px 0 24px;
        border-radius: 0 0 22px 22px;
        margin-bottom: 20px;
    }

    .event-hero p {
        font-size: 0.9rem;
    }

    /* Toolbar mobile: Search di atas, Filter Pills bisa di-swipe horizontal */
    .event-toolbar {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 18px;
    }

    .event-search-box {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    .event-filter-pills {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .event-filter-pills::-webkit-scrollbar {
        display: none;
    }

    .event-pill {
        padding: 8px 15px;
        font-size: 0.82rem;
        flex-shrink: 0;
    }

    .event-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 36px;
    }

    .event-card {
        border-radius: 16px;
    }

    .event-body {
        padding: 15px 16px;
    }

    .event-footer {
        padding: 10px 16px 14px;
    }

    /* Modal Mobile: Bottom Sheet penuh dari bawah agar nyaman 1 tangan */
    .event-modal {
        padding: 0;
        align-items: flex-end;
    }

    .event-modal-dialog {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
        animation: eventModalMobileUp 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes eventModalMobileUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .event-modal-header {
        padding: 14px 16px;
    }

    .event-modal-header h3 {
        font-size: 1.06rem;
    }

    .event-modal-body {
        padding: 16px 16px 26px;
    }

    .event-detail-poster {
        max-height: 250px;
        border-radius: 12px;
    }

    /* Meta info jadi 1 kolom vertikal yang rapi di mobile */
    .event-detail-meta-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .event-detail-meta-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
    }

    .event-detail-meta-card small {
        margin-bottom: 0;
    }

    .event-detail-meta-card strong {
        text-align: right;
        font-size: 0.85rem;
    }

    .star-btn {
        font-size: 2.1rem;
    }
}