/**
 * Sermon Archive Layouts
 * Structural layout CSS — fonts/colors inherit from design template
 * Prefix: sl- (sermon layout)
 */

/* ═══════════════════════════════════════════════════════════════
   SHARED
   ═══════════════════════════════════════════════════════════════ */

.sermon-media { margin-bottom: 1em; }
.sermon-media iframe,
.sermon-media video { max-width: 100%; }

.sermon-btn--compact { padding: 0.3em 0.6em; }

[class*="sl-"] a { text-decoration: none; }

/* Meta separators */
[class*="__meta"] span + span::before {
    content: "·";
    margin: 0 0.5em;
    opacity: 0.5;
}


/* ═══════════════════════════════════════════════════════════════
   LAYOUT 1: VIDEO GRID
   ═══════════════════════════════════════════════════════════════ */

.sl-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Featured spans full width */
.sl-vg-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
}

.sl-vg-featured__media { width: 100%; }
.sl-vg-featured__media iframe,
.sl-vg-featured__media video { width: 100%; aspect-ratio: 16/9; }

.sl-vg-featured__title { margin: 0 0 0.25em; }
.sl-vg-featured__date { opacity: 0.7; margin: 0 0 0.25em; }
.sl-vg-featured__speaker { margin: 0 0 0.75em; }

