/* =========================
   Reset & Base
   ========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #050810;
    color: #f5f5f5;
    line-height: 1.7;
    direction: rtl;
    text-align: right;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* متغیرهای رنگ مخصوص هدر مغز */

:root {
    --accent-frontal: #fbbf24;
    /* زرد گرم برای تصمیم */
    --accent-temporal: #38bdf8;
    /* آبی روشن برای روایت */
    --accent-parietal: #f97373;
    /* قرمز ملایم برای بقا */
    --accent-current: #fbbf24;
    /* پیش‌فرض: لوپ پیشانی */
}

/* =========================
   Header / Navbar
   ========================= */

header {
    position: static;
    /* اگر بعداً خواستی sticky کنی، فقط همین را به sticky تغییر بده */
    width: 100%;
    z-index: 9999;
}
.site-header {
    width: 100%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* برای Safari */
    background: linear-gradient(to bottom, rgba(5, 8, 16, 0.96), rgba(5, 8, 16, 0.85), transparent);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: radial-gradient(circle at 20% 0%, #ffe082, #ffca28 40%, #f57c00 100%);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.8);
}

.brand-text-main {
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 1.05rem;
}

.brand-text-sub {
    font-size: 0.75rem;
    opacity: 0.75;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.9rem;
}

.nav-links a {
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-cta {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 193, 7, 0.8);
    font-size: 0.85rem;
    background: radial-gradient(circle at 0 0, rgba(255, 248, 225, 0.25), transparent);
}

.nav-toggle {
    display: none;
    cursor: pointer;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
}
/* بک‌دراپ منوی موبایل - حالت پایه */
.nav-backdrop {
    display: none;
}

/* وقتی منو باز است، اسکرول صفحه قفل شود */
body.nav-open {
    overflow: hidden;
}

/* =========================
   Main Layout
   ========================= */

main {
    padding-bottom: 4rem;
}

/* =========================
   Generic Buttons
   ========================= */

.btn {
    border-radius: 999px;
    padding: 0.65rem 1.3rem;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #1a1304;
    box-shadow: 0 10px 28px rgba(255, 193, 7, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(255, 193, 7, 0.55);
}

.btn-ghost {
    background: transparent;
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* =========================
   Sections – Generic
   ========================= */

section {
    padding: 1.8rem 0 0;
}

.section-header {
    margin-bottom: 1rem;
}

.section-eyebrow {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 0.3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.section-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* =========================
   Hero – نویسنده (بعد از هدر مغز)
   ========================= */

.hero {
    padding: 2.8rem 0 2.4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
    gap: 3rem;
    align-items: center;
}

.hero-kicker {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: clamp(2.1rem, 3vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 0.85rem;
}

.hero-title span {
    background: linear-gradient(120deg, #ffeb3b, #ff9800);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 0.98rem;
    max-width: 32rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
}

.hero-meta {
    font-size: 0.78rem;
    opacity: 0.65;
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.hero-meta-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffc107;
}

/* باکس معماری مغز سایت در هدر نویسنده */

.hero-showcase {
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.08), transparent 55%),
        radial-gradient(circle at 80% 100%, rgba(255, 193, 7, 0.16), transparent 60%);
    padding: 1.6rem 1.4rem 1.4rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.7);
}

.hero-showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.1rem;
    font-size: 0.78rem;
    opacity: 0.8;
}

.hero-brain {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.brain-lobe {
    border-radius: 18px;
    padding: 0.85rem;
    background: rgba(10, 14, 24, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    min-height: 96px;
}

.brain-lobe h3 {
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
    opacity: 0.9;
}

.brain-lobe p {
    font-size: 0.76rem;
    opacity: 0.8;
}

.brain-tag {
    display: inline-flex;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.68rem;
    opacity: 0.8;
    margin-top: 0.45rem;
}

/* =========================
   Books Grid
   ========================= */

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.3rem;
    margin-top: 1.3rem;
}

.book-card {
    border-radius: 18px;
    background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.05), transparent 65%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 220px;
    transition:
        box-shadow 0.22s ease,
        transform 0.22s ease,
        border-color 0.22s ease;
}

.book-card-cover {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: block;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    object-fit: cover;
    aspect-ratio: 3 / 4;
    /* نسبت تقریبی جلد کتاب */
}

.book-label {
    font-size: 0.72rem;
    opacity: 0.7;
}

.book-title {
    font-weight: 700;
    font-size: 1rem;
}

.book-subtitle {
    font-size: 0.82rem;
    opacity: 0.82;
}

.book-meta {
    font-size: 0.75rem;
    opacity: 0.7;
}

.book-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.78rem;
}

.pill {
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    opacity: 0.9;
}

.pill-highlight {
    border-color: rgba(255, 193, 7, 0.9);
    color: #ffecb3;
}

/* های‌لایت کتاب بر اساس لوپ مغز */

.book-highlight {
    box-shadow:
        0 0 0 1px rgba(248, 250, 252, 0.1),
        0 18px 50px rgba(15, 23, 42, 1),
        0 0 35px rgba(251, 191, 36, 0.55);
    transform: translateY(-4px);
    border-radius: 18px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* =========================
   About Section
   ========================= */

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.8fr);
    gap: 2rem;
    margin-top: 1.3rem;
    align-items: start;
}

