/* =====================================================
   ILYK — Подкасти
   themes/ilyk/css/podcast.css
   ===================================================== */


/* =====================================================
   СОРТУВАННЯ АРХІВУ ПОДКАСТІВ
   ===================================================== */
.ilyk-podcasts-sort {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.ilyk-podcasts-sort__buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ilyk-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    background: #f2f3f8;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border: none;
    cursor: pointer;
}
.ilyk-sort-btn:hover,
.ilyk-sort-btn.active {
    background: var(--ilyk-clr-primary);
    color: #fff;
}
.ilyk-sort-btn i { font-size: 12px; }


/* =====================================================
   SINGLE PODCAST PAGE — two-column balanced layout
   ===================================================== */

/* Кнопка назад */
.ilyk-podcast-single__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.ilyk-podcast-single__back:hover { color: var(--ilyk-clr-primary); }

/* Мета: дата + тривалість */
.ilyk-podcast-single__meta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
}
.ilyk-podcast-single__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #999;
}
.ilyk-podcast-single__meta i { color: var(--ilyk-clr-primary); font-size: 12px; }

/* Заголовок */
.ilyk-podcast-single__title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 24px;
    color: #111;
}

/* Сервіси */
.ilyk-podcast-single__services {
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Права колонка — sticky */
.ilyk-podcast-single__sidebar {
    position: sticky;
    top: 88px;
}

/* Обкладинка */
.ilyk-podcast-single__cover {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    margin-bottom: 16px;
}
.ilyk-podcast-single__cover img {
    width: 100%;
    height: auto;
    display: block;
}

/* Плеєр під обкладинкою — без розділювача */
.ilyk-podcast-single__player {
    margin: 0;
}

/* Адаптив — все до десктопу (< 992px Bootstrap lg breakpoint) */
@media (max-width: 991px) {
    .ilyk-podcast-single.pt-60 { padding-top: 15px; }
    .ilyk-podcast-single.pb-80 { padding-bottom: 48px; }

    .ilyk-podcast-single__title { font-size: 22px; }

    /* Ховаємо оригінальну праву колонку — замість неї мобільний блок */
    .ilyk-podcast-single__right { display: none; }

    /* Мобільний блок (вставлений у ліву колонку через PHP) */
    .ilyk-podcast-mobile-block {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 28px;
    }

    /* Обкладинка 16:9 */
    .ilyk-podcast-mobile-block .ilyk-podcast-single__cover {
        width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: 12px;
        margin-bottom: 0;
        overflow: hidden;
        box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    }
    .ilyk-podcast-mobile-block .ilyk-podcast-single__cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Плеєр — повна ширина */
    .ilyk-podcast-mobile-block .ilyk-podcast-single__player {
        width: 100%;
    }

    /* Share внизу — повна ширина */
    .ilyk-podcast-mobile-share {
        display: block;
        margin-top: 20px;
    }
    .ilyk-podcast-mobile-share .ilyk-article-share {
        margin-top: 0;
    }
}

/* На десктопі — мобільні блоки приховані, права колонка показується */
@media (min-width: 992px) {
    .ilyk-podcast-mobile-block { display: none; }
    .ilyk-podcast-mobile-share { display: none; }
}


/* =====================================================
   АРХІВ ПОДКАСТІВ — картки
   ===================================================== */

.ilyk-podcasts-archive-header { text-align: center; }
.ilyk-podcasts-archive-title {
    font-size: 38px;
    font-weight: 800;
    margin: 0 0 10px;
}
.ilyk-podcasts-archive-subtitle {
    font-size: 17px;
    color: #777;
    margin: 0;
}

/* --- Картка подкасту (archive) --- */
.ilyk-podcast-item {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    margin-bottom: 32px;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.2s;
}
.ilyk-podcast-item:hover {
    box-shadow: 0 8px 40px rgba(var(--ilyk-clr-primary-rgb), 0.13);
    transform: translateY(-2px);
}

/* Обкладинка */
.ilyk-podcast-item__cover {
    flex-shrink: 0;
    position: relative;
    background: #f5f5f5;
}
.ilyk-podcast-item__cover a {
    display: block;
    height: 100%;
}
.ilyk-podcast-item__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Тіло картки */
.ilyk-podcast-item__body {
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Мета */
.ilyk-podcast-item__meta {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ilyk-podcast-item__date,
.ilyk-podcast-item__duration {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #999;
}
.ilyk-podcast-item__date i,
.ilyk-podcast-item__duration i { color: var(--ilyk-clr-primary); }

/* Заголовок */
.ilyk-podcast-item__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}
.ilyk-podcast-item__title a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}
.ilyk-podcast-item__title a:hover { color: var(--ilyk-clr-primary); }

/* Ексерпт */
.ilyk-podcast-item__excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Адаптив --- */
@media (max-width: 767px) {
    .ilyk-podcast-item {
        grid-template-columns: 1fr;
    }
    .ilyk-podcast-item__cover img {
        min-height: 240px;
        max-height: 300px;
    }
    .ilyk-podcast-item__body {
        padding: 24px 20px;
    }
    .ilyk-podcasts-archive-title { font-size: 28px; }
}

/* --- Посилання на сервіси (архів і single) --- */
.ilyk-podcast-services {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.ilyk-podcast-service-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--svc-color, var(--ilyk-clr-primary));
    background: var(--svc-bg, #eef0ff);
    border-radius: 50px;
    padding: 6px 14px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    border: none;
}
.ilyk-podcast-service-link:hover {
    opacity: 0.82;
    transform: translateY(-1px);
    color: var(--svc-color, var(--ilyk-clr-primary));
}
.ilyk-podcast-service-link i {
    font-size: 15px;
}

/* Сервіси в картці архіву */
.ilyk-podcast-item__services {
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Кнопка "Детальніше" */
.ilyk-podcast-item__readmore {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ilyk-clr-primary);
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.2s;
}
.ilyk-podcast-item__readmore:hover { gap: 12px; color: var(--ilyk-clr-primary); }

/* Порожній стан */
.ilyk-podcasts-empty {
    text-align: center;
    padding: 80px 0;
    color: #aaa;
}
.ilyk-podcasts-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.4;
}