/* Grid cards */
.sl-vg-card__thumb {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.sl-vg-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.sl-vg-card__thumb:hover .sl-vg-card__img {
    transform: scale(1.03);
}

.sl-vg-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sl-vg-card__thumb:hover .sl-vg-card__play { opacity: 1; }

.sl-vg-card__body { padding: 0.75rem 0 0; }
.sl-vg-card__title { margin: 0 0 0.25em; text-align: center; }
.sl-vg-card__title a { color: inherit; }
.sl-vg-card__meta { margin: 0 0 0.25em; opacity: 0.7; }
.sl-vg-card__series { margin: 0 0 0.5em; opacity: 0.6; }

@media (max-width: 900px) {
    .sl-video-grid { grid-template-columns: repeat(2, 1fr); }
    .sl-vg-featured { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .sl-video-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════
   LAYOUT 2: VIDEO FEATURED
   ═══════════════════════════════════════════════════════════════ */

.sl-video-featured { max-width: 100%; }

.sl-vf-hero {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sl-vf-hero__video { width: 100%; margin-bottom: 1rem; }
.sl-vf-hero__video iframe,
.sl-vf-hero__video video { width: 100%; aspect-ratio: 16/9; }

.sl-vf-hero__label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    margin-bottom: 0.25em;
}

.sl-vf-hero__title { margin: 0 0 0.25em; }
.sl-vf-hero__meta span + span::before { content: "·"; margin: 0 0.5em; opacity: 0.5; }

.sl-vf-list-header {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* List items */
.sl-vf-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.2s ease;
}

.sl-vf-item:hover { background: rgba(0,0,0,0.02); }

.sl-vf-item__thumb {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.sl-vf-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sl-vf-item__title { margin: 0 0 0.15em; }
.sl-vf-item__title a { color: inherit; }
.sl-vf-item__meta { margin: 0; opacity: 0.7; }

.sl-vf-item__actions .tab-btn { display: flex; gap: 0.25em; flex-wrap: wrap; }
.sl-vf-item__actions .tab-btn li { list-style: none; }

@media (max-width: 700px) {
    .sl-vf-item {
        grid-template-columns: 100px 1fr;
    }
    .sl-vf-item__actions {
        grid-column: 1 / -1;
    }
}


/* ═══════════════════════════════════════════════════════════════
   LAYOUT 3: VIDEO CINEMATIC
   ═══════════════════════════════════════════════════════════════ */

.sl-video-cinematic {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* Hero spans full width */
.sl-vc-hero {
    grid-column: 1 / -1;
    position: relative;
    margin-bottom: 0.5rem;
}

.sl-vc-hero__media { width: 100%; }
.sl-vc-hero__media iframe,
.sl-vc-hero__media video { width: 100%; aspect-ratio: 16/9; }

.sl-vc-hero__overlay {
    padding: 1rem 0;
}

.sl-vc-hero__title { margin: 0 0 0.25em; }
.sl-vc-hero__meta { opacity: 0.7; margin: 0 0 0.75em; }

/* Cinematic cards */
.sl-vc-card {
    position: relative;
    overflow: hidden;
}

.sl-vc-card__link {
    display: block;
    position: relative;
    color: inherit;
}

.sl-vc-card__thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.sl-vc-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.sl-vc-card__link:hover .sl-vc-card__img {
    transform: scale(1.05);
}

.sl-vc-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.sl-vc-card__link:hover .sl-vc-card__play { opacity: 1; }

.sl-vc-card__gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    pointer-events: none;
}

.sl-vc-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    color: #fff;
    z-index: 1;
}

.sl-vc-card__title {
    margin: 0 0 0.15em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.sl-vc-card__meta {
    margin: 0;
    opacity: 0.85;
    color: #fff;
}

.sl-vc-card__series {
    margin: 0.25em 0 0;
    opacity: 0.7;
}

@media (max-width: 700px) {
    .sl-video-cinematic { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════
   LAYOUT 4: PODCAST LIST
   ═══════════════════════════════════════════════════════════════ */

.sl-podcast-list { max-width: 100%; }

/* Featured episode */
.sl-pl-featured {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    padding-bottom: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sl-pl-featured__art { flex-shrink: 0; }

.sl-pl-featured__img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.sl-pl-featured__label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    margin-bottom: 0.25em;
}

.sl-pl-featured__title { margin: 0 0 0.25em; }

.sl-pl-featured__player {
    margin: 1em 0;
}

.sl-pl-featured__player audio { width: 100%; }

/* Episode rows */
.sl-pl-episode {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.2s ease;
}

.sl-pl-episode:hover { background: rgba(0,0,0,0.02); }

.sl-pl-episode__img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.sl-pl-episode__title { margin: 0 0 0.15em; }
.sl-pl-episode__title a { color: inherit; }
.sl-pl-episode__meta { margin: 0 0 0.25em; opacity: 0.6; }
.sl-pl-episode__desc { margin: 0; opacity: 0.7; }

.sl-pl-episode__actions .tab-btn { display: flex; gap: 0.25em; flex-wrap: wrap; }
.sl-pl-episode__actions .tab-btn li { list-style: none; }
.sermon-btn--compact {
    padding: 0.3em 0.6em;
    border: 0 !important;
}
@media (max-width: 700px) {
    .sl-pl-featured { grid-template-columns: 120px 1fr; }
    .sl-pl-episode {
        grid-template-columns: 48px 1fr;
    }
    .sl-pl-episode__actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 500px) {
    .sl-pl-featured { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════
   LAYOUT 5: AUDIO CARDS
   ═══════════════════════════════════════════════════════════════ */

.sl-audio-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* Featured spans full width */
.sl-ac-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
    padding-bottom: 2rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sl-ac-featured__img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.sl-ac-featured__title { margin: 0 0 0.25em; }

.sl-ac-featured__player {
    margin: 1em 0;
}

.sl-ac-featured__player audio { width: 100%; }

/* Audio cards */
.sl-ac-card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.sl-ac-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.sl-ac-card__top {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
    padding: 1rem;
}

.sl-ac-card__img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.sl-ac-card__title { margin: 0 0 0.15em; }
.sl-ac-card__title a { color: inherit; }
.sl-ac-card__meta { margin: 0 0 0.15em; opacity: 0.6; }
.sl-ac-card__series { margin: 0; opacity: 0.5; }

.sl-ac-card__player {
    padding: 0 1rem;
    margin-bottom: 0.5rem;
}

.sl-ac-card__player audio { width: 100%; }

.sl-ac-card__footer {
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.sl-ac-card__footer .tab-btn { display: flex; gap: 0.25em; flex-wrap: wrap; }
.sl-ac-card__footer .tab-btn li { list-style: none; }

@media (max-width: 800px) {
    .sl-audio-cards { grid-template-columns: 1fr; }
    .sl-ac-featured { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════
   LAYOUT 6: AUDIO MINIMAL
   ═══════════════════════════════════════════════════════════════ */

.sl-audio-minimal { max-width: 100%; }

/* Table header */
.sl-am-header {
    display: grid;
    grid-template-columns: 40px 1fr 150px 150px 100px 120px;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
}

/* Featured with inline player */
.sl-am-featured {
    padding: 1.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sl-am-featured__title { margin: 0 0 0.25em; }
.sl-am-featured__meta { margin: 0 0 0.75em; opacity: 0.7; }

.sl-am-featured__player {
    margin: 1em 0;
}

.sl-am-featured__player audio { width: 100%; }

/* Rows */
.sl-am-row {
    display: grid;
    grid-template-columns: 40px 1fr 150px 150px 100px 120px;
    gap: 0.5rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.15s ease;
}

.sl-am-row:hover { background: rgba(0,0,0,0.02); }

.sl-am-row--even { background: rgba(0,0,0,0.015); }
.sl-am-row--even:hover { background: rgba(0,0,0,0.035); }

.sl-am-row__num { opacity: 0.4; text-align: center; }

.sl-am-row__title a { color: inherit; }

.sl-am-row__duration {
    opacity: 0.5;
    margin-left: 0.5em;
}

.sl-am-row__speaker { opacity: 0.7; }
.sl-am-row__series { opacity: 0.6; }
.sl-am-row__date { opacity: 0.7; }

.sl-am-row__actions .tab-btn { display: flex; gap: 0.15em; flex-wrap: wrap; }
.sl-am-row__actions .tab-btn li { list-style: none; }
.sermon-btn--compact {
  padding: 1px !important;
  border: 0 !important;
}
@media (max-width: 900px) {
    .sl-am-header { display: none; }
    .sl-am-row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
        padding: 0.75rem;
    }
    .sl-am-row__num { display: none; }
    .sl-am-row__speaker,
    .sl-am-row__series { opacity: 0.6; }
    .sl-am-row__speaker::before { content: "Speaker: "; }
    .sl-am-row__series::before { content: "Series: "; }
}