/* ============================================
   انتشارات آذرستان - استایل اصلی
   طراحی شیشه‌ای (Glassmorphism) + دارک/لایت مود
   ============================================ */

/* ========== متغیرهای رنگ ========== */
:root {
    --gold: #D4AF37;
    --gold-dark: #b8941f;
    --navy: #0F172A;
    --navy-light: #1a2540;

    /* دارک مود (پیش‌فرض) */
    --bg: #0a0f1a;
    --bg-secondary: #0F172A;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    --card-bg: rgba(255, 255, 255, 0.03);

    /* اندازه‌ها */
    --header-height: 70px;
    --container-width: 1200px;
    --border-radius: 16px;
    --transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

/* ========== لایت مود ========== */
body.light-mode {
    --bg: #f0f4f8;
    --bg-secondary: #ffffff;
    --surface: rgba(0, 0, 0, 0.03);
    --surface-hover: rgba(0, 0, 0, 0.06);
    --border: rgba(0, 0, 0, 0.08);
    --text: #0F172A;
    --text-secondary: rgba(15, 23, 42, 0.7);
    --text-muted: rgba(15, 23, 42, 0.5);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-blur: blur(20px);
    --card-bg: rgba(255, 255, 255, 0.8);
}

/* ========== ریست و تنظیمات پایه ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

/* دکمه‌های اسلایدر غیرفعال */
.slider-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.slider-btn:disabled:hover {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.section-padding {
    padding: 70px 0;
}

/* ========== هدر شیشه‌ای شناور ========== */
.header {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--container-width);
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.header.scrolled {
    top: 0;
    border-radius: 0 0 30px 30px;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
}

body.light-mode .header.scrolled {
    background: rgba(255, 255, 255, 0.9);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: var(--header-height);
}

/* لوگو */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: -0.5px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* منو */
.menu {
    display: flex;
    align-items: center;
    gap: 2px;
}

.menu a {
    padding: 10px 9px;
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.menu a:hover,
.menu a.active {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

/* دکمه جستجو (آیکون ذره‌بین، دقیقاً هم‌شکل با دکمه تغییر تم) */
.search-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--text);
    font-family: inherit;
}

.search-toggle:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
}

/* نسخه‌ی جستجو که داخل منوست فقط برای موبایل است؛ روی دسکتاپ همیشه پنهان می‌ماند */
.nav-search-mobile {
    display: none;
}

/* دکمه تغییر تم */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--text);
}

.theme-toggle:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

/* همبرگر منو */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 2.5px;
    background: var(--text);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ========== Hero ========== */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: linear-gradient(rgba(10, 15, 26, 0.75), rgba(10, 15, 26, 0.85)),
                url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?w=1920&q=80') center/cover no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 60%, var(--bg) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.gold-text {
    color: var(--gold);
}

.hero-logo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2000px;
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    object-fit: contain;
    opacity: 0.15;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* دکمه‌ها */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Vazirmatn', sans-serif;
}

.btn-gold {
    background: var(--gold);
    color: #0F172A;
}

