/* فونت وزیر */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazirmatn-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
}

/* متغیرهای CSS */
:root {
    --primary-color: #af4829;
    --primary-dark: #c94a24;
    --primary-light: #ff6f45;
    --bg-dark: #1a1a1a;
    --bg-darker: #141414;
    --bg-card: #242424;
    --bg-card-hover: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --border-color: #333333;
    --shadow: 0 10px 40px rgba(0,0,0,0.3);
    --transition: all 0.3s ease;
}

/* ریست و استایل پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazir', Tahoma, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.8;
    direction: rtl;
    min-height: 100vh;
    font-size: 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

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

/* انتخاب متن */
::selection {
    background: var(--primary-color);
    color: var(--text-primary);
}

/* اسکرول‌بار */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* هدر */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    background: var(--primary-color);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.main-header.scrolled {
    background: var(--primary-dark);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.logo:hover {
    color: #ffffff;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.logo-text {
    display: inline-block;
    white-space: nowrap;
    word-break: keep-all;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
    overflow-wrap: normal;
    word-wrap: normal;
}

.logo-text span {
    color: var(--bg-dark);
    display: inline;
    white-space: nowrap;
}

/* دکمه منو موبایل */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* صفحه اصلی - هیرو */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: 80px;
}

.hero-image-container {
    position: relative;
    height: 500px;
    max-width: 450px;
    overflow: hidden;
    border-radius: 15px;
    margin-right: auto;
    align-self: flex-start;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(20%);
    transition: var(--transition);
}

.hero-image:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}

.hero-vertical-text {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 80px;
    font-weight: bold;
    color: rgba(255,255,255,0.05);
    white-space: nowrap;
    pointer-events: none;
}

.hero-content {
    padding: 25px;
    align-self: flex-start;
}

.hero-number {
    font-size: 72px;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 20px;
    display: none; /* مخفی کردن عدد 01 */
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 25px;
    line-height: 1.3;
}

.hero-bio {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 2;
    text-align: justify;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: 'Vazir', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(232, 90, 47, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: #ffffff;
}

.btn-outline:hover {
    border-color: #ffffff;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

/* منوی پایین ثابت */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    border-top: none;
    padding: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    border-left: 1px solid rgba(255,255,255,0.2);
    text-decoration: none;
}

.bottom-nav .nav-item:last-child {
    border-left: none;
}

.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
    background: rgba(0,0,0,0.2);
    color: #ffffff;
}

.bottom-nav .nav-item i {
    font-size: 20px;
}

/* دکمه اسکرول پایین */
.scroll-down {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    animation: bounce 2s infinite;
    z-index: 999;
}

