/* ============================================
   تعریف دقیق فونت‌های Khamenei
   ============================================ */
@font-face {
    font-family: 'Khamenei';
    src: url('../fonts/KhameneiRegular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Khamenei';
    src: url('../fonts/KhameneiWeb.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Khamenei';
    src: url('../fonts/KhameneiBold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Khamenei';
    src: url('../fonts/KhameneiBlack.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* اعمال اجباری فونت برای اطمینان */
body {
    font-family: 'Khamenei', serif !important;
    font-weight: 400;
    background: linear-gradient(180deg, #243279 0%, #e8dcc8 7%);
    color: var(--twilight);
    line-height: 1.8;
    overflow-x: hidden;
}


/* ============================================
   قصه آقا - استایل‌های حرفه‌ای
   ============================================ */

/* === Variables === */
:root {
    --twilight: #243279;
    --twilight-light: #3a4a9e;
    --camel: #b89358;
    --camel-light: #d4b87a;
    --pale: #d6c1a3;
    --pale-light: #e8dcc8;
    --white: #ffffff;
    --black: #000000;
    
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Khamenei', serif !important;
    font-weight: 400;
    /* background: linear-gradient(180deg, #faf6f0 0%, #f0e9dc 100%); */
    background: linear-gradient(180deg, #243279 0%, #e8dcc8 7%);

    color: var(--twilight);
    line-height: 1.8;
    overflow-x: hidden;
}

/* === Typography === */
h1 {
    font-family: 'Khamenei', serif;
    font-weight: 900; /* Black */
    line-height: 1.3;
}

h2 {
    font-family: 'Khamenei', serif;
    font-weight: 700; /* Bold */
    line-height: 1.3;
}

h3, h4 {
    font-family: 'Khamenei', serif;
    font-weight: 500; /* Web */
    line-height: 1.3;
}

p, span, a, li, input, textarea, button {
    font-family: 'Khamenei', serif;
    font-weight: 400; /* Regular */
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(36, 50, 121, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 3px solid var(--camel);
    box-shadow: 0 10px 40px rgba(36, 50, 121, 0.3);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(36, 50, 121, 0.98);
    box-shadow: 0 15px 50px rgba(36, 50, 121, 0.4);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: 'Khamenei', serif;
    font-size: 5rem;
    font-weight: 900;
    color: var(--camel);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    margin-top: 5px;
}

.nav-logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--camel), var(--camel-light));
    transition: width var(--transition-fast);
}

.nav-logo:hover::after {
    width: 100%;
}

.nav-logo:hover {
    transform: scale(1.05);
    color: var(--camel-light);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    position: relative;
    color: var(--pale);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.35rem;
    padding: 0.5rem 0;
    transition: all var(--transition-fast);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--camel), var(--camel-light));
    transition: width var(--transition-fast);
}

.nav-link:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--camel);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0.5rem;
}

.mobile-menu-btn:hover {
    transform: rotate(90deg);
    color: var(--camel-light);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(36, 50, 121, 0.98);
    border-top: 2px solid var(--camel);
    padding: 1.5rem;
    animation: slideDown 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    color: var(--pale);
    text-decoration: none;
    padding: 1rem;
    border-bottom: 1px solid rgba(184, 147, 88, 0.2);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.mobile-menu a:hover {
    background: rgba(184, 147, 88, 0.1);
    padding-right: 1.5rem;
    color: var(--camel-light);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, rgba(36, 50, 121, 0.05) 0%, rgba(36, 50, 121, 0.1) 100%);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-card {
    background: var(--white);
    border: 3px solid var(--camel);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(36, 50, 121, 0.15);
    transition: all var(--transition-normal);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(184, 147, 88, 0.25);
}

.contact-card-title {
    font-size: 2rem;
    color: var(--twilight);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.contact-card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--camel), var(--camel-light));
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    transition: all var(--transition-fast);
}

.contact-item:hover {
    transform: translateX(-10px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--twilight), var(--twilight-light));
    color: var(--camel);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    border: 2px solid var(--camel);
}

.contact-item:hover .contact-icon {
    background: linear-gradient(135deg, var(--camel), var(--camel-light));
    color: var(--twilight);
    transform: rotate(360deg) scale(1.1);
}

