/* Global Overflow Fix */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-main);
}

/* ============================
   HERO SECTION (RESTORED & UPGRADED)
   ============================ */
.hero-section {
    position: relative;
    min-height: clamp(500px, 58vh, 660px);
    /* Çok uzun değil, tam kıvamında */
    width: 100%;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* Arkaplan rengi (Resim yüklenmezse) */
    background: #0f0f0f;
}

/* Arkaplandaki Flu Resim */
.hero-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    /* Bulanık ve Karanlık */
    transform: scale(1.1);
    /* Kenar beyazlıklarını gizlemek için */
    z-index: 0;
}

.hero-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 17, 21, 0.95) 15%, rgba(15, 17, 21, 0.6) 50%, transparent);
    z-index: 1;
}

/* İçerik Kapsayıcı (Yazı Sol, Kapak Sağ) */
.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: clamp(28px, 5vw, 64px);
}

/* Sol Taraf: Yazılar */
.hero-content {
    flex: 1;
    min-width: 0;
    max-width: 760px;
    animation: fadeUp 0.8s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-tag {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px var(--accent-glow);
}

.hero-title {
    width: min(100%, 760px);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: clamp(2.35rem, 4.35vw, 4.75rem);
    font-weight: 900;
    margin: 0 0 clamp(14px, 2vw, 24px);
    padding-bottom: 0.1em;
    line-height: 1.05;
    letter-spacing: 0;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-desc {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 25px;
    line-height: 1.6;
    max-width: min(100%, 720px);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #000;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.4);
}

/* Sağ Taraf: Dikey Kapak (3D Efektli) */
.hero-poster-wrapper {
    flex: 0 0 clamp(220px, 22vw, 300px);
    height: clamp(320px, 34vw, 430px);
    position: relative;
    perspective: 1000px;
    display: none; /* Mobilde gizle */
}

@media (min-width: 769px) {
    .hero-poster-wrapper {
        display: block;
    }
}

.hero-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.5);
    transform: rotateY(-10deg);
    transition: transform 0.3s ease;
}

.hero-poster-wrapper:hover .hero-poster {
    transform: rotateY(0deg) scale(1.02);
    z-index: 10;
}

/* ============================
   NETFLIX SLIDERS (Carousel)
   ============================ */
.category-section {
    margin-bottom: 50px;
    position: relative;
    /* padding-left: 20px; Container zaten padding veriyor */
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    border-left: 4px solid var(--accent);
    padding-left: 10px;
}

.carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0 30px 0;
    /* Hover payı */
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

/* ============================
   NOVEL CARDS
   ============================ */
.novel-card {
    position: relative;
    flex: 0 0 160px;
    /* Kart Genişliği */
    height: 240px;
    /* Kart Yüksekliği */
    border-radius: 8px;
    background: #222;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    z-index: 1;
}

.novel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Kart Hover */
.novel-card:hover {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(139, 92, 246, 0.25);
    z-index: 10;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, var(--bg-body), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.novel-card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-title {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

/* Mobil Ayarlar */
@media (max-width: 768px) {
    .hero-section {
        height: auto;
        min-height: 500px;
        padding: 40px 0 20px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    /* MOBİLDE RESMİ GÖSTER */
    .hero-poster-wrapper {
        display: block !important;
        flex: none;
        width: 200px;
        height: 300px;
        margin: 0 auto;
        order: -1; /* Resmi en üste taşı */
    }

    .hero-poster {
        transform: rotateY(0deg); /* Mobilde 3D efekti kaldır */
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    }

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

    .hero-title {
        width: 100%;
        font-size: clamp(2rem, 10vw, 3.2rem);
        padding-bottom: 0.1em;
        line-height: 1.05;
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }

    .hero-desc {
        font-size: 1rem;
    }
}
