﻿/* ============================================================ */
/* wwwroot/css/home.css                                         */
/* نسخه نهایی — اسلایدر با کتاب راست و متن چپ، padding 10%      */
/* ============================================================ */

/* ============================================================ */
/* HERO CAROUSEL (کانتینر اصلی)                                  */
/* ============================================================ */
#homeHero {
    border-radius: 12px;
    overflow: hidden;
}

    #homeHero .carousel-inner {
        border-radius: 12px;
        overflow: hidden;
        height: 480px;
    }

    #homeHero .carousel-item {
        height: 480px;
        width: 100%;
        overflow: hidden;
        position: relative;
    }

/* ============================================================ */
/* HERO SHOWCASE (اسلاید اول)                                    */
/* ============================================================ */
.hero-showcase {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 12px;
    overflow: hidden;
    background: #0f1824;
}

.hero-showcase-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    pointer-events: none;
}

.hero-showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 15, 23, 0.92) 0%, rgba(10, 15, 23, 0.75) 30%, rgba(10, 15, 23, 0.40) 60%, rgba(10, 15, 23, 0.15) 100%);
    z-index: 2;
    pointer-events: none;
}

/* ===== چیدمان Flex: کتاب راست، متن چپ ===== */
.hero-showcase-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: row;
    /* در RTL: عنصر اول (کتاب) راست، عنصر دوم (متن) چپ */
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    height: 100%;
    /* فاصله ۱۰٪ از چپ و راست، حداقل ۲۴px */
    padding: 40px max(24px, 10%);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    pointer-events: none;
    /* فقط فرزندان تعاملی کلیک می‌گیرند */
}

    /* فقط عناصر تعاملی داخل محتوا کلیک‌پذیر باشن */
    .hero-showcase-content a,
    .hero-showcase-content button,
    .hero-showcase-content .btn,
    .hero-showcase-content .hero-showcase-book,
    .hero-showcase-content .hero-book-wrapper {
        pointer-events: auto;
    }

/* ===== کتاب ===== */
.hero-showcase-book {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    flex-shrink: 0;
}

.hero-book-wrapper {
    position: relative;
    display: block;
    text-decoration: none;
    transform: perspective(1000px) rotateY(15deg) rotateZ(3deg);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    animation: heroBookFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

    .hero-showcase-book:hover .hero-book-wrapper,
    .hero-book-wrapper:hover {
        transform: perspective(1000px) rotateY(0deg) rotateZ(0deg) scale(1.08);
    }

.hero-book-cover {
    position: relative;
    width: 220px;
    aspect-ratio: 2 / 3;
    border-radius: 10px 4px 4px 10px;
    overflow: hidden;
    box-shadow: 10px 0 22px rgba(0, 0, 0, 0.45), 2px 0 8px rgba(0, 0, 0, 0.35), -30px 40px 70px rgba(0, 0, 0, 0.7);
}

    .hero-book-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .hero-book-cover::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 6px;
        height: 100%;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.3) 100%);
        z-index: 2;
        pointer-events: none;
    }

    .hero-book-cover::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.18) 100%);
        z-index: 3;
        pointer-events: none;
    }

.hero-book-info {
    position: absolute;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    min-width: 240px;
    max-width: 240px;
}

