body {
    background-color: #f8f9fa;
    direction: rtl;
}

/* اسلایدر بخش اول */
.hero-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    /*padding: 60px 0;*/
    margin-bottom: 80px;
}

.swiper {
    padding: 2.5rem;
}

.hero-slider h2 {
    color: white;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.swiper-slide {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.swiper-slide:hover {
    /*transform: translateY(-10px);*/
}

.swiper-pagination-bullet {
    width: 30px;
    border-radius: 3px;
    height: 4px;
}

.slide-image {
    width: 100%;
    height: 500px;
    /*padding-top: 10%;*/
    object-fit: cover;
    transition: transform 0.3s ease;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 40px 20px 20px;
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.slide-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
}

.slide-excerpt {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.slide-date {
    font-size: 0.8rem;
    opacity: 0.8;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.swiper-slide:hover .slide-content {
    transform: translateY(0);
}

.swiper-slide:hover .slide-excerpt,
.swiper-slide:hover .slide-date {
    opacity: 1;
    transform: translateY(0);
}

.swiper-slide:hover .slide-image {
    transform: scale(1.05);
}

/* دکمه‌های ناوبری اسلایدر */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    backdrop-filter: blur(10px);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.2rem;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
}

.swiper-pagination-bullet-active {
    background: white;
}

/* بخش دوم - لیست پست‌ها */
.blog-section {
    padding: 40px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.filter-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.filter-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 200px;
}

.filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* استایل‌های سرچ‌باکس بهبود یافته */
.search-box-container {
    position: relative;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 15px 50px 15px 20px !important;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25), 0 4px 20px rgba(0, 0, 0, 0.1);
    outline: none;
}

.search-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 2;
}

.search-loading {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.1rem;
    z-index: 2;
}

.search-loading .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* نتایج سرچ */
.search-results-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    text-align: center;
}

#searchResultsContainer {
    margin-top: 30px;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 20px;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.blog-card-excerpt {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* استایل تگ‌ها */
.blog-card-tags {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.blog-card-tags .tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-card-tags .tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

.blog-card-date {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 20px;
}

.blog-card-category {
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    text-decoration: none;
}

.blog-card-category:hover {
    background: #5a67d8;
    color: white;
}

/* صفحه‌بندی */
.pagination {
    justify-content: center;
    margin-top: 40px;
}

.page-link {
    color: #667eea;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
    margin: 0 5px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-item.active .page-link {
    background: #667eea;
    border-color: #667eea;
}

/* صفحه‌بندی */
.pagination {
    justify-content: center;
    margin-top: 40px;
}

.pagination ul {
    display: flex;
}

.page-numbers li {
    color: #667eea;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
    margin: 0 5px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-numbers li:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-numbers li a {
    text-decoration: none;
}

.page-numbers li:hover a {
    color: white;
}

.page-numbers.current {
    background: #667eea;
    border-color: #667eea;
}

/* افکت hover برای سرچ‌باکس */
.search-input-wrapper:hover .search-input {
    border-color: #667eea;
    box-shadow: 0 2px 15px rgba(102, 126, 234, 0.1);
}

/* انیمیشن برای آیکون سرچ */
.search-input:focus + .search-icon {
    color: #5a67d8;
    transform: translateY(-50%) scale(1.1);
}

/* پیام‌های هشدار بهبود یافته */
.alert {
    border-radius: 15px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .hero-slider {
        padding: 40px 0;
        margin-bottom: 60px;
    }

    .section-title {
        font-size: 2rem;
    }

    .slide-title {
        font-size: 1.1rem;
    }

    .filter-section {
        padding: 20px;
    }

    .filter-section .row {
        gap: 15px;
    }

    .filter-section .col-md-3,
    .filter-section .col-md-6 {
        width: 100%;
        margin-bottom: 15px;
    }

    .filter-select {
        width: 100%;
    }

    .search-input {
        padding: 12px 45px 12px 15px !important;
        font-size: 0.9rem;
    }

    .search-icon,
    .search-loading {
        left: 15px;
        font-size: 1rem;
    }

    .blog-card-tags {
        gap: 3px;
    }

    .blog-card-tags .tag {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

@media (max-width: 576px) {
    .search-input::placeholder {
        font-size: 0.8rem;
    }

    .search-results-title {
        font-size: 1.2rem;
        padding: 10px 15px;
    }

    .blog-card-content {
        padding: 15px;
    }

    .blog-card-title {
        font-size: 1.1rem;
    }

    .blog-card-excerpt {
        font-size: 0.85rem;
    }
}