/* ===================================
   Podcast Showcase Pro - Ultra Modern Styles
   Version: 2.1.1 - Corregido
   =================================== */

:root {
    --psp-primary: #FF6B6B;
    --psp-primary-dark: #FF4757;
    --psp-secondary: #4ECDC4;
    --psp-accent: #FFE66D;
    --psp-dark: #2D3436;
    --psp-light: #F7F9FC;
    --psp-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --psp-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --psp-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --psp-glass: rgba(255, 255, 255, 0.1);
    --psp-shadow-soft: 0 10px 40px rgba(0,0,0,0.08);
    --psp-shadow-hover: 0 20px 60px rgba(0,0,0,0.15);
}

/* ===================================
   ERROR MESSAGES
   =================================== */

.psp-error {
    background: #fff5f5;
    border: 1px solid #fc8181;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    color: #c53030;
}

.psp-error-message {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

.psp-error-message i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    color: #ddd;
}

/* ===================================
   SIDEBAR WIDGETS
   =================================== */

.psp-widget {
    background: white;
    border-radius: 20px;
    padding: 12px;
    margin-bottom: 25px;
    box-shadow: var(--psp-shadow-soft);
    position: relative;
    overflow: hidden;
}

.psp-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--psp-gradient-1);
}

/* Live Badge Animation */
.psp-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FF4757;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.psp-live-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* Episode Card Sidebar */
.psp-episode-card-sidebar {
    margin-top: 15px;
}

.psp-episode-image-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    aspect-ratio: 16/9;
}

.psp-episode-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.psp-episode-image-wrapper:hover img {
    transform: scale(1.05);
}

.psp-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.psp-episode-image-wrapper:hover .psp-play-overlay {
    opacity: 1;
}

.psp-play-btn {
    width: 60px;
    height: 60px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.psp-play-btn:hover {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.psp-play-btn i {
    font-size: 24px;
    margin-left: 3px;
    color: var(--psp-dark);
}

/* Stats Widget */
.psp-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Grid de 4 columnas para stats */
.psp-stat-grid-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 768px) {
    .psp-stat-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .psp-stat-grid-4 {
        grid-template-columns: 1fr !important;
    }
}

.psp-stat-item {
    text-align: center;
    padding: 15px;
    background: var(--psp-light);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.psp-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--psp-shadow-hover);
}

.psp-stat-number {
    font-size: 18px;
    font-weight: 800;
    background: var(--psp-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.psp-stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.psp-stat-item.psp-highlight {
    background: var(--psp-gradient-2);
}

.psp-stat-item.psp-highlight .psp-stat-number,
.psp-stat-item.psp-highlight .psp-stat-label {
    color: white;
    -webkit-text-fill-color: white;
}

/* Mini List */
.psp-mini-list {
    margin-top: 15px;
}

.psp-mini-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--psp-light);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.psp-mini-item:hover {
    background: white;
    box-shadow: var(--psp-shadow-soft);
    transform: translateX(5px);
}

.psp-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--psp-gradient-1);
    color: white;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.psp-mini-content {
    flex: 1;
    min-width: 0;
}

.psp-mini-content a {
    display: block;
    color: var(--psp-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 3px;
}

.psp-mini-content a:hover {
    color: var(--psp-primary);
}

.psp-mini-podcast {
    font-size: 12px;
    color: #999;
    display: block;
}

/* Mini play button */
.psp-mini-play {
    width: 32px;
    height: 32px;
    background: var(--psp-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.psp-mini-play:hover {
    transform: scale(1.1);
    background: var(--psp-primary-dark);
}

.psp-mini-play i {
    font-size: 12px;
}

/* ===================================
   PLACEHOLDER IMAGES - MEJORADO
   =================================== */

.psp-placeholder-image,
.psp-logo-placeholder,
.psp-timeline-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--psp-gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    position: relative;
    overflow: hidden;
}

/* Específico para placeholders dentro de wrappers de imagen */
.psp-episode-image-wrapper .psp-placeholder-image {
    position: static;
}

.psp-placeholder-image::before,
.psp-logo-placeholder::before,
.psp-timeline-image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.psp-placeholder-image i,
.psp-logo-placeholder i,
.psp-timeline-image-placeholder i {
    font-size: 48px;
    color: white;
    opacity: 0.8;
    z-index: 1;
    position: relative;
}

.psp-timeline-image-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    flex-shrink: 0;
}

.psp-timeline-image-placeholder i {
    font-size: 32px;
}

.psp-logo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 20px;
}

