/* Podcasts Homepage Styles */

/* Categories Section */
#categories-section {
    margin-bottom: 30px;
}

.categories-title {
    color: #ea7066;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

#categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.category-card {
    background: white;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0;
    text-align: center;
    text-decoration: none !important;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.category-card:hover {
    text-decoration: none !important;
    border-color: #84bed6;
}

.category-thumbnails {
    display: grid;
    gap: 2px;
    background: #f8f9fa;
    height: 120px;
    overflow: hidden;
}

/* 1 thumbnail - full width */
.category-thumbnails img:first-child:last-child {
    grid-column: 1 / -1;
}

/* 2 thumbnails - 2 columns */
.category-thumbnails img:first-child:nth-last-child(2),
.category-thumbnails img:first-child:nth-last-child(2) ~ img {
    grid-column: span 1;
}

.category-thumbnails:has(img:first-child:nth-last-child(2)) {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 thumbnails - 3 columns */
.category-thumbnails:has(img:first-child:nth-last-child(3)) {
    grid-template-columns: repeat(3, 1fr);
}

/* 6 thumbnails - 3x2 grid */
.category-thumbnails:has(img:nth-child(6)) {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.category-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-icon {
    font-size: 48px;
    padding: 30px 20px;
    display: block;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-name {
    color: #ea7066;
    font-size: 17px;
    font-weight: 600;
    margin: 15px 20px 0 20px;
    display: block;
}

.category-count {
    color: #999;
    font-size: 14px;
    display: block;
    margin: 0 20px 15px 20px;
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (max-width: 768px) {
    #categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 576px) {
    #categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-thumbnails {
        height: 100px;
    }

    .category-icon {
        font-size: 36px;
        padding: 20px 15px;
        height: 100px;
    }

    .category-name {
        font-size: 14px;
        margin: 12px 15px 4px 15px;
    }

    .category-count {
        font-size: 12px;
        margin: 0 15px 12px 15px;
    }
}

/* Hero Section */
#hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    border: 2px solid #84bed6;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(132, 190, 214, 0.15);
}

#hero-content {
    display: flex;
    gap: 20px;
    padding: 20px;
}

#hero-thumbnail {
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

#hero-thumbnail img {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

#hero-thumbnail-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#hero-thumbnail-badges .badge {
    font-size: 10px;
    padding: 4px 8px;
    background: rgba(132, 190, 214, 0.95) !important;
    backdrop-filter: blur(4px);
}

#hero-info {
    flex-grow: 1;
    min-width: 0;
}

#hero-badge {
    display: inline-block;
    background: #ea7066;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

#hero-title {
    color: #ea7066;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

#hero-description {
    color: #555;
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#hero-meta .badge {
    font-size: 11px;
    padding: 5px 10px;
}

#hero-duration {
    color: #999;
    font-size: 12px;
    font-family: monospace;
}

/* Hero CTA */
#hero-section {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

#hero-section:hover {
    text-decoration: none;
    color: inherit;
}

#hero-section:hover #hero-thumbnail img {
    transform: scale(1.05);
}

/* Filter Chips */
#filter-section {
    margin-bottom: 15px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.filter-chip {
    padding: 5px 12px;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    background: white;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: #84bed6;
    color: #84bed6;
}

.filter-chip.active {
    background: #84bed6;
    color: white;
    border-color: #84bed6;
}

/* Podcast Grid */
#podcast-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

/* Podcast Card */
.podcast-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    height: 130px;
}

.podcast-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 100%;
}

.card-thumbnail {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    overflow: hidden;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.podcast-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: white;
    font-size: 11px;
    font-family: monospace;
    padding: 4px 8px;
    border-radius: 3px;
}

.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
}

.card-title {
    color: #ea7066;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.card-description {
    color: #555;
    font-size: 14px;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.card-meta-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-meta-badges .badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 3px;
    background: #84bed6 !important;
    color: white;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 576px) {
    #podcast-grid {
        grid-template-columns: 1fr;
    }

    #hero-content {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    #hero-thumbnail {
        width: 100%;
        border-radius: 0;
    }

    #hero-thumbnail img {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        border-radius: 0;
    }

    #hero-thumbnail-badges {
        flex-direction: row;
        flex-wrap: wrap;
    }

    #hero-info {
        padding: 15px;
        text-align: center;
    }

    #hero-meta {
        justify-content: center;
    }

    #hero-title {
        font-size: 18px;
    }

    #hero-description {
        font-size: 13px;
    }

    .filter-chips {
        justify-content: center;
    }
}