.hero-book-info-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.hero-book-info-author {
    font-size: 14px;
    font-family: var(--font-primary);
    color: var(--color-primary, #d4a017);
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* ===== متن (چپ) ===== */
.hero-showcase-text {
    color: #fff;
    text-align: right;
    flex: 0 1 auto;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* در RTL: flex-end = چپ */
    margin-left: auto;
    /* هل دادن به چپ */


    /* ✅ کادر نیمه‌شفاف خاکستری */
    background: rgba(30, 40, 55, 0.55); /* ← خاکستری مایل به آبی، ۵۵٪ شفاف */
    backdrop-filter: blur(8px); /* ← بلور شیشه‌ای (مدرن) */
    -webkit-backdrop-filter: blur(8px); /* ← برای Safari */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px; /* ← گوشه‌های نرم */
    padding: 28px 32px; /* ← فاصله داخلی */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

    .hero-showcase-text h1 {
        font-family: var(--font-heading);
        font-size: 20px;
        line-height: 1.6;
        margin: 0 0 18px 0;
        color: #fff;
        text-align: right;
        width: 100%;
    }

        .hero-showcase-text h1 .accent {
            color: var(--color-primary, #d4a017);
        }

    .hero-showcase-text p {
        font-size: 14px;
        font-family: var(--font-primary);
        color: #cbd5e1;
        line-height: 2;
        margin: 0 0 26px 0;
        text-align: right;
        width: 100%;
    }

.hero-showcase-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    /* در RTL: flex-end = چپ */
    width: 100%;
}

/* توضیحات اسلایدر — حداکثر ۴ خط با سه‌نقطه */
.hero-showcase-desc {
    font-size: 14px;
    font-family: var(--font-primary);
    color: #cbd5e1;
    line-height: 2;
    margin: 0 0 26px 0;
    text-align: justify;
    width: 100%;
    max-width: 100%;
    /* محدودسازی به ۴ خط */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* استاندارد جدید */
    line-clamp: 4;
    /* جلوگیری از سرریز کلمات طولانی */
    word-break: break-word;
    overflow-wrap: anywhere;
    /* ارتفاع پشتیبان برای مرورگرهایی که line-clamp را پشتیبانی نمی‌کنند */
    max-height: calc(1em * 2 * 4); /* font-size × line-height × تعداد خط */
}


@keyframes heroBookFadeIn {
    from {
        opacity: 0;
        translate: 0 24px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

/* ============================================================ */
/* HERO BUTTONS (مشترک)                                          */
/* ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: bold;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-dark);
    border-color: var(--color-primary);
}

    .btn-primary:hover {
        background: var(--color-primary-hover);
        border-color: var(--color-primary-hover);
        transform: translateY(-2px);
    }

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

    .btn-outline:hover {
        background: var(--color-primary);
        color: var(--color-dark);
    }

/* ============================================================ */
/* HERO CAROUSEL — فعال کردن کلیک روی دکمه‌های کنترلی           */
/* ============================================================ */
#homeHero .carousel-control-prev,
#homeHero .carousel-control-next {
    z-index: 20;
    pointer-events: auto;
    opacity: 0.9;
    width: 60px;
    transition: opacity 0.25s ease, background 0.25s ease;
}

    #homeHero .carousel-control-prev:hover,
    #homeHero .carousel-control-next:hover {
        opacity: 1;
        background: rgba(212, 160, 23, 0.15);
    }

#homeHero .carousel-indicators {
    z-index: 20;
    pointer-events: auto;
}

    #homeHero .carousel-indicators button {
        pointer-events: auto;
        cursor: pointer;
    }

/* ============================================================ */
/* اسلایدهای 2 تا 7 (تصاویر بنر)                                 */
/* ============================================================ */
#homeHero .carousel-item > .d-block {
    height: 100%;
    width: 100%;
    position: relative;
}

#homeHero .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}

#homeHero .carousel-caption {
    z-index: 10;
    pointer-events: auto;
}

    #homeHero .carousel-caption a,
    #homeHero .carousel-caption .btn {
        pointer-events: auto;
    }

/* ============================================================ */
/* HORIZONTAL AUTO-SCROLL TRACK                                  */
/* ============================================================ */
.h-scroll-wrapper {
    position: relative;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

.h-scroll-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 16px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

    .h-scroll-track::-webkit-scrollbar {
        display: none;
    }

/* ============================================================ */
/* BOOK CARD                                                     */
/* ============================================================ */
.book-card {
    flex: 0 0 auto;
    width: 165px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

    .book-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    }

.book-card-image {
    position: relative;
    aspect-ratio: 2 / 3;
    background: #f5f7fa;
    overflow: hidden;
    display: block;
}

    .book-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }

.book-card:hover .book-card-image img {
    transform: scale(1.04);
}