.btn-gold:hover {
    background: var(--gold-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

/* دکمه‌های داخل Hero همیشه روی پس‌زمینه تیره ثابت قرار دارند */
.hero-buttons .btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* نشانگر اسکرول */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.scroll-line {
    width: 1.5px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(212, 175, 55, 0.5), transparent);
    animation: scrollLine 2s infinite;
}

body.light-mode .scroll-indicator {
    color: rgba(15, 23, 42, 0.75);
}

@keyframes scrollLine {
    0% { height: 10px; opacity: 0; }
    50% { height: 40px; opacity: 1; }
    100% { height: 10px; opacity: 0; }
}

/* ========== هدر سکشن‌ها ========== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
    padding: 6px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 15px;
}

.section-line {
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 0 auto;
    border-radius: 2px;
}

/* ========== کارت شیشه‌ای ========== */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.glass-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ========== درباره ما ========== */
.about-text {
    padding: 40px;
    margin-bottom: 50px;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 15px;
    line-height: 2;
}

/* آمار */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.stat-card {
    padding: 35px 25px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ========== اسلایدر کتاب‌ها ========== */
.books-slider {
    position: relative;
}

.slider-container {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.slider-container.slider-center {
    justify-content: center;
    overflow-x: visible;
}

.slide {
    flex: 0 0 280px;
    scroll-snap-align: start;
    overflow: hidden;
}

.book-cover {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.book-cover img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.slide:hover .book-cover img {
    transform: scale(1.08);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide:hover .book-overlay {
    opacity: 1;
}

.book-info {
    padding: 20px;
    text-align: center;
}

.book-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.book-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.book-category {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* کنترل‌های اسلایدر */
.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 18px;
}

.slider-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.slider-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all var(--transition);
}

.slider-dot.active {
    background: var(--gold);
    width: 28px;
    border-radius: 5px;
}

/* ========== نویسندگان ========== */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.author-card,
.author-slide {
    padding: 35px 25px;
    text-align: center;
}

.author-slide {
    flex: 0 0 260px;
    scroll-snap-align: start;
}

.author-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid var(--gold);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-card h3,
.author-slide h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}

.author-card p,
.author-slide p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.author-card span,
.author-slide span {
    font-size: 0.85rem;
    color: var(--gold);
}

/* ========== اخبار ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.news-card,
.news-slide {
    padding: 30px;
}

.news-slide {
    flex: 0 0 320px;
    scroll-snap-align: start;
}

.news-date {
    font-size: 0.85rem;
    color: var(--gold);
    margin-bottom: 12px;
}

.news-card h3,
.news-slide h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.news-card p,
.news-slide p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.9;
}

.news-link {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    display: inline-block;
}

.news-link:hover {
    color: var(--gold-dark);
}

/* لینک‌کردن کل کارت‌ها (کتاب/نویسنده/خبر) */
.card-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.card-link:hover {
    color: inherit;
}

/* کارت "مشاهده همه" در انتهای هر اسلایدر */
.view-all-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    color: var(--gold);
    text-decoration: none;
    background: rgba(212, 175, 55, 0.06);
    border: 1.5px dashed rgba(212, 175, 55, 0.4);
    padding: 30px 20px;
    transition: all var(--transition);
}

.view-all-tile i {
    font-size: 2.2rem;
}

.view-all-tile span {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--gold);
}

.view-all-tile:hover {
    background: rgba(212, 175, 55, 0.14);
    border-color: var(--gold);
    transform: translateY(-5px);
}

/* ========== تماس با ما ========== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
}

.contact-info {
    padding: 35px;
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}

.info-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.contact-form {
    padding: 35px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    transition: all var(--transition);
    margin-bottom: 15px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.contact-form textarea {
    resize: vertical;
}

/* ==========================================================
   ========== فوتر با پشتیبانی کامل از لایت‌مود ==========
   ========================================================== */
.footer {
    background: var(--navy);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
    transition: background var(--transition);
}

body.light-mode .footer {
    background: #eef2f7;
    border-top: 1px solid rgba(0,0,0,0.08);
}

body.light-mode .footer-brand h3 {
    color: var(--gold-dark);
}

body.light-mode .footer-brand p,
body.light-mode .footer-links a,
body.light-mode .footer-newsletter p,
body.light-mode .footer-bottom {
    color: #1a1a2e;
}

body.light-mode .footer-links h4,
body.light-mode .footer-newsletter h4 {
    color: #0F172A;
}

body.light-mode .newsletter-form input {
    background: rgba(0,0,0,0.06);
    color: #0F172A;
    border-color: rgba(0,0,0,0.15);
}

/* ========== ساختار فوتر ========== */
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    display: block;
    max-height: 300px;
    width: auto;
    max-width: 100%;
    margin: 0 auto 18px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.footer-social a {
    font-size: 1.3rem;
    transition: transform 0.3s;
}

.footer-social a:hover {
    transform: scale(1.2);
}

.footer-links h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 18px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-newsletter h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.footer-newsletter p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    color: #ffffff;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.newsletter-form .btn {
    padding: 12px 22px;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========== ریسپانسیو ========== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .header {
        top: 10px;
        border-radius: 40px;
    }

    .navbar {
        padding: 0 20px;
    }

    .menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: blur(30px);
        flex-direction: column;
        align-items: stretch;
        padding: 100px 30px 30px;
        gap: 5px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--glass-border);
        z-index: 999;
    }

    .menu.active {
        right: 0;
    }

    .menu a {
        padding: 14px 20px;
        font-size: 1.1rem;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .slider-container {
        gap: 15px;
    }

    .slide {
        flex: 0 0 240px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        max-width: 220px;
        margin: 0 auto;
    }

    .section-padding {
        padding: 60px 0;
    }
}
/* ==========================================================
   ========== افزوده‌های تکمیلی برای صفحات داخلی و UX ==========
   ========================================================== */