/* --- Плеєр (архів і single) --- */
.ilyk-podcast-player {
    margin-top: 8px;
}
.ilyk-player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f6ff;
    border-radius: 50px;
    padding: 8px 16px 8px 8px;
}

/* Кнопка play/pause */
.ilyk-player-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--ilyk-clr-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s, transform 0.15s;
}
.ilyk-player-btn:hover {
    background: var(--ilyk-clr-primary-hover);
    transform: scale(1.05);
}

/* Трек */
.ilyk-player-track {
    flex: 1;
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
}
.ilyk-player-range {
    width: 100%;
    position: relative;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    height: 20px;
}
.ilyk-player-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ilyk-clr-primary);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 3;
    margin-top: -5px;
}
.ilyk-player-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 50px;
    background: #dde0f7;
}
.ilyk-player-range::-moz-range-track {
    height: 4px;
    border-radius: 50px;
    background: #dde0f7;
}
.ilyk-player-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ilyk-clr-primary);
    border: 2px solid #fff;
    cursor: pointer;
}

/* Прогрес (підсвічування) */
.ilyk-player-progress {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--ilyk-clr-primary);
    border-radius: 50px;
    width: 0%;
    pointer-events: none;
    z-index: 1;
}

/* Час */
.ilyk-player-time {
    flex-shrink: 0;
    font-size: 12px;
    color: #888;
    font-weight: 500;
    white-space: nowrap;
}

/* --- Пагінація --- */
.ilyk-podcasts-pagination .nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.ilyk-podcasts-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    background: #f2f3f8;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.ilyk-podcasts-pagination .page-numbers.current,
.ilyk-podcasts-pagination .page-numbers:hover {
    background: var(--ilyk-clr-primary);
    color: #fff;
}
.ilyk-podcasts-pagination .page-numbers.dots {
    background: transparent;
}

/* --- Адаптив пагінації --- */
@media (max-width: 480px) {
    .ilyk-podcasts-pagination .page-numbers {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}


/* =====================================================
   КАРТКА ОПИСУ (single сторінка)
   ===================================================== */

.ilyk-podcast-desc-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 32px;
    position: relative;
    border-left: 4px solid var(--ilyk-clr-primary);
    height: fit-content;
    margin-bottom: 0;
}

/* Мобільний override: лінія зверху замість зліва */
@media (max-width: 575px) {
    .ilyk-podcast-desc-card {
        border-left: none;
        border-top: 4px solid var(--ilyk-clr-primary);
    }
}