.book-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 2;
    font-family: var(--font-primary);
}

    .book-card-badge.badge-new {
        background: var(--color-primary);
        color: var(--color-dark);
    }

    .book-card-badge.badge-coming-soon {
        background: #8b5cf6;
        color: #fff;
    }

    .book-card-badge.badge-out-of-stock {
        background: #ef4444;
        color: #fff;
    }

    .book-card-badge.badge-preorder {
        background: #0ea5e9;
        color: #fff;
    }

    .book-card-badge.badge-low-stock {
        background: #f59e0b;
        color: var(--color-dark);
    }

.book-card-body {
    padding: 10px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.book-card-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 4px 0;
    line-height: 1.5;
    color: #1a2233;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .book-card-title a {
        color: inherit;
        text-decoration: none;
        transition: color 0.25s ease;
    }

        .book-card-title a:hover {
            color: var(--color-primary);
        }

.book-card-author {
    font-size: 14px;
    font-family: var(--font-primary);
    color: #d4a017;
    margin-bottom: 4px;
    font-weight: 500;
}

.book-card-desc {
    font-size: 14px;
    font-family: var(--font-primary);
    color: #718096;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================ */
/* NEW BOOKS (تازه‌های نشر)                                     */
/* ============================================================ */
.new-books-section {
    background: #fff;
    padding: 50px 24px;
}

.new-books-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
}

.new-books-header {
    padding-top: 6px;
}

.new-books-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: bold;
    color: #1a2233;
    margin: 0 0 10px 0;
    line-height: 1.4;
    position: relative;
    padding-right: 12px;
}

    .new-books-title::before {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 70%;
        background: var(--color-primary);
        border-radius: 2px;
    }

.new-books-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4a5568;
    font-size: 14px;
    font-family: var(--font-primary);
    text-decoration: none;
    transition: all 0.25s ease;
    margin-top: 6px;
}

    .new-books-link:hover {
        color: var(--color-primary);
        gap: 10px;
    }

    .new-books-link svg {
        width: 14px;
        height: 14px;
    }

/* ============================================================ */
/* SELECTED BOOKS (انتخاب آوا گستر)                             */
/* ============================================================ */
.selected-section {
    background: #0f1824;
    padding: 50px 24px;
    margin: 20px 0;
}

.selected-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 32px;
    align-items: start;
}

.selected-scroll {
    order: 1;
    min-width: 0;
}

.selected-info {
    order: 2;
    text-align: right;
    padding-top: 6px;
}

    .selected-info h2 {
        font-family: var(--font-heading);
        font-size: 18px;
        color: #fff;
        margin: 0 0 10px 0;
        line-height: 1.4;
        position: relative;
        padding-right: 12px;
    }

        .selected-info h2::before {
            content: '';
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 70%;
            background: var(--color-primary);
            border-radius: 2px;
        }

    .selected-info p {
        font-size: 14px;
        font-family: var(--font-primary);
        color: #94a3b8;
        line-height: 1.9;
        margin: 0 0 16px 0;
    }

.selected-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-size: 14px;
    font-family: var(--font-primary);
    text-decoration: none;
    transition: all 0.25s ease;
}

    .selected-link:hover {
        gap: 10px;
    }

    .selected-link svg {
        width: 14px;
        height: 14px;
    }

.selected-section .book-card {
    background: #1e293b;
}

.selected-section .book-card-title {
    color: #fff;
}

    .selected-section .book-card-title a:hover {
        color: var(--color-primary);
    }

.selected-section .book-card-desc {
    color: #94a3b8;
}

.selected-section .book-card-author {
    color: var(--color-primary);
}

/* ============================================================ */
/* COMING SOON (به‌زودی)                                        */
/* ============================================================ */
.coming-soon-section {
    background: #f8f9fb;
    padding: 50px 24px;
}

.coming-soon-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
}

.coming-soon-header {
    padding-top: 6px;
}

.coming-soon-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: bold;
    color: #1a2233;
    margin: 0 0 10px 0;
    line-height: 1.4;
    position: relative;
    padding-right: 12px;
}

    .coming-soon-title::before {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 70%;
        background: var(--color-primary);
        border-radius: 2px;
    }

