/* -----------------------------     Hero Section  ------------------------------------- */

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7.5rem 2rem 3rem;
    background-color: var(--primary-bg-color);
    margin: 0;
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    width: 100%;
    gap: 3.5rem;
}

.hero-content {
    flex: 1;
    max-width: 520px;
}

.hero-title {
    font-size: 36px;
    line-height: 1.2;
    margin: 0 0 1.25rem;
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.subtext {
    font-size: 1rem;
    color: var(--primary-color);
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 470px;
}

.stats-container {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.stat-number,
.plus {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--primary-color)
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background-color: var(--primary-bg-color);
    color: var(--primary-color);
    border: 1px solid var(--tertiary-color);
    padding: 0.9rem 1.35rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.cta-button:hover {
    background-color: var(--primary-color);
    color: var(--primary-bg-color);
    border-color: var(--primary-color);
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.16);
}

.arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.cta-button:hover .arrow {
    transform: translateX(4px);
}

/* --- RIGHT SIDE: BOOK ARRANGEMENT --- */

.hero-image-wrapper {
    flex: 1;
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-bg {
    position: absolute;
    inset: 0;
    background-color: var(--tertiary-bg-color);
    border-radius: 16px;
    z-index: 0;
}

.book-cover {
    position: absolute;
    width: clamp(125px, 15vw, 170px);
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    transition: all 0.4s ease;
    box-shadow: 0 18px 24px rgba(17, 24, 39, 0.22);
}

.book-back-left {
    z-index: 1;
    transform: translateX(-90px) translateY(22px);
}

.book-back-right {
    z-index: 1;
    transform: translateX(92px) translateY(18px);
}

.book-front-center {
    z-index: 10;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 22px 32px rgba(17, 24, 39, 0.28);
}

.hero-image-wrapper:hover .book-back-left {
    transform: translateX(-102px) translateY(18px);
}

.hero-image-wrapper:hover .book-back-right {
    transform: translateX(104px) translateY(14px);
}

.hero-image-wrapper:hover .book-front-center {
    transform: translateY(-10px) scale(1.04);
}

/* -----------------------------     Category Section  ------------------------------------- */

.category-section {
    position: relative;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    padding: 3rem 1.5rem;
    background-color: var(--secondary-bg-color);
    box-sizing: border-box;
    text-align: center;
}

.category-section-inner {
    width: 100%;
    margin: 0 auto;
}

.category-section .section-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.category-pill-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.15rem;
    flex-wrap: wrap;
}

.category-pill {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    background: var(--primary-bg-color);
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.category-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    background-color: var(--primary-bg-color);
}

.category-pill-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    flex-shrink: 0;
}

.category-pill-icon svg {
    width: 100%;
    height: 100%;
}


@media (max-width: 900px) {
    .hero-section {
        min-height: auto;
        padding: 10rem 1rem 2rem;
    }

    .hero-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .hero-content {
        display: contents;
        max-width: none;
    }

    .hero-title {
        order: 1;
        font-size: 24px;
        margin-bottom: 0.5rem;
    }

    .subtext {
        order: 2;
        max-width: none;
        margin-bottom: 1.25rem;
        color: var(--secondary-color);
        font-size: 0;
        line-height: 1.4;
    }

    .subtext::before {
        content: attr(data-mobile-text);
        font-size: 1rem;
    }

    .stats-container {
        order: 4;
        gap: 1rem;
        margin: 0 0 1.25rem;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .stat-number,
    .plus {
        font-size: 1.7rem;
    }

    .stat-item {
        flex: 1;
        align-items: center;
        text-align: center;
    }

    .hero-image-wrapper {
        order: 3;
        width: 100%;
        min-height: 320px;
        margin-bottom: 1.5rem;
    }

    .book-cover {
        width: 110px;
    }

    .cta-button {
        order: 5;
        align-self: flex-start;
        gap: 0.35rem;
        padding: 0 0 0.35rem;
        border: 0;
        border-bottom: 2px solid currentColor;
        border-radius: 0;
        background: none;
        box-shadow: none;
        color: var(--accent-color);
        font-size: 1rem;
        font-weight: 500;
    }

    .cta-button:hover {
        background: none;
        color: var(--accent-color);
        border-color: currentColor;
        box-shadow: none;
        transform: none;
    }

    .arrow {
        margin-left: 0;
    }

    .book-back-left {
        transform: translateX(-56px) translateY(14px);
    }

    .book-back-right {
        transform: translateX(56px) translateY(12px);
    }

    .books-carousel {
        gap: 1rem;
    }

    .featured-carousel-shell {
        min-height: 42px;
    }

    .carousel-nav-btn {
        width: 38px;
        height: 38px;
    }

    .carousel-nav-btn[data-carousel-direction="prev"] {
        left: 0.5rem;
    }

    .carousel-nav-btn[data-carousel-direction="next"] {
        right: 0.5rem;
    }

}

@media (max-width: 640px) {
    .category-section {
        padding: 2.5rem 1rem;
    }

    .category-pill-list {
        gap: 0.8rem;
    }

    .category-pill {
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }
}