/* ========================================
   Hero Section – Antigravity Cinematic
   Parallax depth layers, poster + text layout
   ======================================== */

.hero-section {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: -20px;
    margin-bottom: 0;
    height: 85vh;
    min-height: 520px;
    max-height: 900px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Parallax background layer --- */
.ag-hero-bg-layer {
    z-index: 0;
    transform: scale(1.08);
    transition: transform 0.15s linear;
}

/* --- Slides --- */
.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.4s ease-in-out, transform 8s ease-out;
    will-change: opacity, transform;
    transform: scale(1.05);
    filter: brightness(0.45) saturate(0.7);
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

/* --- Vignette overlay (obsidian dark edges) --- */
.hero-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.5) 50%, rgba(10, 10, 10, 0.9) 100%),
        linear-gradient(to bottom,
            transparent 0%,
            rgba(10, 10, 10, 0) 40%,
            rgba(10, 10, 10, 0.5) 70%,
            rgba(10, 10, 10, 0.9) 90%,
            #080808 100%),
        linear-gradient(to right,
            rgba(10, 10, 10, 0.8) 0%,
            transparent 40%,
            transparent 60%,
            rgba(10, 10, 10, 0.8) 100%);
    pointer-events: none;
}

/* ═══ Content wrapper: poster + text side-by-side ═══ */
.ag-hero-content-wrapper {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 50px;
    width: 100%;
    max-width: 1200px;
    padding: 0 60px;
    direction: rtl;
    animation: heroFadeInDown 0.7s ease-out both;
}

/* --- Poster column --- */
.ag-hero-poster-col {
    flex-shrink: 0;
}

.ag-hero-poster {
    width: 260px;
    height: 380px;
    overflow: hidden;
    border: 2px solid rgba(212, 168, 83, 0.2);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(212, 168, 83, 0.08);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
    animation: agHeroPosterFloat 6s ease-in-out infinite;
}

.ag-hero-poster:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(212, 168, 83, 0.15);
    border-color: rgba(212, 168, 83, 0.35);
}

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

.ag-hero-poster-img {
    transform-origin: center center;
    will-change: transform;
    animation: agHeroPosterZoomOut 8s linear forwards;
}

@keyframes agHeroPosterFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes agHeroPosterZoomOut {
    from { transform: scale(1.12); }
    to { transform: scale(1); }
}

/* --- Text block --- */
.ag-hero-text-block {
    flex: 1;
    text-align: right;
    direction: rtl;
    min-width: 0;
}

/* Badge */
.hero-badge {
    display: inline-block;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 0px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    backdrop-filter: blur(var(--blur-glass));
}

.hero-welcome {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: var(--accent-primary);
    opacity: 0.85;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.hero-welcome-icon {
    margin-left: 6px;
    opacity: 0.7;
    color: var(--accent-primary);
}

.hero-title {
    font-family: 'Arimo', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 0 80px rgba(212, 168, 83, 0.12);
    letter-spacing: 2px;
    line-height: 1.15;
}

/* Rating badge */
.ag-hero-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 700;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(212, 168, 83, 0.15);
    padding: 5px 14px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

/* --- Hero Buttons --- */
.ag-hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.ag-button-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    color: #0a0a0a;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 28px;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    box-shadow: 0 0 20px rgba(212, 168, 83, 0.25);
}

.ag-button-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #0a0a0a;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.45);
    text-decoration: none;
}

.ag-button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(212, 168, 83, 0.25);
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 28px;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    backdrop-filter: blur(var(--blur-glass));
}

.ag-button-secondary:hover {
    background: rgba(212, 168, 83, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(212, 168, 83, 0.2);
    text-decoration: none;
}

/* FadeInDown animation */
@keyframes heroFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Dot indicators --- */
.hero-dots {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.hero-dot {
    width: 28px;
    height: 3px;
    border-radius: 0px;
    background: rgba(240, 236, 226, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot:hover {
    background: var(--text-primary);
    transform: scaleY(1.6);
}

.hero-dot.active {
    background: var(--accent-primary);
    box-shadow: 0 0 15px rgba(212, 168, 83, 0.6);
    width: 42px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .ag-hero-content-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 0 30px;
        gap: 24px;
    }

    .ag-hero-text-block {
        text-align: center;
    }

    .ag-hero-buttons {
        justify-content: center;
    }

    .ag-hero-poster {
        width: 180px;
        height: 265px;
    }

    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    .hero-section {
        height: 60vh;
        min-height: 400px;
    }

    .ag-hero-poster {
        width: 140px;
        height: 205px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-dots {
        bottom: 16px;
    }

    .ag-button-primary,
    .ag-button-secondary {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* ========================================
   Homepage – Scroll Box & Grid (Antigravity)
   ======================================== */

.scroll-box {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 20px 0;
    scrollbar-width: none;
}

.scroll-box::-webkit-scrollbar {
    display: none;
}

#moreInfo .animes {
    flex-wrap: unset;
    width: max-content;
    display: flex;
    gap: 16px;
}

.plus-go {
    margin-bottom: -15px;
    margin-top: 10px;
}

.search-container {
    padding: 30px;
    margin: 40px 0;
}

.search {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border-radius: 0px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
}


.search input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(212, 168, 83, 0.2);
    outline: none;
}

.search div {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background: var(--accent-primary);
    border: none;
    border-radius: 0px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}


.search div:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 12px rgba(212, 168, 83, 0.3);
}


.search div img {
    width: 16px;
    filter: brightness(0) invert(1);
}

/* ===========================
   Homepage Mobile Responsiveness
   =========================== */
@media (max-width: 768px) {
    .ag-hero-content-wrapper {
        padding: 0 15px;
        gap: 15px;
    }
    
    .ag-hero-poster {
        width: 130px;
        height: 190px;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
        margin-bottom: 8px;
    }
    
    .ag-hero-rating {
        margin-bottom: 12px;
        font-size: 12px;
    }
    
    .ag-button-primary,
    .ag-button-secondary {
        padding: 10px 16px;
        font-size: 0.85rem;
        flex: 1;
        justify-content: center;
    }
    
    .ag-hero-buttons {
        width: 100%;
        display: flex;
        justify-content: stretch;
    }
    
    /* Smooth Scroll Splitting for Cards */
    .scroll-box {
        scroll-snap-type: x mandatory;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch;
    }
    
    .scroll-box * {
        scroll-snap-align: start;
    }
    
    .search-container {
        padding: 15px;
        margin: 20px 0;
    }
}