/* حالت خالی (وقتی هنوز داده‌ای ثبت نشده) */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 15px;
    display: block;
}

/* پیام موفقیت فرم تماس */
.form-success {
    text-align: center;
    padding: 40px 20px;
}

.form-success i {
    font-size: 3rem;
    color: #22c55e;
    margin-bottom: 15px;
    display: block;
}

.form-success h3 {
    color: var(--text);
    margin-bottom: 8px;
}

.form-success p {
    color: var(--text-secondary);
}

.form-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* کارت خبر با تصویر */
.news-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-thumb img,
.news-slide:hover .news-thumb img {
    transform: scale(1.06);
}

.news-body {
    padding: 25px 30px 30px;
}

.news-card,
.news-slide {
    padding: 0;
    overflow: hidden;
}

/* دکمه بازگشت به بالا */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gold);
    color: #0F172A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all var(--transition);
    z-index: 900;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--gold-dark);
    transform: translateY(-4px);
}

/* ========== صفحات داخلی (کتاب/نویسنده/خبر) ========== */
.detail-hero {
    padding-top: 140px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 30px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--gold);
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding: 40px;
    margin-bottom: 30px;
    align-items: start;
}

.detail-media img {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text);
    margin: 15px 0 20px;
}

.detail-meta-list {
    margin-bottom: 25px;
}

.detail-meta-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.detail-meta-list li i {
    color: var(--gold);
    width: 18px;
    text-align: center;
}

.meta-tag {
    color: var(--gold);
    font-weight: 700;
}

.meta-tag:hover {
    text-decoration: underline;
}

.detail-description {
    padding: 40px;
    margin-bottom: 40px;
}

.detail-description h3 {
    color: var(--gold);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.detail-description p {
    color: var(--text-secondary);
    line-height: 2.1;
    text-align: justify;
}

.related-section {
    margin-bottom: 40px;
}

.related-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-title i {
    color: var(--gold);
}

.related-book {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: center;
}

.related-book img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.related-book span {
    padding: 14px;
    font-weight: 600;
    color: var(--text);
}

.cta-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 35px 40px;
    flex-wrap: wrap;
}

.cta-banner h3 {
    color: var(--text);
    margin-bottom: 6px;
}

.cta-banner p {
    color: var(--text-secondary);
}

/* پروفایل نویسنده */
.profile-card {
    padding: 50px 40px;
    text-align: center;
    margin-bottom: 40px;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--gold);
    margin: 0 auto 25px;
}

.profile-card h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
}

.profile-bio {
    max-width: 650px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 2.1;
    text-align: justify;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 25px;
}

.book-mini {
    display: flex;
    gap: 15px;
    padding: 15px;
    align-items: center;
}

.book-mini img {
    width: 70px;
    height: 95px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.book-mini-info h4 {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 8px;
}

/* مقاله خبر */
.news-article {
    padding: 45px;
    margin-bottom: 40px;
}

.news-article h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text);
    margin: 15px 0 25px;
}

.news-article-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 30px;
}

.news-article-body {
    color: var(--text-secondary);
    line-height: 2.2;
    font-size: 1.05rem;
    text-align: justify;
}

.not-found {
    padding-top: 160px;
}