.psp-logo-placeholder i {
    font-size: 40px;
}

/* ===================================
   HOMEPAGE HERO GRID
   =================================== */

.psp-hero-grid {
    padding: 10px 0;
}

.psp-hero-header {
    text-align: center;
    margin-bottom: 50px;
}

.psp-hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
}

.psp-gradient-text {
    background: var(--psp-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.psp-hero-subtitle {
    font-size: 18px;
    color: #666;
}

/* Grid Container */
.psp-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Grid columns específicas */
.psp-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.psp-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.psp-grid-cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.psp-grid-cols-5 {
    grid-template-columns: repeat(5, 1fr) !important;
}

.psp-grid-cols-6 {
    grid-template-columns: repeat(6, 1fr) !important;
}

@media (max-width: 1200px) {
    .psp-grid-cols-5,
    .psp-grid-cols-6 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .psp-grid-cols-4,
    .psp-grid-cols-5,
    .psp-grid-cols-6 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .psp-grid-cols-3,
    .psp-grid-cols-4,
    .psp-grid-cols-5,
    .psp-grid-cols-6 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .psp-grid-container,
    .psp-grid-cols-2,
    .psp-grid-cols-3,
    .psp-grid-cols-4,
    .psp-grid-cols-5,
    .psp-grid-cols-6 {
        grid-template-columns: 1fr !important;
    }
}

/* Modern Card - MEJORADO */
.psp-card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.psp-card-modern:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.psp-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--psp-light);
}

.psp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.psp-card-modern:hover .psp-card-image img {
    transform: scale(1.05);
}

.psp-card-image .psp-placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Card Overlay MEJORADO para mejor visibilidad del botón */
.psp-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.psp-card-modern:hover .psp-card-overlay {
    opacity: 1;
}

/* Play Floating Button CORREGIDO */
.psp-play-floating {
    width: 60px;
    height: 60px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    color: var(--psp-dark);
    transform: scale(0.9);
    position: relative;
    z-index: 11;
}

.psp-play-floating:hover {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.psp-play-floating i {
    font-size: 24px;
    margin-left: 3px;
    color: var(--psp-primary);
}

.psp-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--psp-gradient-2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 12;
}

.psp-card-content {
    padding: 20px;
}

.psp-card-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.psp-card-title a {
    color: var(--psp-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.psp-card-title a:hover {
    color: var(--psp-primary);
}

.psp-card-podcast {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* Load More Button */
.psp-grid-footer {
    text-align: center;
    margin-top: 50px;
}

.psp-btn-load-more {
    background: var(--psp-gradient-1);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.psp-btn-load-more:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.psp-btn-load-more::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.psp-btn-load-more:hover::before {
    width: 300px;
    height: 300px;
}

.psp-btn-loading {
    display: none;
}

.psp-btn-load-more.loading .psp-btn-text {
    display: none;
}

.psp-btn-load-more.loading .psp-btn-loading {
    display: inline-block;
}

.psp-spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.psp-spinner circle {
    stroke-dasharray: 50;
    stroke-dashoffset: 12.5;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dashoffset: 50; }
    50% { stroke-dashoffset: 12.5; }
    100% { stroke-dashoffset: 50; }
}

/* ===================================
   CAROUSEL SECTION
   =================================== */

.psp-carousel-section {
    padding: 60px 0;
    background: var(--psp-light);
    border-radius: 30px;
    margin: 40px 0;
    position: relative;
}

.psp-carousel-header {
    text-align: center;
    margin-bottom: 40px;
}

.psp-carousel-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--psp-dark);
}

.psp-logo-carousel {
    padding: 0 60px;
    position: relative;
}

/* Swiper overrides para mejorar espaciado */
.psp-logo-carousel .swiper-wrapper {
    align-items: center;
}

.psp-logo-carousel .swiper-slide {
    height: auto;
    padding: 10px;
}

.psp-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 15px;
    transition: transform 0.3s ease;
}

.psp-logo-item:hover {
    transform: translateY(-5px);
}

