/* ===============================================
   PODCAST PAGE - CSS COMPLETO CON SERIE SYSTEM
   =============================================== */

/* === BANNER FULL WIDTH PODCAST === */
.podcast-full-width-ad-section {
    width: calc(100vw - 40px);
    margin: 20px 0;
    padding: 0;
    position: relative;
    left: 63%;
    right: 67%;
    margin-left: calc(-50vw + 20px);
    margin-right: calc(-50vw + 20px);
}

.podcast-full-width-ad-container {
    width: 75%;
    max-width: none;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
    position: relative;
}

.podcast-full-width-ad-content {
    display: flex;
    align-items: center;
    min-height: 400px;
    position: relative;
    padding: 0;
}

.podcast-full-width-ad-image {
    flex: 1;
    max-width: 50%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.podcast-ad-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.podcast-full-width-ad-container:hover .podcast-ad-bg-image {
    transform: scale(1.05);
}

.podcast-full-width-ad-text {
    flex: 1;
    padding: 40px 50px;
    color: white;
    position: relative;
    z-index: 2;
}

.podcast-ad-badge-full {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.podcast-full-width-ad-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.podcast-full-width-ad-description {
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 24px 0;
    opacity: 0.95;
    font-weight: 400;
}

.podcast-full-width-ad-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 32px 0;
}

.podcast-ad-feature {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.podcast-ad-feature:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.podcast-full-width-ad-cta {
    display: inline-flex;
    align-items: center;
    background: white;
    color: #667eea;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.podcast-full-width-ad-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.podcast-full-width-ad-cta:hover::before {
    left: 100%;
}

.podcast-full-width-ad-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    color: #5a67d8;
}

/* TUTTO IL CSS ORIGINALE RIMANE IDENTICO */

/* ===============================================
   HEADER PAGINA PODCAST
   =============================================== */
.podcast-header {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.podcast-title-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
}

.podcast-title {
    color: var(--color-text);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px 0;
}

.podcast-subtitle {
    color: var(--color-secondary);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 32px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.podcast-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    color: var(--color-primary);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    color: var(--color-secondary);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===============================================
   FILTRI PODCAST (IDENTICI)
   =============================================== */
.podcast-filters {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 0 16px;
}

.filters-primary {
    margin-bottom: 20px;
}

.filters-categories {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: var(--color-secondary);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(45, 90, 61, 0.05);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.filters-secondary {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 180px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

/* ===============================================
   GRIGLIA PODCAST (IDENTICA)
   =============================================== */
.podcast-grid-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 16px;
}

.podcast-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* ===============================================
   CARD PODCAST SERIE - MANTIENE DESIGN ORIGINALE
   =============================================== */
.podcast-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.podcast-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===============================================
   COVER PODCAST CON BADGE EPISODI - NUOVO
   =============================================== */
.podcast-cover {
    position: relative;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f8f9fa;
    overflow: hidden;
}

.podcast-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.podcast-card:hover .podcast-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.podcast-play-btn:hover {
    background: white;
    color: var(--color-dark);
}

/* BADGE CATEGORIA E EPISODI - RIMOSSI DALLA COVER
   Spostati come metadata sotto descrizione per UX migliore */

/* ===============================================
   INFO PODCAST SERIE
   =============================================== */
.podcast-info {
    padding: 20px;
}

.podcast-title {
    color: var(--color-text);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podcast-description {
    color: var(--color-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.podcast-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.podcast-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.author-name {
    color: var(--color-text);
    font-size: 13px;
    font-weight: 500;
}

.podcast-date {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 400;
}

/* METADATA LINE - Sotto la descrizione */
.podcast-metadata {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.metadata-badge {
    background: #f1f5f9;
    color: var(--color-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.metadata-badge.category {
    background: var(--color-primary);
    color: white;
}

.metadata-item {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metadata-separator {
    color: #d1d5db;
    font-weight: 300;
}

/* Loading Placeholder */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--color-secondary);
    font-size: 16px;
}

/* ===============================================
   MODAL SERIE PODCAST - NUOVO
   =============================================== */
.series-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.series-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 90vw;
    max-height: 90vh;
    width: 900px;
    overflow: hidden;
}

.series-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.series-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
}

.series-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.series-modal-close:hover {
    background: #f1f5f9;
    color: var(--color-primary);
}

.series-modal-body {
    padding: 24px 32px 32px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Info Serie */
.series-info {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    align-items: flex-start;
}

.series-cover-large {
    width: 200px;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.series-details {
    flex: 1;
}

.series-details h4 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
}

.series-details p {
    margin: 0 0 16px 0;
    color: var(--color-secondary);
    line-height: 1.6;
}

.series-meta {
    display: flex;
    gap: 16px;
    color: var(--color-secondary);
    font-size: 14px;
}

.series-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Lista Episodi */
.episodes-list h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 8px;
}

.episodes-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.episode-item:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.episode-number {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.episode-content {
    flex: 1;
    min-width: 0;
}

.episode-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.episode-description {
    font-size: 14px;
    color: var(--color-secondary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.episode-duration {
    font-size: 12px;
    color: var(--color-secondary);
    font-weight: 500;
    flex-shrink: 0;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
}

.episode-play-btn {
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.episode-play-btn:hover {
    background: var(--color-dark);
    transform: scale(1.05);
}

/* ===============================================
   PLAYER FISSO (MANTIENE DESIGN ORIGINALE)
   =============================================== */
.podcast-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.player-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.player-text {
    flex: 1;
    min-width: 0;
}

.player-title {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-author {
    color: var(--color-secondary);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.control-btn:hover {
    background: rgba(45, 90, 61, 0.1);
    color: var(--color-primary);
}

.play-pause-btn {
    background: var(--color-primary);
    color: white;
    font-size: 18px;
}

.play-pause-btn:hover {
    background: var(--color-dark);
    color: white;
}

.player-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
}

.time-current,
.time-total {
    color: var(--color-secondary);
    font-size: 12px;
    font-weight: 500;
    min-width: 35px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    width: 30%;
    transition: width 0.1s ease;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.volume-btn {
    font-size: 14px;
}

.volume-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    width: 70%;
}

.player-close {
    background: none;
    border: none;
    color: var(--color-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.player-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ===============================================
   LOADING E PAGINAZIONE (ORIGINALI)
   =============================================== */
.podcast-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    color: var(--color-secondary);
    font-size: 14px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.podcast-pagination {
    text-align: center;
    padding: 40px 0;
}

.pagination-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: var(--color-dark);
    transform: translateY(-2px);
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 1024px) {
    .podcast-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }

    .series-modal-content {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .podcast-title {
        font-size: 36px;
    }

    .podcast-subtitle {
        font-size: 18px;
    }

    .podcast-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 24px;
    }

    .filters-categories {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .filters-secondary {
        gap: 12px;
    }

    .filter-select {
        font-size: 13px;
        padding: 10px 12px;
        min-width: 140px;
    }

    .podcast-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }

    .podcast-cover {
        height: 160px;
    }

    .podcast-info {
        padding: 16px;
    }

    .podcast-title {
        font-size: 16px;
    }

    .podcast-description {
        font-size: 13px;
    }

    /* Modal responsive */
    .series-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .series-modal-body {
        padding: 20px 24px 24px;
    }

    .series-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .series-cover-large {
        width: 160px;
        height: 160px;
    }

    /* Player mobile */
    .podcast-player {
        padding: 12px 16px;
        gap: 12px;
    }

    .player-info {
        min-width: 120px;
    }

    .player-cover {
        width: 40px;
        height: 40px;
    }

    .player-progress {
        max-width: 200px;
    }

    .player-volume {
        display: none;
    }

    .time-current,
    .time-total {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .podcast-header {
        padding: 40px 0 30px;
    }

    .podcast-title {
        font-size: 28px;
    }

    .podcast-subtitle {
        font-size: 16px;
    }

    .podcast-stats {
        flex-direction: column;
        gap: 16px;
    }

    .filters-categories {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
    }

    .filters-categories::-webkit-scrollbar {
        display: none;
    }

    .filters-secondary {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .podcast-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }

    .series-modal-header {
        padding: 20px 24px 12px;
    }

    .episode-item {
        padding: 12px;
        gap: 12px;
    }

    .episode-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .episode-play-btn {
        width: 36px;
        height: 36px;
    }

    /* Player mobile molto piccolo */
    .player-progress {
        max-width: 120px;
    }

    .player-controls {
        gap: 8px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .play-pause-btn {
        font-size: 16px;
    }
}