/* =====================================================
   SAGANEST — HOME PAGE
   Hero, stats, trending, genres, new releases, wisdom section
   ===================================================== */

/* ================= HERO ================= */
.hero {
    min-height: 600px;
    padding: 80px 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: radial-gradient(circle at 75% 40%, #32185c 0%, transparent 35%),
                var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(155, 92, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.05;
    margin-bottom: 25px;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.hero h1 span { color: var(--accent-light); }

.hero-description {
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 32px;
    font-size: 17px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ================= HERO ART ================= */
.hero-art {
    width: 380px;
    height: 420px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.book-card {
    position: absolute;
    width: 230px;
    height: 330px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-slow);
}

.book-card:hover {
    transform: scale(1.02) rotate(0deg) !important;
}

.book-back {
    right: 30px;
    top: 10px;
    transform: rotate(12deg);
}

.book-front {
    left: 30px;
    bottom: 10px;
    transform: rotate(-7deg);
}

.book-cover {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(145deg, #32105c, #100b19);
    padding: 30px;
}

.book-cover span {
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.book-cover strong {
    font-size: 30px;
    line-height: 1.1;
    margin: 15px 0;
}

.book-cover small {
    color: var(--text-secondary);
    font-size: 12px;
}

/* ================= STATS BAR ================= */
.stats {
    display: flex;
    justify-content: center;
    gap: 100px;
    padding: 35px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid #24242c;
    border-bottom: 1px solid #24242c;
    flex-wrap: wrap;
}

.stats div { text-align: center; }

.stats strong {
    display: block;
    font-size: 28px;
    color: var(--accent-light);
    font-weight: 800;
}

.stats span {
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= GENRES ================= */
.genres-section {
    background: var(--bg-secondary);
}

.genres {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.genre-btn {
    padding: 14px 24px;
    border-radius: var(--radius-pill);
    background: #20202a;
    border: 1px solid #30303a;
    color: #fff;
    transition: all var(--transition);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.genre-btn:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    background: rgba(155, 92, 255, 0.08);
}

.genre-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 6px 20px rgba(155, 92, 255, 0.3);
}

/* ================= WISDOM SECTION (homepage cards) ================= */
.wisdom-section {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.wisdom-section::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(
        circle,
        rgba(155, 92, 255, 0.07) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}

.wisdom-section .section-heading h2 { color: var(--text-primary); }
.wisdom-section .section-heading .section-label { color: var(--accent-light); }

.wisdom-section .view-all {
    color: var(--accent-light);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all var(--transition);
}

.wisdom-section .view-all:hover {
    color: #c39aff;
    background: rgba(155, 92, 255, 0.08);
    transform: translateX(4px);
}

/* Grid: 3 cols desktop → 2 tablet → 1 mobile */
.wisdom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wisdom-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 26px 24px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    min-width: 0;
    transition: transform 0.35s ease,
                border-color 0.35s ease,
                box-shadow 0.35s ease,
                background 0.35s ease;
}

.wisdom-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(155, 92, 255, 0.08) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.wisdom-card:hover {
    transform: translateY(-8px);
    border-color: #2a1f3a;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.wisdom-card:hover::after { opacity: 1; }

.wisdom-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.wisdom-card:hover::before { opacity: 1; }

.wisdom-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    border-radius: var(--radius-md);
    background: rgba(155, 92, 255, 0.12);
    border: 1px solid rgba(155, 92, 255, 0.18);
    transition: transform 0.35s ease,
                background 0.35s ease,
                border-color 0.35s ease;
}

.wisdom-card:hover .wisdom-icon {
    transform: scale(1.08) rotate(-4deg);
    background: rgba(155, 92, 255, 0.2);
    border-color: rgba(155, 92, 255, 0.35);
}

.wisdom-content {
    flex: 1;
    min-width: 0;
}

.wisdom-content h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    transition: color var(--transition);
    word-break: break-word;
}

.wisdom-card:hover .wisdom-content h3 { color: #c39aff; }

.wisdom-content p {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
    word-break: break-word;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
    .hero { padding: 60px 6%; }
    .hero-art { transform: scale(0.85); }
    .wisdom-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 800px) {
    .hero {
        padding: 60px 6%;
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }
    .hero-description { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-art { margin-top: 50px; transform: scale(0.8); }

    .stats { gap: 40px; }
    .section { padding: 60px 6%; }
    .section-heading h2 { font-size: 26px; }

    .wisdom-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .wisdom-card {
        padding: 18px 18px;
        gap: 14px;
        align-items: center;
    }

    .wisdom-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
        border-radius: 10px;
    }

    .wisdom-content h3 { font-size: 15.5px; margin-bottom: 4px; }
    .wisdom-content p { font-size: 13px; line-height: 1.6; }
}

@media (max-width: 650px) {
    .wisdom-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .wisdom-card { padding: 20px 18px; }
    .wisdom-content h3 { font-size: 15px; }
    .wisdom-content p { font-size: 13px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 38px; }
    .hero-art { transform: scale(0.55); margin-top: 10px; margin-bottom: -60px; }

    .stats { gap: 20px; }
    .stats strong { font-size: 20px; }

    .genre-btn { padding: 6px 12px; font-size: 0.75rem; }

    .wisdom-grid { gap: 12px; }

    .wisdom-card {
        padding: 16px 14px;
        gap: 12px;
        border-radius: 12px;
    }

    .wisdom-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .wisdom-content h3 { font-size: 14.5px; }
    .wisdom-content p { font-size: 12.5px; line-height: 1.55; }
}