/* ========== ریسپانسیو تکمیلی ========== */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-media img {
        max-width: 240px;
        margin: 0 auto;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
    }

    .back-to-top {
        left: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

/* ============================================
   افزونه‌های نسخه جدید: جست‌وجو، فیلتر، لایک، انیمیشن ورود
   ============================================ */

/* ---------- انیمیشن ورود عناصر هنگام اسکرول ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- دکمه "مشاهده همه کتاب‌ها" ---------- */
.view-all-wrap {
    text-align: center;
    margin-top: 35px;
}

/* ---------- نوار ابزار جست‌وجو و فیلتر ---------- */
.books-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 22px;
    margin-bottom: 40px;
    align-items: center;
}

.search-box,
.filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    flex: 1;
    min-width: 220px;
}

.search-box i,
.filter-box i {
    color: var(--gold);
    font-size: 0.95rem;
}

.search-box input,
.filter-box select {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
}

.filter-box {
    flex: 0 0 220px;
}

.filter-box select option {
    background: var(--bg-secondary);
    color: var(--text);
}

/* ---------- گرید کتاب‌ها (صفحه جست‌وجو) ---------- */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    transition: opacity 0.25s ease;
}

.book-grid.loading {
    opacity: 0.5;
}

.book-grid .slide-item,
.book-grid .author-slide,
.book-grid .news-slide {
    width: 100%;
    flex: none;
}

/* اسکلتون بارگذاری */
.grid-skeleton {
    display: contents;
}

.skeleton-card {
    height: 320px;
    border-radius: var(--border-radius);
    background: linear-gradient(100deg, var(--surface) 30%, var(--surface-hover) 50%, var(--surface) 70%);
    background-size: 200% 100%;
    animation: skeletonShine 1.4s ease-in-out infinite;
    grid-column: span 1;
}

@keyframes skeletonShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- اکشن‌های صفحه کتاب ---------- */
.detail-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 25px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .books-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-box {
        flex: 1;
    }
}

/* ============================================
   افزونه‌های نسخه سوم: جستجوی سراسری، منوی موبایل، فوتر
   ============================================ */

/* ---------- پنل جستجوی سراسری (بخشی از خود هدر شیشه‌ای، نه یک باکس جدا و بی‌ربط) ---------- */
.search-overlay {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
    border-top: 1px solid transparent;
}

.search-overlay.active {
    max-height: 75vh;
    opacity: 1;
    padding: 18px 25px 22px;
    border-top-color: var(--glass-border);
    overflow-y: auto;
}

.header.search-open,
.header.scrolled.search-open {
    border-radius: 26px;
}

@media (max-width: 992px) {
    .header.search-open,
    .header.scrolled.search-open {
        border-radius: 24px;
    }
}

.search-overlay-box {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 12px 20px;
}

.search-overlay-box i:first-child {
    color: var(--gold);
    flex: 0 0 auto;
}

.search-overlay-box input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}

.search-overlay-box button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.search-overlay-box button:hover {
    color: var(--gold);
}

.search-overlay-results {
    max-width: 900px;
    margin: 0 auto;
}

.search-overlay-results .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.search-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 1.4rem;
}

/* ---------- کنتراست بهتر منوی موبایل ---------- */
@media (max-width: 992px) {
    .menu {
        background: rgba(10, 15, 26, 0.98);
        backdrop-filter: blur(12px);
    }

    body.light-mode .menu {
        background: rgba(255, 255, 255, 0.98);
    }

    .menu a {
        color: var(--text);
    }

    .nav-search-mobile {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        background: none;
        border: 1px solid var(--border);
        border-radius: 25px;
        padding: 14px 20px;
        font-size: 1.1rem;
        font-family: inherit;
        color: var(--text);
        cursor: pointer;
        margin: 4px 0;
    }

    .nav-search-desktop {
        display: none;
    }
}

/* ---------- فوتر: سه ستون بعد از حذف خبرنامه ---------- */
.footer-content {
    grid-template-columns: 2fr 1fr 1fr;
}
