/* ── CCRF Sermons Plugin Styles ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --ccrf-primary:      #06677e;
    --ccrf-primary-dark: #004e5f;
    --ccrf-primary-light:#b5ebff;
    --ccrf-bg:           #f8f9fa;
    --ccrf-surface:      #ffffff;
    --ccrf-border:       #bfc8cc;
    --ccrf-text:         #191c1d;
    --ccrf-muted:        #3f484c;
    --ccrf-scripture:    #735a36;
    --ccrf-radius-lg:    16px;
    --ccrf-radius-xl:    24px;
    --ccrf-shadow:       0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
    --ccrf-shadow-hover: 0 4px 16px rgba(6,103,126,.15);
}

#ccrf-sermons-app * { box-sizing: border-box; }
#ccrf-sermons-app { font-family: 'Inter', sans-serif; color: var(--ccrf-text); }

/* ── HERO ──────────────────────────────────────────────────────────────── */
.ccrf-hero {
    position: relative;
    border-radius: var(--ccrf-radius-xl);
    overflow: hidden;
    margin-bottom: 32px;
    background: #191c1d;
    min-height: 400px;
}
.ccrf-hero-bg { position: absolute; inset: 0; }
.ccrf-hero-img { width: 100%; height: 100%; object-fit: cover; opacity: .4; filter: grayscale(1); }
.ccrf-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, #191c1d 40%, rgba(25,28,29,.6) 70%, transparent);
}
.ccrf-hero-content {
    position: relative; z-index: 2;
    padding: 48px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    flex-wrap: wrap;
}
.ccrf-hero-left { max-width: 640px; }
.ccrf-latest-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(6,103,126,.25);
    border: 1px solid rgba(6,103,126,.4);
    color: var(--ccrf-primary-light);
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.ccrf-hero-title {
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 20px;
    letter-spacing: -.02em;
}
.ccrf-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 28px; }
.ccrf-meta-item {
    display: flex; align-items: center; gap: 7px;
    color: rgba(255,255,255,.7);
    font-size: 16px; font-weight: 400;
}
.ccrf-meta-item svg { width: 18px; height: 18px; color: var(--ccrf-primary-light); flex-shrink: 0; }
.ccrf-hero-actions { display: flex; align-items: center; gap: 24px; }
.ccrf-play-btn {
    display: flex; align-items: center; gap: 10px;
    background: var(--ccrf-primary);
    color: #fff;
    border: none; cursor: pointer;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 14px; font-weight: 700;
    letter-spacing: .05em;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 20px rgba(6,103,126,.35);
}
.ccrf-play-btn svg { width: 22px; height: 22px; }
.ccrf-play-btn:hover { transform: scale(1.04); box-shadow: 0 6px 24px rgba(6,103,126,.5); }
.ccrf-play-btn:active { transform: scale(.97); }

/* Waveform */
.ccrf-waveform { display: flex; align-items: flex-end; gap: 3px; height: 32px; }
.ccrf-waveform span {
    width: 3px; background: rgba(181,235,255,.4);
    border-radius: 2px;
    animation: ccrf-wave 1.2s ease-in-out infinite;
}
.ccrf-waveform span:nth-child(1) { height: 10px; animation-delay: 0s; }
.ccrf-waveform span:nth-child(2) { height: 20px; animation-delay: .15s; }
.ccrf-waveform span:nth-child(3) { height: 26px; animation-delay: .3s; }
.ccrf-waveform span:nth-child(4) { height: 14px; animation-delay: .45s; }
.ccrf-waveform span:nth-child(5) { height: 22px; animation-delay: .2s; }
.ccrf-waveform span:nth-child(6) { height: 18px; animation-delay: .35s; }
.ccrf-waveform span:nth-child(7) { height: 12px; animation-delay: .5s; }
@keyframes ccrf-wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.8); }
}

/* Speaker Card */
.ccrf-hero-speaker-card {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--ccrf-radius-lg);
    padding: 24px;
    text-align: center;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ccrf-speaker-card-photo {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(181,235,255,.3);
    margin-bottom: 14px;
}
.ccrf-speaker-card-name {
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 18px; font-weight: 700;
    color: #fff; margin: 0 0 4px;
}
.ccrf-speaker-card-role { color: rgba(255,255,255,.55); font-size: 13px; margin: 0 0 16px; }
.ccrf-speaker-card-btn {
    display: block; width: 100%;
    padding: 8px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    color: #fff; text-decoration: none;
    font-size: 12px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    transition: background .15s;
}
.ccrf-speaker-card-btn:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── FILTERS ───────────────────────────────────────────────────────────── */
.ccrf-filters-wrap {
    position: sticky; top: 80px; z-index: 50;
    margin-bottom: 28px;
}
.ccrf-filters {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--ccrf-border);
    border-radius: var(--ccrf-radius-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--ccrf-shadow);
}
.ccrf-filters-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ccrf-filters-right { display: flex; align-items: center; gap: 16px; }
.ccrf-filter-label {
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 11px; font-weight: 800;
    letter-spacing: .1em; color: var(--ccrf-muted);
}

