/**
 * SIPINTER SMK Assa'adah - Portal Ekstrakurikuler Kesiswaan Stylesheet
 * File: portal-ekstrakurikuler.css (Tier 3 Feature CSS)
 * Standard: SSOT Theme Architecture (konsep-theme-frontend.md - Section 5.10)
 */

/* ── 1. Interactive Category / Type Filter Pills ── */
.cms-ekskul-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 4px 14px 4px;
    margin-top: -6px;
    margin-bottom: 2rem;
}

.cms-ekskul-filter-bar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.cms-ekskul-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--cms-border-color, #e2e8f0);
    color: var(--cms-navy, #0f172a);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.cms-ekskul-filter-pill:hover {
    border-color: var(--cms-primary, #059669);
    color: var(--cms-primary, #059669);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.cms-ekskul-filter-pill.active {
    background: var(--cms-primary, #059669);
    border-color: var(--cms-primary, #059669);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.cms-ekskul-pill-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--cms-text-muted, #64748b);
    transition: all 0.25s ease;
}

.cms-ekskul-filter-pill.active .cms-ekskul-pill-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ── 2. Modern Ekstrakurikuler Card (.cms-ekskul-card) ── */
.cms-ekskul-card {
    background: #ffffff;
    border: 1px solid var(--cms-border-color, #e2e8f0);
    border-radius: var(--cms-radius-xl, 20px);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.04);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.cms-ekskul-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px -4px rgba(15, 23, 42, 0.1) !important;
    border-color: rgba(5, 150, 105, 0.35);
}

/* Media / Photo Aspect Ratio Container */
.cms-ekskul-header {
    position: relative;
    width: 100%;
    z-index: 2;
}

.cms-ekskul-media-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
    border-top-left-radius: var(--cms-radius-xl, 20px);
    border-top-right-radius: var(--cms-radius-xl, 20px);
}

.cms-ekskul-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cms-ekskul-card:hover .cms-ekskul-img {
    transform: scale(1.08);
}

/* Type Badge Overlay (Glassmorphism Pill) */
.cms-ekskul-badge-tipe {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cms-ekskul-badge-tipe.is-wajib {
    background: rgba(239, 68, 68, 0.85);
    color: #ffffff;
    border: 1px solid rgba(254, 202, 202, 0.3);
}

.cms-ekskul-badge-tipe.is-pilihan {
    background: rgba(5, 150, 105, 0.85);
    color: #ffffff;
    border: 1px solid rgba(167, 243, 208, 0.3);
}

/* Floating Club Profile Avatar (Squircle Modern Style) */
.cms-ekskul-logo-avatar {
    position: absolute;
    bottom: -24px;
    left: 20px;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #ffffff;
    border: 3.5px solid #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cms-ekskul-card:hover .cms-ekskul-logo-avatar {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22), 0 3px 8px rgba(15, 23, 42, 0.12);
}

.cms-ekskul-logo-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    display: block;
}

/* Fallback Monogram Avatar jika belum ada logo berkas */
.cms-ekskul-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    font-family: var(--cms-head, 'Bricolage Grotesque', sans-serif);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    user-select: none;
}

.cms-ekskul-card[data-tipe="wajib"] .cms-ekskul-initial,
.ekskul-item[data-tipe="wajib"] .cms-ekskul-initial {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

/* Hover Dark Gradient Overlay */
.cms-ekskul-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.65) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.cms-ekskul-card:hover .cms-ekskul-overlay {
    opacity: 1;
}

/* ── 3. Card Body & Typography ── */
.cms-ekskul-body {
    position: relative;
    z-index: 1;
    padding: 34px 22px 20px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.cms-ekskul-title {
    font-family: var(--cms-head, 'Bricolage Grotesque', sans-serif);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--cms-navy, #0f172a);
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cms-ekskul-desc {
    color: var(--cms-text-muted, #64748b);
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Schedule & Practice Venue Info Box */
.cms-ekskul-info-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cms-ekskul-info-item {
    font-size: 0.8125rem;
    color: var(--cms-navy, #0f172a);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cms-ekskul-info-item i {
    width: 16px;
    text-align: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.cms-ekskul-info-item strong {
    color: var(--cms-text-muted, #64748b);
    font-weight: 600;
}

.cms-ekskul-info-val {
    font-weight: 600;
    color: var(--cms-navy, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── 4. Card Footer (Pembina Info) ── */
.cms-ekskul-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cms-ekskul-pembina-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.cms-ekskul-pembina-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(5, 150, 105, 0.1);
    color: var(--cms-primary, #059669);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.cms-ekskul-pembina-label {
    font-size: 0.725rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--cms-text-muted, #64748b);
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.cms-ekskul-pembina-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cms-navy, #0f172a);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── 5. Empty State ── */
.cms-ekskul-empty-state {
    background: #ffffff;
    border: 1px dashed var(--cms-border-color, #cbd5e1);
    border-radius: var(--cms-radius-xl, 20px);
    padding: 56px 24px;
    text-align: center;
}

/* ── 6. Responsive Tweaks ── */
@media (max-width: 767.98px) {
    .cms-ekskul-body {
        padding: 28px 16px 16px 16px;
    }

    .cms-ekskul-logo-avatar {
        bottom: -20px;
        left: 16px;
        width: 46px;
        height: 46px;
        border-radius: 13px;
        border-width: 3px;
    }

    .cms-ekskul-initial {
        font-size: 0.95rem;
    }

    .cms-ekskul-title {
        font-size: 1.05rem;
    }
}
