/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    border: none;
    gap: 8px;
}

.btn:active {
    transform: scale(0.95);
}

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

.btn-primary:hover {
    background-color: #e04a62;
}

.btn-glass {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Icons */
.icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Cards */
.card-item {
    flex: 0 0 auto;
    width: 150px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, z-index 0s 0.3s;
    /* Delay z-index reset */
    z-index: 1;
}

@media (min-width: 768px) {
    .card-item {
        width: 220px;
    }
}

.card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 8px;
    /* Slightly tighter radius for cinematic feel */
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle premium border */
}

/* Hover Effect - Premium Pop */
.card-item:hover {
    z-index: 100;
    transition: transform 0.3s ease, z-index 0s;
}

.card-item:hover .card-poster {
    transform: scale(1.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

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

.card-item:hover .card-poster img {
    /* Optional slight zoom inside the poster for depth */
    transform: scale(1.05);
}

.card-title {
    margin-top: 12px;
    font-size: 0.95rem;
    color: #cbd5e1;
    /* Lighter text for better contrast */
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
    font-weight: 500;
}

.card-item:hover .card-title {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Hero Section */
.hero {
    position: relative;
    height: 55vh;
    /* Mobile-first efficiency */
    min-height: 400px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
}

/* ... existing code ... */

/* Hero Slider Logic */
.hero-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    /* Darken overlay built-in mask if needed, but we have .hero-overlay */
}

.hero-img.active {
    opacity: 1;
}

/* Gradient overlay at bottom of hero */
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    /* Taller gradient for better text readability */
    background: linear-gradient(to top, var(--color-bg) 10%, rgba(17, 18, 25, 0.8) 50%, transparent 100%);
    z-index: 1;
}

.hero-content {
    position: absolute;
    bottom: 20px;
    /* Lower on mobile */
    left: 20px;
    right: 20px;
    z-index: 10;
    max-width: 600px;
}

@media (min-width: 1024px) {
    .hero {
        height: 80vh;
        /* Desktop height */
    }

    .hero-content {
        left: 60px;
        bottom: 80px;
        right: auto;
    }
}

/* Improved Typography */
.hero-title {
    font-size: 2rem;
    /* Mobile optimized base */
    font-weight: 800;
    /* Extra bold for impact */
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
        /* Larger desktop scale */
        max-width: 800px;
    }
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
    .hero {
        height: 60vh;
        /* Reduce height to show more width (less crop) */
        min-height: 400px;
    }

    .hero-bg img {
        object-position: center top;
        /* Focus on faces/top part usually */
    }

    .hero-content {
        left: 20px;
        bottom: 80px;
        /* Lift up a bit */
        width: auto;
        right: 20px;
    }

    .hero-title {
        font-size: 2rem;
        /* Smaller title */
    }
}