.contact-details h4 {
    font-weight: 700;
    color: var(--twilight);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.contact-details p {
    color: var(--twilight);
    opacity: 0.8;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--pale);
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--twilight);
    color: var(--camel);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all var(--transition-fast);
    border: 2px solid var(--camel);
    text-decoration: none;
    flex-shrink: 0;
}

.social-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
    transition: filter 0.3s ease;
}

.social-link:hover {
    background: var(--camel);
    color: var(--twilight);
    transform: translateY(-5px) rotate(10deg);
    box-shadow: 0 10px 30px rgba(184, 147, 88, 0.4);
}

.social-link:hover img {
    filter: invert(1%) sepia(25%) saturate(6000%) hue-rotate(200deg) brightness(90%) contrast(95%);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 700;
    color: var(--twilight);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--pale);
    border-radius: 12px;
    background: var(--pale-light);
    color: var(--twilight);
    font-family: 'Khamenei', serif;
    font-weight: 400;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--camel);
    box-shadow: 0 0 20px rgba(184, 147, 88, 0.2);
    background: var(--white);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--camel), var(--camel-light));
    color: var(--twilight);
    border: none;
    border-radius: 12px;
    font-family: 'Khamenei', serif;
    font-weight: 700;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 10px 30px rgba(184, 147, 88, 0.3);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(184, 147, 88, 0.5);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--twilight);
    border-top: 5px solid var(--camel);
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-family: 'Khamenei', serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--camel);
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--pale);
    line-height: 2;
    opacity: 0.9;
}

.footer-title {
    font-family: 'Khamenei', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--camel);
    margin-bottom: 1.5rem;
    align-self: center;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--pale);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--camel-light);
    transform: translateX(-5px);
}

.footer-qr {
    background: var(--pale);
    width: 150px;
    height: 150px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto; /* فاصله مناسب از متن پایین */
    border: 3px solid var(--camel);
    transition: all var(--transition-fast);
    overflow: hidden; /* <--- این خط حیاتی است: هر چیزی بیرون بزند بریده می‌شود */
}
.div-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}


/* <--- این بخش کلیدی است: محدود کردن اندازه تصویر داخل کادر */
.footer-qr img {
    max-width: 85%;  /* تصویر حداکثر 85 درصد عرض کادر را بگیرد (برای زیبایی و فاصله از لبه) */
    max-height: 85%; /* تصویر حداکثر 85 درصد ارتفاع کادر را بگیرد */
    width: auto;
    height: auto;
    object-fit: contain; /* تضمین می‌کند که کل QR Code بدون بریدگی یا دفرمه شدن دیده شود */
}


.footer-qr:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(184, 147, 88, 0.3);
}

.footer-qr i {
    font-size: 6rem;
    color: var(--twilight);
}

.footer-qr-text {
    text-align: center;
    color: var(--pale);
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 2px solid rgba(184, 147, 88, 0.3);
    padding-top: 2rem;
    text-align: center;
    color: var(--pale);
    opacity: 0.7;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-container {
        height: 70px;
    }
    
    .contact-section {
        padding: 4rem 1rem;
    }
    
    .contact-card {
        padding: 2rem 1.5rem;
    }
    
    .footer {
        padding: 3rem 1rem 2rem;
    }
}

/* === Comic Card Overlay Buttons === */
.comic-overlay {
    position: absolute;
    inset: 0;
    background: rgba(36, 50, 121, 0.85); /* کمی تیره‌تر برای خوانایی بهتر دکمه‌ها */
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column; /* چیدمان عمودی دکمه‌ها */
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.comic-card:hover .comic-overlay {
    opacity: 1;
}

.overlay-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: 'Khamenei', serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    transform: translateY(20px);
    opacity: 0;
}

/* انیمیشن ورود دکمه‌ها */
.comic-card:hover .overlay-btn {
    transform: translateY(0);
    opacity: 1;
}
.comic-card:hover .overlay-btn:nth-child(1) { transition-delay: 0.1s; }
.comic-card:hover .overlay-btn:nth-child(2) { transition-delay: 0.2s; }

.overlay-btn.view-cover-btn {
    background: var(--white);
    color: var(--twilight);
    border-color: var(--white);
}

