/**
 * WAEN Podcast Episodes Widget — Base Styles
 * Scoped under .wpew-* prefixes to avoid conflicts.
 */

/* ── Grid ──────────────────────────────────────────────────────────────── */
.wpew-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* overridden by Elementor responsive control */
    gap: 24px;
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.wpew-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.wpew-card--zoom:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* ── Image Wrapper ─────────────────────────────────────────────────────── */
.wpew-card__image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2; /* overridden by Elementor slider control */
    background: #e8e8e8;
    flex-shrink: 0;
}

.wpew-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.wpew-card--zoom:hover .wpew-card__img {
    transform: scale(1.05);
}

/* Hover overlay */
.wpew-card__image-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* ── Placeholder ───────────────────────────────────────────────────────── */
.wpew-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
}

.wpew-card__placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

/* ── Badges (top of image) ─────────────────────────────────────────────── */
.wpew-card__top-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}

.wpew-badge,
.wpew-series-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
    border-radius: 20px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ── Play Button ───────────────────────────────────────────────────────── */
.wpew-play-btn {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}

.wpew-play-btn:hover {
    transform: scale(1.08);
}

.wpew-play-btn svg {
    width: 40%;
    height: 40%;
    margin-left: 2px; /* optical centering of play triangle */
    fill: #222;
}

/* Position variants */
.wpew-play--bottom-left {
    bottom: 14px;
    left: 14px;
}

.wpew-play--bottom-right {
    bottom: 14px;
    right: 14px;
}

.wpew-play--center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.wpew-play--center:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

/* ── Card Body ─────────────────────────────────────────────────────────── */
.wpew-card__body {
    padding: 16px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* ── Title ─────────────────────────────────────────────────────────────── */
.wpew-card__title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.wpew-card__title a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wpew-card__title a:hover {
    color: #555;
}

/* ── Excerpt ───────────────────────────────────────────────────────────── */
.wpew-card__excerpt {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.55;
}

/* ── Meta Row ──────────────────────────────────────────────────────────── */
.wpew-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.wpew-card__date,
.wpew-card__duration {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Separator dot between meta items */
.wpew-card__meta > * + *::before {
    content: '·';
    margin-right: 10px;
    opacity: 0.5;
}

/* ── Listen Button ─────────────────────────────────────────────────────── */
.wpew-listen-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    margin-top: 8px;
    align-self: flex-start;
    transition: background 0.2s ease, color 0.2s ease;
}

.wpew-listen-btn:hover {
    background: #333;
    color: #fff;
}

/* ── No Results ────────────────────────────────────────────────────────── */
.wpew-no-results {
    color: #888;
    font-size: 14px;
    text-align: center;
    padding: 40px 0;
}

/* ── Responsive Defaults ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .wpew-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .wpew-grid {
        grid-template-columns: 1fr;
    }

    .wpew-card__body {
        padding: 12px 0 4px;
    }
}