.coming-soon-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4a5568;
    font-size: 14px;
    font-family: var(--font-primary);
    text-decoration: none;
    transition: all 0.25s ease;
    margin-top: 6px;
}

    .coming-soon-link:hover {
        color: var(--color-primary);
        gap: 10px;
    }

    .coming-soon-link svg {
        width: 14px;
        height: 14px;
    }

/* ============================================================ */
/* AUTHORS (نویسندگان)                                          */
/* ============================================================ */
.authors-section {
    background: #0f1824;
    padding: 50px 24px;
}

.authors-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
}

.authors-header {
    padding-top: 6px;
}

.authors-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: bold;
    color: #f8f9fb;
    margin: 0 0 10px 0;
    line-height: 1.4;
    position: relative;
    padding-right: 12px;
}

    .authors-title::before {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 70%;
        background: var(--color-primary);
        border-radius: 2px;
    }

.authors-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-size: 14px;
    font-family: var(--font-primary);
    text-decoration: none;
    transition: all 0.25s ease;
    margin-top: 6px;
}

    .authors-link:hover {
        color: var(--color-primary);
        gap: 10px;
    }

    .authors-link svg {
        width: 14px;
        height: 14px;
    }

.author-card {
    flex: 0 0 auto;
    width: 140px;
    text-align: center;
    padding: 14px 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .author-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    }

.author-avatar {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 3px solid #f1f5f9;
    filter: grayscale(100%);
    transition: filter 0.4s ease, border-color 0.4s ease;
}

.author-card:hover .author-avatar {
    filter: grayscale(0%);
    border-color: var(--color-primary);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-name {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 3px 0;
    color: #1a2233;
    line-height: 1.5;
}

.author-role {
    font-size: 14px;
    font-family: var(--font-primary);
    color: #718096;
}

/* ============================================================ */
/* ACTIVITIES (فعالیت‌های فرهنگی) — همیشه ۴ ستون                 */
/* ============================================================ */
.activities-section {
    background: #f8f9fb;
    padding: 50px 24px;
}

.activities-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.activities-header {
    margin-bottom: 28px;
    text-align: right;
}

.activities-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: bold;
    color: #1a2233;
    margin: 0;
    line-height: 1.4;
    display: inline-block;
    position: relative;
    padding-right: 12px;
}

    .activities-title::before {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 70%;
        background: var(--color-primary);
        border-radius: 2px;
    }

.activities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.activity-card {
    display: block;
    text-align: center;
    padding: 20px 14px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

    .activity-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.1);
        border-color: rgba(212, 160, 23, 0.2);
    }

.activity-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a2233;
    background: #f8f9fb;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.activity-card:hover .activity-icon {
    background: var(--color-primary);
    color: var(--color-dark);
    transform: scale(1.06);
}

.activity-icon svg {
    width: 20px;
    height: 20px;
}

.activity-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: #1a2233;
    line-height: 1.5;
}

.activity-desc {
    font-size: 14px;
    font-family: var(--font-primary);
    color: #718096;
    line-height: 1.7;
    margin: 0;
}

/* ============================================================ */
/* FOREIGN RIGHTS                                                */
/* ============================================================ */
.rights-section {
    background: #0f1824;
    color: #fff;
    padding: 50px 24px;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.rights-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.rights-text h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: #fff;
    margin: 0 0 14px 0;
}

.rights-text p {
    color: #cbd5e1;
    font-size: 14px;
    font-family: var(--font-primary);
    line-height: 2;
    margin: 0 0 22px 0;
}

/* ============================================================ */
/* LATEST NEWS (آخرین مطالب)                                    */
/* ============================================================ */
.news-section {
    background: #fff;
    padding: 50px 24px;
}

.news-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.news-header {
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.news-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: bold;
    color: #1a2233;
    margin: 0;
    position: relative;
    padding-right: 12px;
}

    .news-title::before {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 70%;
        background: var(--color-primary);
        border-radius: 2px;
    }

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4a5568;
    font-size: 14px;
    font-family: var(--font-primary);
    text-decoration: none;
    transition: all 0.25s ease;
}

    .news-link:hover {
        color: var(--color-primary);
        gap: 10px;
    }

    .news-link svg {
        width: 14px;
        height: 14px;
    }

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

    .news-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    }