.overlay-btn.view-cover-btn:hover {
    background: transparent;
    color: var(--white);
}

.overlay-btn.view-pdf-btn {
    background: var(--camel);
    color: var(--twilight);
    border-color: var(--camel);
}

.overlay-btn.view-pdf-btn:hover {
    background: transparent;
    color: var(--camel);
}

/* === Image Modal Specific Styles === */
#imageModal .modal-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#modalFullImage {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

/* === Comic Card Overlay Buttons === */
.comic-overlay {
    position: absolute;
    inset: 0;
    background: rgba(36, 50, 121, 0.85);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.comic-card:hover .comic-overlay { opacity: 1; }

.overlay-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: 'Khamenei', serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    transform: translateY(20px);
    opacity: 0;
}

.comic-card:hover .overlay-btn {
    transform: translateY(0);
    opacity: 1;
}
.comic-card:hover .overlay-btn:nth-child(1) { transition-delay: 0.1s; }
.comic-card:hover .overlay-btn:nth-child(2) { transition-delay: 0.2s; }

.overlay-btn.view-cover-btn {
    background: var(--white);
    color: var(--twilight);
    border-color: var(--white);
}

.overlay-btn.view-cover-btn:hover {
    background: transparent;
    color: var(--white);
}

.overlay-btn.view-pdf-btn {
    background: var(--camel);
    color: var(--twilight);
    border-color: var(--camel);
}

.overlay-btn.view-pdf-btn:hover {
    background: transparent;
    color: var(--camel);
}

.comic-info {
    height: 60px; /* یا هر مقدار دلخواه دیگر */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; /* برای مرورگرهای قدیمی‌تر */
}

.comic-info h1 {
    font-size: large;
    margin: 0; /* حذف حاشیه پیش‌فرض h1 برای کنترل بهتر ارتفاع */
    /* width: 100%; */
}


/* === Video Poster & Play Button === */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(184, 147, 88, 0.95);
    border: 4px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.play-button i {
    font-size: 2rem;
    color: #243279;
    margin-right: -5px;
}

.video-poster:hover .play-button {
    background: #b89358;
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 15px 50px rgba(184, 147, 88, 0.6);
}

.video-poster.hidden {
    display: none;
}

/* === Features Grid (سه کارت ویژگی‌ها) === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: linear-gradient(135deg, rgba(214, 193, 163, 0.2) 0%, rgba(184, 147, 88, 0.1) 100%);
    border: 2px solid var(--camel);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--camel), var(--camel-light));
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(184, 147, 88, 0.3);
    background: linear-gradient(135deg, rgba(214, 193, 163, 0.3) 0%, rgba(184, 147, 88, 0.2) 100%);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--twilight), var(--twilight-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--camel);
    transition: all var(--transition-fast);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--camel), var(--camel-light));
    transform: rotate(360deg) scale(1.1);
}

.feature-icon i {
    font-size: 1.8rem;
    color: var(--camel);
    transition: all var(--transition-fast);
}

.feature-card:hover .feature-icon i {
    color: var(--twilight);
}

.feature-number {
    font-family: 'Khamenei', serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--twilight);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.feature-title {
    font-size: 0.95rem;
    color: var(--twilight);
    font-weight: 500;
    line-height: 1.6;
}

/* Responsive برای کارت‌ها */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: right;
        padding: 1rem;
    }
    
    .feature-icon {
        margin: 0;
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .feature-number {
        font-size: 2rem;
        margin-bottom: 0;
    }
    
    .feature-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .feature-card {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon {
        margin: 0 auto 0.5rem;
    }
}
.logo-image {
    height: 70px; /* ارتفاع لوگو */
    width: auto;
    object-fit: contain;
    transition: all var(--transition-fast);
    margin-top: 50px;
}

.nav-logo:hover .logo-image {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(184, 147, 88, 0.3));
}

/* برای موبایل */
@media (max-width: 768px) {
    .logo-image {
        height: 65px;
    }
}

/* === Typewriter Section === */
.typewriter-section {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, rgba(36, 50, 121, 0.05) 0%, rgba(184, 147, 88, 0.05) 100%);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typewriter-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.typewriter-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--twilight), var(--twilight-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--camel);
    animation: pulse 2s infinite;
}