.about-bio {
    font-size: 0.92rem;
    opacity: 0.9;
    display: grid;
    gap: 0.7rem;
}

.about-facts {
    display: grid;
    gap: 0.55rem;
    font-size: 0.84rem;
    opacity: 0.85;
}

.about-facts strong {
    font-weight: 600;
}

.about-panel {
    border-radius: 18px;
    padding: 1rem;
    background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.03), transparent 60%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    display: grid;
    gap: 0.6rem;
}

.about-image {
    justify-self: center;
}

.author-poster {
    max-width: 420px;
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.6);
    display: block;
}

/* نسخه دوم برای چیدمان گسترده‌تر */

.about-layout.wide {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: 3rem;
    align-items: center;
}

/* =========================
   Contact Section (در صفحه اصلی)
   ========================= */

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
    gap: 1.8rem;
    margin-top: 1.3rem;
    align-items: start;
    font-size: 0.9rem;
}

form {
    display: grid;
    gap: 0.7rem;
}

label {
    font-size: 0.8rem;
    opacity: 0.8;
}

input,
textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(4, 6, 12, 0.9);
    color: #f5f5f5;
    font: inherit;
    padding: 0.55rem 0.7rem;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: rgba(255, 193, 7, 0.8);
    box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.5);
}

textarea {
    min-height: 120px;
}

.contact-side {
    opacity: 0.85;
    display: grid;
    gap: 0.5rem;
}

.contact-list {
    display: grid;
    gap: 0.35rem;
    font-size: 0.86rem;
}

.contact-list span {
    opacity: 0.8;
}

/* =========================
   Book Hero (صفحه کتاب تکی)
   ========================= */

.book-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.book-hero-cover img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    object-fit: cover;
}

/* =========================
   Contact Page (contact.html)
   ========================= */

.contact-hero {
    padding-top: 7rem;
    padding-bottom: 7rem;
}

