/* ==========================================================================
   HOME PAGE SPECIFIC STYLES
   ========================================================================== */

/* --- GLOBAL SKELETON BASE --- */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--background-secondary) 25%,
        var(--background-tertiary) 50%,
        var(--background-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* --- HERO SLIDER / BANNER --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 380px;
    max-height: 520px;
    margin-bottom: 30px;
    overflow: hidden;
    background-color: var(--background-secondary);
}

.hero-slider.skeleton {
    border-radius: 0;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--background-primary) 0%, rgba(10, 12, 15, 0.4) 60%, rgba(10, 12, 15, 0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.slide-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.slide-overview {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-primary);
    color: #000;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    width: fit-content;
    transition: var(--transition);
}

.slide-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.slider-controls {
    position: absolute;
    bottom: 16px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

/* --- MAIN LAYOUT & MEDIA ROWS --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px 24px 16px;
}

.is-hidden {
    display: none !important;
}

.section-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.scroll-arrows {
    display: flex;
    gap: 8px;
}

.arrow-btn {
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.arrow-btn:hover {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.media-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 28px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--background-tertiary) transparent;
}

.media-row::-webkit-scrollbar { height: 6px; }
.media-row::-webkit-scrollbar-thumb { background: var(--background-tertiary); border-radius: 4px; }

/* --- HOMEPAGE MEDIA CARD --- */
.media-card {
    flex: 0 0 140px;
    width: 140px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.media-card:hover { 
    transform: translateY(-4px); 
}

.poster-box {
    position: relative;
    width: 100%;
    height: 210px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--background-secondary);
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.media-card:hover .poster-box { 
    border-color: var(--accent-primary); 
}

.poster-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

.badge-container {
    position: absolute;
    top: 8px; left: 8px; right: 8px;
    display: flex; justify-content: space-between; align-items: center;
    pointer-events: none; z-index: 2;
}

.badge-type, .badge-year {
    font-size: 10px; font-weight: 700; padding: 3px 6px;
    border-radius: 4px; backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); text-transform: uppercase;
}
.badge-type { background: rgba(0, 230, 118, 0.85); color: #000; }
.badge-year { background: rgba(10, 12, 15, 0.75); color: var(--text-primary); border: 1px solid rgba(255, 255, 255, 0.15); }

.card-title { 
    font-size: 13px; 
    font-weight: 600; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.row-error-msg {
    color: var(--text-secondary);
    font-size: 13px;
}

/* --- SKELETON ANIMATIONS --- */
.skeleton-card { 
    flex: 0 0 140px; 
    width: 140px;
    display: flex; 
    flex-direction: column; 
    pointer-events: none; 
}

.skeleton-poster {
    width: 100%; 
    height: 210px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--background-secondary) 25%, var(--background-tertiary) 50%, var(--background-secondary) 75%);
    background-size: 200% 100%; 
    animation: shimmer 1.5s infinite;
    margin-bottom: 8px; 
    border: 1px solid var(--border-color);
}

.skeleton-title {
    height: 14px; 
    width: 75%; 
    border-radius: 4px;
    background: linear-gradient(90deg, var(--background-secondary) 25%, var(--background-tertiary) 50%, var(--background-secondary) 75%);
    background-size: 200% 100%; 
    animation: shimmer 1.5s infinite;
}

.footer-fallback-span {
    justify-content: center;
}

/* --- RESPONSIVE DESKTOP ADJUSTMENTS --- */
@media (min-width: 850px) {
    .media-card, .skeleton-card {
        flex: 0 0 150px;
        width: 150px;
    }

    .poster-box, .skeleton-poster {
        height: 225px;
    }
}