.typewriter-icon i {
    font-size: 2rem;
    color: var(--camel);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(184, 147, 88, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(184, 147, 88, 0);
    }
}

/* === Typewriter Section === */
.typewriter-section {
    padding: 2rem 2rem;
    background: linear-gradient(135deg, rgba(36, 50, 121, 0.05) 0%, rgba(184, 147, 88, 0.05) 100%);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typewriter-layout {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 1200px;
    width: 100%;
    direction: rtl;
}

.typewriter-icon-fixed {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--twilight), var(--twilight-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--camel);
    animation: pulse 2s infinite;
    position: sticky;
    top: 120px;
}

.typewriter-icon-fixed i {
    font-size: 3rem;
    color: var(--camel);
}

.typewriter-text-container {
    flex: 1;
    font-family: 'Khamenei', serif;
    font-size: 1.5rem;
    line-height: 1.9;
    color: var(--twilight);
    text-align: right;
    direction: rtl;
    min-height: auto;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1.4em;
    background-color: var(--camel);
    margin-right: 2px;
    vertical-align: middle;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(184, 147, 88, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(184, 147, 88, 0); }
}

@media (max-width: 768px) {
    .typewriter-layout {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .typewriter-icon-fixed {
        position: relative;
        top: 0;
        width: 90px;
        height: 90px;
    }
    
    .typewriter-icon-fixed i {
        font-size: 2.5rem;
    }
    
    .typewriter-text-container {
        text-align: justify;
        font-size: 1.2rem;
        line-height: 2;
    }
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(36, 50, 121, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 3px solid var(--camel);
    box-shadow: 0 10px 40px rgba(36, 50, 121, 0.3);
    transition: all var(--transition-normal);
    overflow: hidden; /* مهم: برای جلوگیری از بیرون زدن پارتیکل‌ها */
}

.navbar-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* کلیک‌ها از روی آن رد می‌شوند */
    z-index: 1;
}

.nav-container {
    position: relative;
    z-index: 2; /* بالاتر از پارتیکل‌ها */
}


.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--camel-light), 
        var(--camel), 
        var(--camel-light), 
        transparent
    );
    animation: shimmerLine 4s linear infinite;
    z-index: 3;
}

@keyframes shimmerLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.navbar::before {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, 
        rgba(36, 50, 121, 0.3), 
        transparent
    );
    pointer-events: none;
    z-index: 2;
}


.overlay-btn.no-pdf-btn {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.overlay-btn.no-pdf-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    transform: translateY(0);
}

.overlay-btn.no-pdf-btn i {
    opacity: 0.6;
}


/* ============================================
   استایل دکمه‌های اصلی (Primary & Secondary)
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--twilight); /* #243279 */
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 0.75rem; /* معادل rounded-xl */
    font-family: 'Khamenei', serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(36, 50, 121, 0.3);
    border: 2px solid var(--twilight);
}

.btn-primary:hover {
    background-color: var(--camel);
    border-color: var(--camel);
    color: var(--twilight);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(184, 147, 88, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #ffffff;
    color: var(--camel);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-family: 'Khamenei', serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--camel);
}

.btn-secondary:hover {
    background-color: var(--pale-light); /* #e8dcc8 */
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(184, 147, 88, 0.2);
}

/* تنظیمات آیکون داخل دکمه */
.btn-primary i, .btn-secondary i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn-primary:hover i, .btn-secondary:hover i {
    transform: scale(1.1);
}


/* ============================================
   استایل تیترهای بخش‌ها (Section Headers)
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    width: 100%;
}

.section-title {
    font-family: 'Khamenei', serif !important;
    font-size: 2.5rem; /* معادل text-4xl */
    font-weight: 900;  /* معادل font-black */
    color: var(--twilight);
    display: inline-block; /* برای اینکه خط زیرین دقیقاً به اندازه متن باشد */
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.section-divider {
    width: 128px; /* معادل w-32 */
    height: 4px;  /* معادل h-1 */
    background: linear-gradient(90deg, var(--camel), var(--camel-light));
    margin: 0 auto; /* وسط‌چین کردن خط */
    border-radius: 2px;
}

.section-subtitle {
    font-family: 'Khamenei', serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--twilight);
    opacity: 0.8;
    margin-top: 1rem;
}