.scroll-down:hover {
    background: var(--primary-dark);
    transform: translateX(-50%) scale(1.1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* شبکه‌های اجتماعی */
.social-bar {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.social-bar a {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-bar a:hover {
    color: var(--primary-color);
}

.social-bar a i {
    font-size: 16px;
}

/* صفحه بیوگرافی */
.page-header {
    padding: 120px 0 0;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    text-align: center;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23333"/></svg>');
    background-size: 50px 50px;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 10;
}

.page-title {
    font-size: 42px;
    margin-bottom: 15px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 15px;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    position: relative;
    z-index: 10;
}

.breadcrumb-item {
    position: relative;
    z-index: 10;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    padding: 5px 0;
    position: relative;
    z-index: 10;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 10px;
    color: var(--text-muted);
}

/* بیوگرافی */
.bio-section {
    padding: 80px 0 120px;
}

.bio-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.bio-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top;
}

.bio-content {
    padding: 20px 0;
}

.bio-content h2 {
    font-size: 32px;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.bio-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: justify;
}

/* کارت‌های کتاب */
.books-section {
    padding: 80px 0 120px;
}

.book-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 30px;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    background: var(--bg-card-hover);
}

.book-card-image {
    height: 320px;
    overflow: hidden;
    position: relative;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-card-image img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.book-card:hover .book-card-image img {
    transform: scale(1.1);
}

.book-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.book-card:hover .book-card-overlay {
    opacity: 1;
}

.book-card-body {
    padding: 20px;
}

.book-card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.book-card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 13px;
}

/* جزئیات کتاب */
.book-detail {
    padding: 80px 0 120px;
}

.book-cover {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.book-cover img {
    width: 100%;
    height: auto;
}

.book-info {
    padding: 20px 0;
}

.book-info h1 {
    font-size: 36px;
    margin-bottom: 25px;
}

.book-meta-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.book-meta-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.book-meta-list li:last-child {
    border-bottom: none;
}

.book-meta-list .label {
    color: var(--text-muted);
}

.book-meta-list .value {
    color: var(--text-primary);
    font-weight: 500;
}

.book-description {
    color: var(--text-secondary);
    line-height: 2;
    text-align: justify;
}

/* گالری */
.gallery-section {
    padding: 80px 0 120px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-card);
}

.gallery-item-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-caption {
    padding: 12px 15px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.gallery-item-caption p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(232, 90, 47, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay i {
    font-size: 40px;
    color: var(--text-primary);
}

/* لایت‌باکس گالری */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 20px;
}

.lightbox-nav:hover {
    background: var(--primary-dark);
}

.lightbox-prev {
    right: -70px;
}

.lightbox-next {
    left: -70px;
}

/* فعالیت‌ها */
.activities-section {
    padding: 80px 0 120px;
}

.activity-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 18px 25px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 25px;
    transition: var(--transition);
    border-right: 3px solid var(--primary-color);
}

.activity-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(-5px);
}

.activity-years {
    min-width: 100px;
    text-align: center;
    flex-shrink: 0;
}

.activity-years .year {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.activity-years .separator {
    color: var(--text-muted);
    margin: 0 3px;
    font-size: 12px;
}

.activity-content h3 {
    font-size: 16px;
    margin-bottom: 0;
    font-weight: 500;
}

.activity-content p {
    color: var(--text-secondary);
    margin: 0;
}

/* تماس با ما */
.contact-section {
    padding: 80px 0 120px;
}

/* مدال */
.modal-content {
    background: var(--bg-card);
    border: none;
    border-radius: 20px;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 25px 30px;
}

.modal-title {
    color: var(--text-primary);
    font-size: 22px;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 30px;
}

.btn-close {
    filter: invert(1);
}

/* فرم‌ها */
.form-control,
.form-select {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 18px;
    border-radius: 10px;
    font-family: 'Vazir', sans-serif;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-darker);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(232, 90, 47, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 14px;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* پیام‌های اعلان */
.alert {
    border-radius: 10px;
    padding: 15px 20px;
    border: none;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* فوتر */
.main-footer {
    background: var(--bg-darker);
    padding: 30px 0 100px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    color: var(--text-muted);
    font-size: 14px;
}

/* لودینگ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* حالت بدون تصویر */
.no-image {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 48px;
}

/* ریسپانسیو */
@media (max-width: 991px) {
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-image-container {
        height: 50vh;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-number {
        font-size: 56px;
    }
    
    .hero-vertical-text {
        display: none;
    }
    
    .lightbox-prev {
        right: 10px;
    }
    
    .lightbox-next {
        left: 10px;
    }
    
    .activity-item {
        flex-direction: column;
        text-align: center;
    }
    
    .activity-years {
        min-width: auto;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-number {
        font-size: 42px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .bottom-nav .nav-item span {
        font-size: 11px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .book-card-image {
        height: 200px;
    }
}

/* انیمیشن‌های ورود */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Placeholder برای تصاویر */
.image-placeholder {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.image-placeholder i {
    font-size: 48px;
}

/* ========================================
   تم روشن / تاریک
   ======================================== */

/* دکمه تغییر تم */
.theme-toggle {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
    color: var(--text-primary);
    font-size: 18px;
}

.theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* تم روشن */
body.light-theme {
    --bg-dark: #f5f5f5;
    --bg-darker: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border-color: #e0e0e0;
    --shadow: 0 10px 40px rgba(0,0,0,0.1);
}

body.light-theme .main-header {
    background: var(--primary-color);
}

body.light-theme .main-header.scrolled {
    background: var(--primary-dark);
}

body.light-theme .bottom-nav {
    background: var(--primary-color);
}

body.light-theme .hero-image {
    filter: grayscale(10%);
}

body.light-theme .form-control,
body.light-theme .form-select {
    background: #f8f8f8;
}

body.light-theme .form-control:focus,
body.light-theme .form-select:focus {
    background: #ffffff;
}

body.light-theme .modal-content {
    background: #ffffff;
}

body.light-theme .btn-close {
    filter: none;
}

/* ========================================
   صفحه‌بندی
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
}

.pagination a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.pagination .active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   استایل اسکرول مدرن
   ======================================== */

/* اسکرول‌بار مدرن */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 5px;
    border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

::-webkit-scrollbar-corner {
    background: var(--bg-darker);
}

/* اسکرول برای فایرفاکس */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-darker);
}

/* ========================================
   بیوگرافی
   ======================================== */

.bio-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.bio-image img {
    width: 100%;
    height: 550px;
    object-fit: cover;
    object-position: top center;
}

.bio-content h2 {
    font-size: 32px;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.bio-text {
    color: var(--text-secondary);
    line-height: 2.2;
    text-align: justify;
    font-size: 15px;
}

/* ========================================
   بهبود ریسپانسیو
   ======================================== */

@media (max-width: 991px) {
    .theme-toggle {
        top: auto;
        bottom: 90px;
        left: 15px;
        width: 40px;
        height: 40px;
    }
    
    .bio-image img {
        height: 450px;
    }
    
    /* جلوگیری از جدا شدن حرف اول لوگو - راه‌حل جامع */
    .logo {
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .logo-text {
        display: inline-block;
        word-break: keep-all;
        white-space: nowrap;
        -webkit-hyphens: none;
        -moz-hyphens: none;
        -ms-hyphens: none;
        hyphens: none;
        overflow-wrap: normal;
        word-wrap: normal;
    }
    
    .logo-text span {
        display: inline;
        white-space: nowrap;
    }
}

@media (max-width: 767px) {
    .logo {
        font-size: 18px;
        flex-wrap: nowrap;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    /* جلوگیری از جدا شدن حرف اول - راه‌حل جامع برای iOS/Safari */
    .logo-text {
        display: inline;
        word-break: keep-all;
        white-space: nowrap;
        -webkit-hyphens: none;
        -moz-hyphens: none;
        -ms-hyphens: none;
        hyphens: none;
        overflow-wrap: normal;
        word-wrap: normal;
        -webkit-text-size-adjust: 100%;
    }
    
    .logo-text span {
        display: inline;
        white-space: nowrap;
    }
    
    .bio-image img {
        height: 400px;
    }
    
    .pagination a,
    .pagination span {
        min-width: 35px;
        height: 35px;
        font-size: 13px;
    }
}

/* استایل‌های خاص iOS Safari */
@supports (-webkit-touch-callout: none) {
    .logo-text {
        display: inline-block;
        white-space: nowrap;
        word-break: keep-all;
        -webkit-hyphens: none;
        hyphens: none;
    }
    
    .logo-text span {
        display: inline;
        white-space: nowrap;
    }
    
    .logo {
        flex-wrap: nowrap;
        white-space: nowrap;
    }
}
