/**
 * Netflix Style Components for Olhar TV
 */

/* Layout & Spacing */
.netflix-container {
    padding-bottom: 50px;
    background-color: #141414;
    /* Netflix dark background */
    min-height: 100vh;
}

/* Hero Section */
.hero-movie {
    position: relative;
    height: 80vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    /* Spacing between sections */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(to top, #141414 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-left: 4%;
    max-width: 600px;
    color: white;
}

.hero-category {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-play {
    background-color: var(--color-primary);
    color: white;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-play:hover {
    background-color: var(--color-primary-dark);
    transform: scale(1.05);
}

.btn-more {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
    padding: 12px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.btn-more:hover {
    background-color: rgba(109, 109, 110, 0.4);
    transform: scale(1.05);
}

/* Category Sliders */
.category-row {
    padding: 20px 0 40px;
    position: relative;
    z-index: 10;
    overflow: visible;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e5e5e5;
    margin-bottom: 15px;
    padding-left: 4%;
    cursor: pointer;
    transition: color 0.3s;
}

.category-title:hover {
    color: white;
}

.slider-container {
    position: relative;
    padding: 0 4%;
}

.slider-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-behavior: smooth;
    padding: 20px 0 60px;
    /* Extra padding for scaling */
    margin: -20px 0 -40px;
    scrollbar-width: none;
    /* Firefox */
}

.slider-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.video-card-netflix {
    flex: 0 0 250px;
    /* Fixed width for cards */
    aspect-ratio: 16/9;
    background-color: #222;
    border-radius: 4px;
    position: relative;
    transition: transform 0.3s ease, z-index 0.3s;
    cursor: pointer;
    z-index: 1;
}

.video-card-netflix img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Card Hover Effect */
.video-card-netflix:hover {
    transform: scale(1.4);
    z-index: 100;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.video-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.video-card-netflix:hover .video-info-overlay {
    opacity: 1;
}

.card-title-sm {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.card-meta-sm {
    font-size: 0.6rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Slider Controls */
.slider-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    border: none;
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.slider-container:hover .slider-arrow {
    opacity: 1;
}

.slider-arrow.left {
    left: 0;
}

.slider-arrow.right {
    right: 0;
}

.slider-arrow svg {
    width: 30px;
    height: 30px;
}


/* Responsive */
@media (max-width: 768px) {
    .video-card-netflix {
        flex: 0 0 160px;
    }

    .hero-title {
        font-size: 2rem;
        /* Smaller font for mobile to avoid overflow */
        margin-bottom: 1rem;
    }

    .hero-movie {
        min-height: 60vh;
        /* changed from fixed height to min-height */
        height: auto;
        padding-top: 80px;
        /* Add padding for header */
        padding-bottom: 40px;
        margin-bottom: 30px;
        align-items: flex-end;
        /* Align content to bottom on mobile often looks better */
    }

    .hero-content {
        max-width: 100%;
        padding-right: 4%;
    }

    .video-card-netflix:hover {
        transform: scale(1.05);
        /* Minimal scale on mobile to avoid layout shifts or cutoff */
        z-index: 100;
    }

    .slider-arrow {
        display: none;
        /* Hide arrows on mobile (touch scroll) */
    }

    .slider-track {
        padding-left: 20px;
        padding-right: 20px;
        /* Reduce negative margins on mobile to avoid overlap */
        padding-bottom: 30px;
        margin-bottom: -20px;
    }

    .category-row {
        padding: 10px 0 20px;
    }

    .category-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
        padding-left: 20px;
        /* Align with slider track padding */
    }
}

/* Adjust general spacing for desktop too */
.category-row {
    padding: 30px 0 50px;
    /* More breathing room */
    position: relative;
    z-index: 10;
}