/**
 * Thanos Theme - Hero Section
 *
 * Full-width hero slider with featured videos
 * @package Thanos_Theme
 */

/* ==========================================================================
   Hero Container
   ========================================================================== */

.thanos-hero {
    position: relative;
    width: 100%;
    height: var(--slider-height, 70vh);
    min-height: 450px;
    max-height: 750px;
    margin-bottom: 40px;
    overflow: hidden;
}

/* Slider Styles from Customizer */
.thanos-hero.slider-style-boxed {
    max-width: var(--thanos-container, 1400px);
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--thanos-radius-lg, 12px);
}

.thanos-hero.slider-style-overlay .hero-content {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .thanos-hero {
        height: 60vh;
        min-height: 350px;
        max-height: 500px;
        margin-bottom: 24px;
    }
}

/* ==========================================================================
   Hero Slider
   ========================================================================== */

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* ==========================================================================
   Hero Background
   ========================================================================== */

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Gradient overlay */
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.3) 60%,
        transparent 100%
    );
}

/* Bottom gradient */
.hero-background::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(
        to top,
        var(--color-background, #0f0f1a) 0%,
        transparent 100%
    );
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-background::after {
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.7) 40%,
            rgba(0, 0, 0, 0.3) 70%,
            transparent 100%
        );
    }
}

/* ==========================================================================
   Hero Content
   ========================================================================== */

.hero-content {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 100%;
    padding: 0 40px;
    z-index: 3;
}

.hero-content-inner {
    max-width: 650px;
}

@media (max-width: 768px) {
    .hero-content {
        bottom: 40px;
        padding: 0 20px;
    }

    .hero-content-inner {
        max-width: 100%;
    }
}

/* Tags */
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-tag.tag-hd {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
}

.hero-tag.tag-vietsub {
    background: linear-gradient(135deg, #00c853, #00e676);
    color: #000;
}

.hero-tag.tag-new {
    background: var(--color-primary, #e91e63);
}

/* Title */
.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin: 0 0 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-title a {
    color: inherit;
    text-decoration: none;
}

.hero-title a:hover {
    color: var(--color-primary, #e91e63);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
        margin-bottom: 12px;
    }
}

/* Meta info */
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Description */
.hero-description {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-description {
        font-size: 14px;
        -webkit-line-clamp: 2;
        margin-bottom: 20px;
    }
}

/* Buttons */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.hero-btn svg {
    width: 20px;
    height: 20px;
}

.hero-btn-primary {
    background: var(--color-primary, #e91e63);
    color: #fff;
}

.hero-btn-primary:hover {
    background: var(--color-primary-dark, #c2185b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .hero-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ==========================================================================
   Hero Navigation
   ========================================================================== */

.hero-nav {
    position: absolute;
    bottom: 30px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10;
}

@media (max-width: 768px) {
    .hero-nav {
        bottom: auto;
        top: 20px;
        right: 20px;
    }
}

/* Dots */
.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.hero-dot.active {
    width: 30px;
    border-radius: 5px;
    background: var(--color-primary, #e91e63);
}

/* Arrows */
.hero-arrows {
    display: flex;
    gap: 8px;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-arrow svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .hero-arrows {
        display: none;
    }
}

/* ==========================================================================
   Hero Progress Bar
   ========================================================================== */

.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.hero-progress-bar {
    height: 100%;
    background: var(--color-primary, #e91e63);
    width: 0;
    transition: width 0.1s linear;
}

.hero-slider.paused .hero-progress-bar {
    animation-play-state: paused;
}

/* ==========================================================================
   Continue Watching Section (Special Hero Variant)
   ========================================================================== */

.hero-continue-watching {
    position: absolute;
    bottom: 100px;
    right: 40px;
    width: 320px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 16px;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.continue-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
}

.continue-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.continue-close:hover {
    color: #fff;
}

.continue-video {
    display: flex;
    gap: 12px;
    text-decoration: none;
}

.continue-thumb {
    position: relative;
    width: 100%;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.continue-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.continue-thumb .progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--color-primary, #e91e63);
}

.continue-info {
    flex: 1;
    min-width: 0;
}

.continue-video-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.continue-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1024px) {
    .hero-continue-watching {
        display: none;
    }
}

/* ==========================================================================
   Mini Hero (For category pages)
   ========================================================================== */

.thanos-hero.hero-mini {
    height: 300px;
    min-height: 250px;
    max-height: 350px;
}

.hero-mini .hero-content {
    bottom: 40px;
}

.hero-mini .hero-title {
    font-size: 32px;
}

@media (max-width: 768px) {
    .thanos-hero.hero-mini {
        height: 200px;
        min-height: 180px;
    }

    .hero-mini .hero-title {
        font-size: 24px;
    }
}