.contact-card {
    background: radial-gradient(circle at top left, #252836, #14151c 60%, #10121a 100%);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.contact-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.contact-form label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.contact-form input,
.contact-form textarea {
    background: rgba(10, 12, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(255, 204, 0, 0.7);
    box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.2);
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.btn-full {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

/* فیلد هانی‌پات – از دید کاربر مخفی شود */

.contact-form .honeypot {
    display: none;
}

.contact-extra {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* =========================
   Footer
   ========================= */

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0 1.2rem;
    font-size: 0.78rem;
    opacity: 0.7;
    margin-top: 2.2rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* =========================
   Hero Brain V2 – سکشن اول سایت
   ========================= */

/* خود سکشن */

.brain-hero {
    background: radial-gradient(circle at top, #111827 0%, #020617 55%, #000000 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    position: relative;
    overflow: hidden;
}

/* هاله متحرک پشت مغز */

.brain-hero::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 15% 10%, rgba(148, 163, 184, 0.12), transparent 60%),
        radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.08), transparent 65%),
        radial-gradient(circle at 60% 80%, rgba(248, 250, 252, 0.04), transparent 70%);
    opacity: 0.7;
    pointer-events: none;
    animation: heroGlow 18s linear infinite alternate;
}

/* ظرف داخلی */

.brain-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 96px 6vw 72px;
    min-height: calc(100vh - 96px);
    /* تقریباً قد یک صفحه */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* متن سمت راست/چپ هدر مغز */

.hero-text {
    flex: 1.2;
    color: #e5e7eb;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 14px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7));
    backdrop-filter: blur(8px);
}

.hero-text h1 {
    font-size: 28px;
    line-height: 1.7;
    margin: 0 0 10px;
    color: #f9fafb;
}

.hero-text h1 .hero-phrase {
    display: inline-block;
    margin-right: 4px;
    color: var(--accent-current);
    transition: color 0.35s ease;
}

.hero-phrase {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-phrase.fade-out {
    opacity: 0;
    transform: translateY(6px);
}

.hero-subtitle {
    margin-top: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.9;
    color: #9ca3af;
}

.hero-loops {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #9ca3af;
}

.hero-loops .loops-label {
    margin-left: 4px;
}

.loop-btn {
    border-radius: 999px;
    padding: 4px 12px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.85);
    color: #cbd5f5;
    font-size: 12px;
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        transform 0.15s ease;
}

.loop-btn:hover {
    border-color: rgba(248, 250, 252, 0.7);
}

.loop-btn.active {
    background: rgba(248, 250, 252, 0.1);
    color: var(--accent-current);
    border-color: var(--accent-current);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.4);
}

/* گرافیک مغز و اوربیت‌ها */

.brain-hero-visual {
    flex: 0 0 auto;
    position: relative;
    width: min(320px, 40vw);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brain-hero-glow {
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(248, 250, 252, 0.18), transparent 65%);
    filter: blur(20px);
    opacity: 0.7;
    mix-blend-mode: screen;
}

.brain-core {
    position: relative;
    width: 65%;
    height: 65%;
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 20%, rgba(248, 250, 252, 0.15), transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(148, 163, 184, 0.35), transparent 55%),
        radial-gradient(circle, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.7),
        0 18px 45px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.brain-pulse {
    position: absolute;
    inset: 22%;
    border-radius: inherit;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    animation: brainPulse 4.5s linear infinite;
}

.brain-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent-current);
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.8);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.brain-dot.dot-1 {
    top: 26%;
    left: 22%;
}

.brain-dot.dot-2 {
    top: 40%;
    right: 18%;
}

.brain-dot.dot-3 {
    bottom: 24%;
    left: 42%;
}

.brain-orbit {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 0 20px rgba(15, 23, 42, 1);
}

.orbit-1 {
    width: 82%;
    height: 82%;
    animation: orbitSpin 20s linear infinite;
}

.orbit-2 {
    width: 100%;
    height: 100%;
    transform: rotate(25deg);
    border-style: dashed;
    border-color: rgba(55, 65, 81, 0.8);
    animation: orbitSpinReverse 28s linear infinite;
}

/* =========================
   Keyframes مشترک
   ========================= */

@keyframes heroGlow {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(-10px, 10px, 0) scale(1.03);
    }

    100% {
        transform: translate3d(10px, -5px, 0) scale(1.02);
    }
}

@keyframes brainPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.6;
        border-color: rgba(148, 163, 184, 0.5);
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
        border-color: rgba(248, 250, 252, 0.7);
    }

    100% {
        transform: scale(1.03);
        opacity: 0.75;
        border-color: rgba(148, 163, 184, 0.4);
    }
}

@keyframes orbitSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes orbitSpinReverse {
    from {
        transform: rotate(25deg);
    }

    to {
        transform: rotate(385deg);
    }
}

/* =========================
   Responsive
   ========================= */

/* هدر نویسنده و گریدها */