/* Filter dropdown */
.ccrf-filter-dropdown { position: relative; }
.ccrf-filter-btn {
    display: flex; align-items: center; gap: 4px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #edeeef;
    border: 1px solid transparent;
    color: var(--ccrf-muted);
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.ccrf-filter-btn svg { width: 18px; height: 18px; }
.ccrf-filter-btn:hover, .ccrf-filter-btn.active {
    background: #e1e3e4; color: var(--ccrf-primary);
}
.ccrf-filter-btn.has-value { color: var(--ccrf-primary); border-color: var(--ccrf-primary); }
.ccrf-dropdown-panel {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 0;
    background: #fff;
    border: 1px solid var(--ccrf-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    min-width: 200px; max-width: 280px;
    z-index: 200;
    overflow: hidden;
}
.ccrf-dropdown-panel.open { display: block; animation: ccrf-dropdown-in .15s ease; }
@keyframes ccrf-dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ccrf-dropdown-inner { max-height: 260px; overflow-y: auto; padding: 6px; }
.ccrf-dropdown-item {
    display: block; width: 100%;
    padding: 9px 14px;
    text-align: left; background: none; border: none;
    border-radius: 8px;
    font-size: 13px; font-weight: 500; color: var(--ccrf-text);
    cursor: pointer; transition: background .1s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ccrf-dropdown-item:hover { background: #f3f4f5; }
.ccrf-dropdown-item.active { background: #edf4f7; color: var(--ccrf-primary); font-weight: 700; }

/* Search */
.ccrf-search-wrap {
    position: relative; display: flex; align-items: center;
}
.ccrf-search-wrap svg {
    position: absolute; left: 12px;
    width: 16px; height: 16px; color: var(--ccrf-muted); pointer-events: none;
}
.ccrf-search-wrap input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--ccrf-border);
    border-radius: 10px;
    font-size: 13px; color: var(--ccrf-text);
    background: #f3f4f5;
    width: 200px; transition: all .2s;
}
.ccrf-search-wrap input:focus {
    outline: none; border-color: var(--ccrf-primary);
    background: #fff; width: 240px;
}
.ccrf-total-count { font-size: 14px; color: var(--ccrf-muted); white-space: nowrap; }
.ccrf-total-count strong { color: var(--ccrf-text); font-weight: 700; }

/* ── STICKY AUDIO PLAYER ───────────────────────────────────────────────── */
.ccrf-sticky-player {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--ccrf-primary-dark);
    color: #fff; z-index: 9999;
    box-shadow: 0 -4px 24px rgba(0,0,0,.2);
    animation: ccrf-slide-up .25s ease;
}
@keyframes ccrf-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.ccrf-sticky-player-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 12px 24px;
    display: flex; align-items: center; gap: 20px;
}
.ccrf-sticky-info { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.ccrf-sticky-waveform { display: flex; align-items: flex-end; gap: 2px; height: 24px; flex-shrink: 0; }
.ccrf-sticky-waveform span {
    width: 3px; background: rgba(181,235,255,.6);
    border-radius: 2px;
    animation: ccrf-wave 1s ease-in-out infinite;
}
.ccrf-sticky-waveform span:nth-child(1){height:8px;animation-delay:.0s}
.ccrf-sticky-waveform span:nth-child(2){height:16px;animation-delay:.15s}
.ccrf-sticky-waveform span:nth-child(3){height:22px;animation-delay:.3s}
.ccrf-sticky-waveform span:nth-child(4){height:12px;animation-delay:.45s}
.ccrf-sticky-waveform span:nth-child(5){height:18px;animation-delay:.2s}
.ccrf-sticky-title {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 700; font-size: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#ccrf-main-audio { flex: 1; max-width: 500px; height: 36px; accent-color: var(--ccrf-primary-light); }
.ccrf-close-player {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.7); padding: 4px; border-radius: 50%;
    transition: color .15s, background .15s; flex-shrink: 0;
}
.ccrf-close-player svg { width: 20px; height: 20px; display: block; }
.ccrf-close-player:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ── SERMON CARDS ──────────────────────────────────────────────────────── */
.ccrf-sermon-list { display: flex; flex-direction: column; gap: 16px; }
.ccrf-sermon-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px;
    background: var(--ccrf-surface);
    border: 1px solid var(--ccrf-border);
    border-radius: var(--ccrf-radius-lg);
    gap: 24px;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.ccrf-sermon-card:hover {
    border-color: rgba(6,103,126,.4);
    box-shadow: var(--ccrf-shadow-hover);
    transform: translateY(-1px);
}
.ccrf-sermon-card-body { flex: 1; min-width: 0; }
.ccrf-sermon-date {
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 11px; font-weight: 800;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--ccrf-primary); margin-bottom: 8px;
}
.ccrf-sermon-title {
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 22px; font-weight: 700;
    color: var(--ccrf-text); margin: 0 0 12px;
    line-height: 1.3;
    transition: color .15s;
    text-decoration: none; display: block;
}
.ccrf-sermon-card:hover .ccrf-sermon-title { color: var(--ccrf-primary); }
.ccrf-sermon-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.ccrf-tag {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; color: var(--ccrf-muted);
}
.ccrf-tag svg { width: 16px; height: 16px; flex-shrink: 0; }
.ccrf-tag-scripture {
    font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--ccrf-scripture);
}
.ccrf-tag-scripture svg { color: var(--ccrf-scripture); }
.ccrf-sermon-card-actions {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.ccrf-listen-btn {
    display: flex; align-items: center; gap: 8px;
    background: var(--ccrf-primary); color: #fff;
    border: none; cursor: pointer;
    padding: 11px 22px;
    border-radius: 12px;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 14px; font-weight: 700;
    transition: opacity .15s, transform .15s;
    text-decoration: none;
}
.ccrf-listen-btn svg { width: 20px; height: 20px; }
.ccrf-listen-btn:hover { opacity: .88; transform: scale(1.02); }
.ccrf-listen-btn:active { transform: scale(.97); }
.ccrf-listen-btn.no-audio { background: #edeeef; color: #999; cursor: default; }
.ccrf-download-btn {
    display: flex; align-items: center; gap: 8px;
    background: none;
    border: 1px solid var(--ccrf-border);
    color: var(--ccrf-muted); cursor: pointer;
    padding: 11px 22px;
    border-radius: 12px;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 14px; font-weight: 600;
    transition: all .15s;
    text-decoration: none;
}
.ccrf-download-btn svg { width: 18px; height: 18px; }
.ccrf-download-btn:hover { background: #f3f4f5; border-color: #aaa; color: var(--ccrf-text); }

/* ── EMPTY STATE ───────────────────────────────────────────────────────── */
.ccrf-empty {
    text-align: center; padding: 80px 24px;
    color: var(--ccrf-muted);
}
.ccrf-empty svg { width: 48px; height: 48px; opacity: .3; margin: 0 auto 16px; display: block; }
.ccrf-empty h3 { font-family:'Hanken Grotesk',sans-serif; font-size: 20px; margin: 0 0 8px; color: var(--ccrf-text); }
.ccrf-empty p { font-size: 14px; margin: 0; }

/* ── LOADING ───────────────────────────────────────────────────────────── */
.ccrf-loading { display: flex; justify-content: center; padding: 48px; }
.ccrf-spinner {
    width: 36px; height: 36px;
    border: 3px solid #edeeef;
    border-top-color: var(--ccrf-primary);
    border-radius: 50%;
    animation: ccrf-spin .7s linear infinite;
}
@keyframes ccrf-spin { to { transform: rotate(360deg); } }

/* ── PAGINATION ────────────────────────────────────────────────────────── */
.ccrf-pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 8px; margin-top: 40px; flex-wrap: wrap;
}
.ccrf-page-btn {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--ccrf-border);
    background: none; color: var(--ccrf-muted);
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.ccrf-page-btn:hover { background: var(--ccrf-primary); color: #fff; border-color: transparent; }
.ccrf-page-btn.active { background: var(--ccrf-primary); color: #fff; border-color: transparent; }
.ccrf-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.ccrf-page-btn svg { width: 18px; height: 18px; }

/* ── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ccrf-hero-content { padding: 28px 24px; }
    .ccrf-hero-speaker-card { display: none; }
    .ccrf-sermon-card { flex-direction: column; padding: 20px; gap: 16px; }
    .ccrf-sermon-card-actions { width: 100%; }
    .ccrf-listen-btn, .ccrf-download-btn { flex: 1; justify-content: center; }
    .ccrf-filters { padding: 12px 16px; }
    .ccrf-search-wrap input { width: 140px; }
    .ccrf-search-wrap input:focus { width: 170px; }
    .ccrf-sticky-player-inner { padding: 10px 16px; gap: 12px; }
    #ccrf-main-audio { max-width: none; }
}