.news-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f7fa;
    display: block;
}

    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.4s ease;
    }

.news-card:hover .news-image img {
    transform: scale(1.04);
}

.news-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title-text {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 8px 0;
    line-height: 1.6;
    color: #1a2233;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .news-title-text a {
        color: inherit;
        text-decoration: none;
        transition: color 0.25s ease;
    }

        .news-title-text a:hover {
            color: var(--color-primary);
        }

.news-excerpt {
    font-size: 14px;
    font-family: var(--font-primary);
    color: #718096;
    line-height: 1.9;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-date {
    font-size: 14px;
    font-family: var(--font-primary);
    color: #94a3b8;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================ */
/* BOOK CARD META (اختیاری — برای _BookCard.cshtml)             */
/* ============================================================ */
.book-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.book-card-price {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--color-primary);
    font-weight: bold;
}

    .book-card-price small {
        font-size: 14px;
        color: #718096;
        font-family: var(--font-primary);
    }

.book-card-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

    .book-card-btn:hover {
        background: var(--color-primary-hover);
        transform: scale(1.1);
    }

    .book-card-btn.btn-disabled {
        background: #e5e7eb;
        color: #9ca3af;
        cursor: not-allowed;
    }

/* ============================================================ */
/* RESPONSIVE                                                    */
/* ============================================================ */

/* تبلت بزرگ (<= 1200px) */
@media (max-width: 1200px) {
    #homeHero .carousel-inner,
    #homeHero .carousel-item,
    .hero-showcase {
        height: 440px;
    }

    .new-books-inner,
    .coming-soon-inner,
    .authors-inner {
        grid-template-columns: 180px 1fr;
        gap: 24px;
    }

    .selected-inner {
        grid-template-columns: 1fr 180px;
        gap: 24px;
    }

    .hero-showcase-content {
        gap: 30px;
        padding: 30px max(20px, 10%);
    }

    .hero-showcase-text h1 {
        font-size: 20px;
    }
}

/* تبلت (<= 992px) */
@media (max-width: 992px) {
    #homeHero .carousel-inner,
    #homeHero .carousel-item,
    .hero-showcase {
        height: 420px;
    }

    /* همچنان افقی: کتاب راست، متن چپ */
    .hero-showcase-content {
        gap: 24px;
        padding: 28px max(18px, 10%);
    }

    .hero-showcase-text {
        max-width: 380px;
    }

        .hero-showcase-text h1 {
            font-size: 18px;
        }

        .hero-showcase-text p {
            font-size: 14px;
        }

    .hero-book-cover {
        width: 170px;
    }

    .hero-book-info {
        bottom: -50px;
        min-width: 190px;
        max-width: 190px;
    }

    .hero-book-info-title {
        font-size: 14px;
    }

    .hero-book-info-author {
        font-size: 14px;
    }

    .hero-showcase-actions .btn {
        padding: 9px 18px;
        font-size: 14px;
    }

    /* سایر بخش‌ها */
    .new-books-inner,
    .coming-soon-inner,
    .authors-inner,
    .selected-inner {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .selected-info {
        order: 1;
    }

    .selected-scroll {
        order: 2;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .activities-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .rights-inner {
        grid-template-columns: 1fr;
    }

    .book-card {
        width: 150px;
    }

    .author-card {
        width: 130px;
    }
}

/* موبایل بزرگ (<= 768px) */
@media (max-width: 768px) {
    #homeHero .carousel-inner,
    #homeHero .carousel-item,
    .hero-showcase {
        height: 380px;
    }
}

/* موبایل (<= 600px) */
@media (max-width: 600px) {
    #homeHero .carousel-inner,
    #homeHero .carousel-item,
    .hero-showcase {
        height: 360px;
        border-radius: 8px;
    }

    #homeHero .carousel-inner {
        border-radius: 8px;
    }

    /* همچنان افقی: کتاب راست، متن چپ */
    .hero-showcase-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 20px max(14px, 10%);
    }

    .hero-showcase-text {
        max-width: 60%;
    }

        .hero-showcase-text h1 {
            font-size: 16px;
            line-height: 1.5;
            margin-bottom: 10px;
        }

        .hero-showcase-text p {
            font-size: 14px;
            line-height: 1.8;
            margin-bottom: 14px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

    .hero-showcase-actions {
        gap: 6px;
    }

        .hero-showcase-actions .btn {
            padding: 6px 10px;
            font-size: 14px;
        }

            .hero-showcase-actions .btn svg {
                width: 14px;
                height: 14px;
            }

    .hero-book-cover {
        width: 110px;
    }

    .hero-book-info {
        bottom: -40px;
        min-width: 130px;
        max-width: 130px;
    }

    .hero-book-info-title {
        font-size: 14px;
    }

    .hero-book-info-author {
        font-size: 14px;
    }

    /* بخش‌ها */
    .new-books-section,
    .selected-section,
    .coming-soon-section,
    .authors-section,
    .activities-section,
    .news-section {
        padding: 36px 14px;
    }

    .new-books-title,
    .coming-soon-title,
    .authors-title,
    .selected-info h2,
    .activities-title,
    .news-title {
        font-size: 16px;
    }

    .h-scroll-track {
        gap: 10px;
        padding: 6px 2px 12px;
    }

    .book-card {
        width: calc((100vw - 50px) / 3);
        min-width: 100px;
        max-width: 130px;
    }

    .author-card {
        width: calc((100vw - 50px) / 3);
        min-width: 95px;
        max-width: 125px;
    }

    .book-card-body {
        padding: 8px 6px;
    }

    .book-card-title {
        font-size: 14px;
        min-height: 32px;
    }

    .book-card-desc {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .book-card-author {
        font-size: 14px;
    }

    .author-avatar {
        width: 65px;
        height: 65px;
    }

    .author-name {
        font-size: 14px;
    }

    .author-role {
        font-size: 14px;
    }

    /* فعالیت‌های فرهنگی: ۴ ستون فشرده */
    .activities-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .activity-card {
        padding: 10px 4px;
        border-radius: 6px;
    }

    .activity-icon {
        width: 30px;
        height: 30px;
        margin: 0 auto 6px;
    }

        .activity-icon svg {
            width: 16px;
            height: 16px;
        }

    .activity-title {
        font-size: 14px;
        margin-bottom: 2px;
        line-height: 1.3;
    }

    .activity-desc {
        font-size: 14px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* آخرین مطالب: ۲ ستونی فشرده */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .news-card {
        border-radius: 6px;
    }

    .news-image {
        aspect-ratio: 16 / 10;
    }

    .news-body {
        padding: 10px 8px;
    }

    .news-title-text {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
    }

    .news-excerpt {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .news-date {
        font-size: 14px;
        padding-top: 6px;
        gap: 4px;
    }

        .news-date svg {
            width: 12px;
            height: 12px;
        }
}

/* موبایل کوچک (<= 380px) */
@media (max-width: 380px) {
    #homeHero .carousel-inner,
    #homeHero .carousel-item,
    .hero-showcase {
        height: 320px;
    }

    .hero-showcase-content {
        padding: 16px max(10px, 10%);
        gap: 8px;
    }

    .hero-showcase-text {
        max-width: 58%;
    }

        .hero-showcase-text h1 {
            font-size: 14px;
            margin-bottom: 6px;
        }

        .hero-showcase-text p {
            font-size: 14px;
            -webkit-line-clamp: 2;
            margin-bottom: 10px;
        }

    .hero-showcase-actions .btn {
        padding: 4px 8px;
        font-size: 14px;
    }

        .hero-showcase-actions .btn svg {
            width: 12px;
            height: 12px;
        }

    .hero-book-cover {
        width: 90px;
    }

    .hero-book-info {
        bottom: -36px;
        min-width: 110px;
        max-width: 110px;
    }

    .hero-book-info-title {
        font-size: 14px;
    }

    .hero-book-info-author {
        font-size: 14px;
    }

    .book-card {
        width: calc((100vw - 44px) / 3);
        min-width: 90px;
    }

    .author-card {
        width: calc((100vw - 44px) / 3);
        min-width: 85px;
    }

    .book-card-title {
        font-size: 14px;
    }

    .author-avatar {
        width: 55px;
        height: 55px;
    }

    /* فعالیت‌های فرهنگی: ۴ ستون خیلی فشرده */
    .activities-grid {
        gap: 4px;
    }

    .activity-card {
        padding: 8px 3px;
    }

    .activity-icon {
        width: 26px;
        height: 26px;
    }

        .activity-icon svg {
            width: 14px;
            height: 14px;
        }

    .activity-title {
        font-size: 14px;
    }

    .activity-desc {
        font-size: 14px;
    }

    /* آخرین مطالب: ۲ ستونی خیلی فشرده */
    .news-grid {
        gap: 8px;
    }

    .news-body {
        padding: 8px 6px;
    }

    .news-title-text {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .news-excerpt {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .news-date {
        font-size: 14px;
    }

        .news-date svg {
            width: 12px;
            height: 12px;
        }
}


/* ============================================================ */
/* Articles on Home — badge/kind                                */
/* ============================================================ */
.article-home-featured {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-primary);
    color: var(--color-dark);
    padding: 3px 10px;
    border-radius: 20px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-home-kind {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    text-decoration: none;
}

    .article-home-kind:hover {
        text-decoration: underline;
        opacity: 0.9;
    }

/* اطمینان از اینکه news-image موقعیت نسبی دارد */
.news-image {
    position: relative;
}

/* ============================================================
   Piece cards — صفحه اصلی
   ============================================================ */
.piece-home-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.piece-card-link:hover .piece-home-card {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}

.piece-home-image-wrapper {
    background: #f1f5f9;
    overflow: hidden;
}

    .piece-home-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s;
    }

.piece-card-link:hover .piece-home-image-wrapper img {
    transform: scale(1.05);
}

.piece-home-title {
    font-family: var(--font-heading, 'BTitrBd', serif);
    font-size: 14px;
    font-weight: bold;
    color: #1a2233;
    margin-bottom: 6px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.piece-home-author {
    font-family: var(--font-primary, Tahoma);
    font-size: 12px;
    color: #d4a017;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .piece-home-author i {
        font-size: 11px;
    }

.piece-home-excerpt {
    font-family: var(--font-primary, Tahoma);
    font-size: 12px;
    line-height: 1.7;
    color: #64748b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.piece-home-more {
    font-family: var(--font-primary, Tahoma);
    font-size: 12px;
    color: #d4a017;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.piece-card-link:hover .piece-home-more {
    gap: 8px;
}

/* ============================================================ */
/* Rights Visual — تصویر کلیک‌پذیر با زوم                        */
/* ============================================================ */
.rights-visual {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #14203a 0%, #0f1b33 100%);
    text-decoration: none;
}

    .rights-visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: transform;
    }

    /* زوم ملایم روی تصویر */
    .rights-visual:hover img {
        transform: scale(1.06);
    }

    /* سایه و درخشش ملایم */
    .rights-visual:hover {
        box-shadow: 0 15px 40px rgba(212, 160, 23, 0.3), 0 10px 30px rgba(0, 0, 0, 0.4);
    }

    /* لایه طلایی روی تصویر — با هاور کمی روشن‌تر */
    .rights-visual::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(212, 160, 23, 0.15) 0%, rgba(15, 27, 51, 0.1) 100%);
        pointer-events: none;
        transition: opacity 0.35s ease;
        z-index: 1;
    }

    .rights-visual:hover::after {
        opacity: 0.4;
    }

/* ============================================================ */
/* ریسپانسیو                                                     */
/* ============================================================ */
@media (max-width: 1100px) {
    .rights-visual {
        max-width: 500px;
        margin: 0 auto;
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 768px) {
    .rights-visual {
        max-width: 100%;
        border-radius: 12px;
    }
}