.psp-logo-wrapper {
    width: 120px;
    height: 120px;
    position: relative;
    margin-bottom: 15px;
}

.psp-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.psp-logo-item:hover img {
    transform: scale(1.1) rotate(3deg);
}

.psp-logo-glow {
    position: absolute;
    inset: -10px;
    background: var(--psp-gradient-3);
    border-radius: 25px;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.psp-logo-item:hover .psp-logo-glow {
    opacity: 0.5;
}

.psp-logo-title {
    font-size: 14px;
    color: var(--psp-dark);
    text-align: center;
    margin: 0;
    font-weight: 600;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Swiper Navigation */
.psp-logo-carousel .swiper-button-next,
.psp-logo-carousel .swiper-button-prev {
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.psp-logo-carousel .swiper-button-next:hover,
.psp-logo-carousel .swiper-button-prev:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.psp-logo-carousel .swiper-button-next:after,
.psp-logo-carousel .swiper-button-prev:after {
    font-size: 20px;
    color: var(--psp-dark);
    font-weight: bold;
}

.psp-logo-carousel .swiper-pagination {
    bottom: -30px;
}

.psp-logo-carousel .swiper-pagination-bullet {
    background: var(--psp-primary);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.psp-logo-carousel .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.3);
}

/* ===================================
   TIMELINE
   =================================== */

.psp-timeline-section {
    padding: 60px 0;
}

.psp-timeline-title {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    background: var(--psp-gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.psp-timeline {
    position: relative;
    padding-left: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.psp-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--psp-gradient-1), var(--psp-gradient-2));
}

.psp-timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.psp-timeline-marker {
    position: absolute;
    left: -30px;
}

.psp-timeline-dot {
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--psp-primary);
    border-radius: 50%;
    position: relative;
}

.psp-timeline-dot::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 50%;
    animation: ping 2s infinite;
}

@keyframes ping {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0; }
}

.psp-timeline-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.psp-timeline-date {
    min-width: 60px;
    padding: 8px 12px;
    background: var(--psp-gradient-1);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
}

.psp-timeline-card {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--psp-shadow-soft);
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
}

.psp-timeline-card:hover {
    transform: translateX(10px);
    box-shadow: var(--psp-shadow-hover);
}

.psp-timeline-image {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    object-fit: cover;
    flex-shrink: 0;
}

.psp-timeline-info {
    flex: 1;
    min-width: 0;
}

.psp-timeline-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.psp-timeline-info h3 a {
    color: var(--psp-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.psp-timeline-info h3 a:hover {
    color: var(--psp-primary);
}

.psp-timeline-info p {
    color: #999;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.psp-timeline-play {
    background: var(--psp-gradient-1);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.psp-timeline-play:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.psp-timeline-play i {
    font-size: 12px;
}

/* ===================================
   WIDGET HEADER
   =================================== */

.psp-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.psp-widget-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--psp-dark);
}

.psp-widget-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--psp-dark);
}

.psp-episode-info {
    margin-top: 15px;
}

.psp-episode-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--psp-dark);
}

.psp-podcast-name {
    color: #999;
    font-size: 14px;
    margin: 0 0 10px 0;
    display: block;
}

.psp-listen-link {
    color: var(--psp-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.psp-listen-link:hover {
    color: var(--psp-primary-dark);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .psp-hero-title {
        font-size: 32px;
    }
    
    .psp-timeline {
        padding-left: 30px;
    }
    
    .psp-timeline-content {
        flex-direction: column;
    }
    
    .psp-timeline-card {
        flex-direction: column;
    }
    
    .psp-timeline-image {
        width: 100%;
        height: 200px;
    }
    
    .psp-logo-carousel {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .psp-stat-grid {
        grid-template-columns: 1fr;
    }
    
    .psp-carousel-section {
        padding: 40px 20px;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.psp-grid-item {
    animation: fadeInUp 0.6s ease both;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --psp-light: #1a1a1a;
        --psp-dark: #f0f0f0;
    }
    
    .psp-widget {
        background: #2a2a2a;
        color: #f0f0f0;
    }
    
    .psp-card-modern {
        background: #2a2a2a;
    }
    
    .psp-stat-item {
        background: #333;
    }
    
    .psp-mini-item {
        background: #333;
    }
    
    .psp-timeline-card {
        background: #2a2a2a;
    }
}