.ilyk-podcast-desc-icon {
    width: 44px;
    height: 44px;
    background: var(--ilyk-clr-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
}

.ilyk-podcast-desc-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ilyk-clr-primary);
    margin: 0 0 16px;
}

.ilyk-podcast-desc-text {
    font-size: 16px;
    line-height: 1.75;
    color: #444;
}
.ilyk-podcast-desc-text p:last-child { margin-bottom: 0; }

.ilyk-podcast-single__left {
    padding-bottom: 0;
}

/* Sticky footer */
body.single-ilyk_podcast {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body.single-ilyk_podcast .ilyk-podcast-single {
    flex: 1 0 auto;
}
body.single-ilyk_podcast footer {
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .ilyk-podcast-single__right {
        margin-top: 32px;
    }
}


/* =====================================================
   ПОШИРЕННЯ (single сторінка)
   — стилі share-btn беруться з article.css,
     тут лише специфічний відступ для подкасту
   ===================================================== */
.ilyk-podcast-single__sidebar .ilyk-article-share {
    margin-top: 16px;
}
/*Розділювач між обкладинкою та плеєром*/
.ilyk-podcast-single__sidebar .ilyk-podcast-player {
    border-top: none;
    padding-top: 0;
}

/* =====================================================
   ШОРТКОД [ilyk_podcast id="…"] — вертикальна картка
   (всі селектори обмежені .ilyk-podcast-card щоб не
    перебивати стилі архіву і single сторінки)
   ===================================================== */

.ilyk-podcast-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}
.ilyk-podcast-card:hover {
    box-shadow: 0 12px 44px rgba(var(--ilyk-clr-primary-rgb), 0.15);
    transform: translateY(-4px);
}

/* Обкладинка */
.ilyk-podcast-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    height: auto;
    flex-shrink: 0;
    background: #f0f1f8;
}
.ilyk-podcast-thumb a {
    display: block;
    height: 100%;
}
.ilyk-podcast-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.ilyk-podcast-card:hover .ilyk-podcast-thumb img {
    transform: scale(1.06);
}

/* Тіло */
.ilyk-podcast-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    min-height: 130px;
}

/* Мета (тривалість) */
.ilyk-podcast-duration {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ilyk-clr-primary);
    background: #eef0ff;
    padding: 4px 10px;
    border-radius: 50px;
    align-self: flex-start;
}
.ilyk-podcast-duration i {
    font-size: 11px;
}

/* Заголовок */
.ilyk-podcast-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}
.ilyk-podcast-title a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}
.ilyk-podcast-title a:hover {
    color: var(--ilyk-clr-primary);
}

/* Ексерпт */
.ilyk-podcast-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Сервіси у шорткодовій картці */
.ilyk-podcast-card .ilyk-podcast-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}
.ilyk-podcast-card .ilyk-podcast-service-link {
    gap: 5px;
    font-size: 11px;
    padding: 4px 10px;
    color: var(--ilyk-clr-primary);
    background: #eef0ff;
    transition: background 0.2s, color 0.2s;
}
.ilyk-podcast-card .ilyk-podcast-service-link:hover {
    background: var(--ilyk-clr-primary);
    color: #fff;
    opacity: 1;
    transform: none;
}
.ilyk-podcast-card .ilyk-podcast-service-link i {
    font-size: 12px;
}

/* Плеєр у шорткодовій картці */
.ilyk-podcast-card .ilyk-podcast-player {
    margin-top: auto;
    padding-top: 8px;
}
.ilyk-podcast-card .ilyk-player-controls {
    gap: 10px;
    border-radius: 50px;
    padding: 8px 14px 8px 8px;
}
.ilyk-podcast-card .ilyk-player-btn {
    width: 36px;
    height: 36px;
    font-size: 13px;
}
.ilyk-podcast-card .ilyk-player-time {
    font-size: 11px;
}

@media (max-width: 480px) {
    .ilyk-podcast-body {
        padding: 16px 18px 18px;
    }
    .ilyk-podcast-title {
        font-size: 15px;
    }
    .ilyk-podcast-card .ilyk-player-controls {
        padding: 6px 10px 6px 6px;
        gap: 8px;
    }
    .ilyk-podcast-card .ilyk-player-btn {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
}