@media (max-width: 800px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-showcase {
        order: -1;
    }

    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-layout,
    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* منو روی موبایل + بک‌دراپ + ریسپانسیو */

@media (max-width: 640px) {

    /* خود هدر در موبایل بالاتر از همهٔ محتوا قرار بگیرد */
    .site-header {
        position: relative;
        z-index: 20000;
    }

    .nav {
        padding: 0.6rem 0;
    }

    /* پنل منو – بازشونده زیر هدر */
    .nav-links {
        position: absolute;
        inset-inline: 0;
        top: 100%;
        /* یعنی درست زیر هدر */
        background: rgba(5, 8, 16, 0.98);
        flex-direction: column;
        padding: 0.85rem 1.5rem 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        transform: translateY(-16px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.2s ease, opacity 0.2s ease;
        z-index: 21000;
        /* بالاتر از بک‌دراب و هدر */
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
    }

    .nav-links.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-toggle {
        display: inline-flex;
    }

    /* بک‌دراب تاریک پشت منو در موبایل */
    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 19000;
        /* زیر پنل منو، بالاتر از محتوا و hero */
    }

    .nav-backdrop.is-active {
        opacity: 1;
        pointer-events: auto;
    }

    /* ریسپانسیو قبلی خودت برای گرید کتاب‌ها و هیرو */

    .books-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero {
        padding-top: 1.9rem;
    }
}

/* ریسپانسیو برای about و book hero */

@media (max-width: 768px) {

    .about-layout,
    .about-layout.wide {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
    }

    .about-content {
        text-align: center;
    }

    .book-hero-layout {
        grid-template-columns: 1fr;
    }

    .book-hero-text {
        text-align: center;
    }

    .contact-hero {
        padding-top: 5rem;
        padding-bottom: 4rem;
    }

    .contact-card {
        margin-top: 2rem;
        padding: 1.5rem 1.4rem;
    }
}

/* ریسپانسیو برای هدر مغز */

@media (max-width: 900px) {
    .brain-hero-inner {
        min-height: auto;
        padding: 80px 16px 48px;
        flex-direction: column-reverse;
        text-align: center;
    }

    .brain-hero-visual {
        width: min(260px, 60vw);
        margin-bottom: 24px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-loops {
        justify-content: center;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .brain-hero-inner {
        padding: 64px 24px 40px;
    }

    .brain-hero-visual {
        width: 45vw;
    }
}

@media (min-width: 1200px) {
    .hero-grid {
        gap: 3rem;
    }

    .brain-hero-inner {
        gap: 56px;
    }

    .hero-text h1 {
        font-size: 30px;
    }
}

/* === احیای انیمیشن مدارهای فانوس مغز === */

.brain-hero-visual,
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* خود مدارها */
.brain-orbit {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 0 20px rgba(15, 23, 42, 1);
    transform-origin: 50% 50%;
}

/* مدار بیرونی – چرخش جهت عقربه ساعت */
.brain-orbit.orbit-1 {
    width: 82%;
    height: 82%;
    animation: orbitSpin 20s linear infinite;
}

/* مدار داخلی – چرخش خلاف عقربه ساعت */
.brain-orbit.orbit-2 {
    width: 100%;
    height: 100%;
    border-style: dashed;
    border-color: rgba(55, 65, 81, 0.8);
    animation: orbitSpinReverse 28s linear infinite;
}

/* تپش ملایم هسته */
.brain-core {
    animation: corePulse 10s ease-in-out infinite;
}

/* پالس نرم برای نقطه‌ها */
.brain-dot {
    animation: dotPulse 3.8s ease-in-out infinite;
}

/* ---- keyframes ---- */

@keyframes orbitSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes orbitSpinReverse {
    from {
        transform: rotate(25deg);
    }

    to {
        transform: rotate(385deg);
    }
}

@keyframes corePulse {
    0% {
        transform: scale(1);
        box-shadow:
            0 0 0 0 rgba(15, 23, 42, 0.9),
            0 18px 45px rgba(0, 0, 0, 0.9);
    }

    50% {
        transform: scale(1.02);
        box-shadow:
            0 0 35px rgba(148, 163, 184, 0.4),
            0 22px 55px rgba(0, 0, 0, 0.95);
    }

    100% {
        transform: scale(1);
        box-shadow:
            0 0 0 0 rgba(15, 23, 42, 0.9),
            0 18px 45px rgba(0, 0, 0, 0.9);
    }
}

@keyframes dotPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.7);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 18px rgba(251, 191, 36, 0.95);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.7);
        opacity: 0.9;
    }
}