/**
 * Front Page Styles
 * 
 * استایل‌های صفحه اصلی - موبایل اول
 * شناسه تغییر: FRONT-PAGE-CSS-001
 * 
 * @package TopTheme
 * @since 1.0.0
 */

/* ============================================
   Base Styles - Mobile First
   ============================================ */

.front-page-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.front-page-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 20px 15px;
}


/* ============================================
   Promotional Banner - Mobile First
   ============================================ */

.front-page-banner {
    width: 100%;
    margin-bottom: 20px;
    padding: 0;
}

.banner-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.banner-link-wrapper:hover {
    text-decoration: none;
}

.banner-content {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-radius: 15px;
    overflow: hidden;
    padding: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.banner-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    border-radius: 15px;
}

.banner-content.banner-no-text::before {
    display: none;
}

.banner-content.banner-no-text {
    padding: 0;
    min-height: 400px;
    aspect-ratio: 16 / 9;
}

.banner-text {
    text-align: center;
    z-index: 2;
    color: #fff;
    position: relative;
}

.banner-title {
    font-size: 20px;
    font-weight: 700;
    color: #FFB22C;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.banner-subtitle {
    font-size: 14px;
    color: #fff;
    margin: 0;
    opacity: 0.9;
}

.banner-image {
    width: 100%;
    max-width: 300px;
    z-index: 1;
}

.banner-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

/* ============================================
   Product Categories - Mobile First
   ============================================ */

.front-page-categories {
    width: 100%;
    margin-bottom: 30px;
    padding: 0;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.category-tab.active {
    background: #FFB22C;
    color: #000;
    box-shadow: 0 2px 5px rgba(255, 178, 44, 0.3);
}

.category-tab:not(.active):hover {
    background: #f5f5f5;
}

/* Categories Grid */
.categories-grid {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    min-height: 220px; /* جلوگیری از پرش در صورت نبودن دسته‌بندی */
}

.categories-grid.active {
    display: grid;
    align-items: start;
    align-content: space-between;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease;
    padding: 10px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #FFB22C;
}

.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-item:hover .category-icon {
    border-color: #FFB22C;
    transform: scale(1.05);
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffcccc 0%, #fff5f5 100%);
    color: #d85a5a;
    font-size: 28px;
}

.category-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* ============================================
   Features Section - Mobile First
   ============================================ */

.front-page-features {
    width: 100%;
    padding: 20px 15px;
    background: #fff;
    margin-top: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 15px;
    background: #fafafa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: #fff9f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFB22C 0%, #ffa500 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(255, 178, 44, 0.3);
    overflow: hidden;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.feature-text {
    font-size: 11px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   Desktop Styles - Only for screens 992px and up
   ============================================ */

@media (min-width: 992px) {
    .front-page-content {
        display: flex;
        flex-direction: column;
        gap: 30px;
        align-items: stretch;
        max-width: 1400px;
        margin: 0 auto;
        padding: 30px 20px;
    }
    
    .front-page-content > *:not(.banner-categories-wrapper) {
        width: 100%;
    }
    
    .front-page-content > .banner-categories-wrapper {
        width: 100%;
    }
    
    .banner-categories-wrapper {
        display: flex !important;
        grid-template-columns: 1fr 2fr !important;
        gap: 30px !important;
        align-items: start !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .banner-categories-wrapper .front-page-banner {
        grid-column: 2 !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .banner-categories-wrapper .front-page-categories {
        grid-column: 1 !important;
        padding: 20px !important;
        background: #f5f5f5 !important;
        border-radius: 15px !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .front-page-banner {
        margin-bottom: 0;
    }
    
    .front-page-categories {
        padding: 0;
        background: #f5f5f5;
        border-radius: 15px;
        padding: 20px;
    }
    
    
    .banner-content {
        min-height: 600px;
        padding: 50px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 50%, #FFB22C 100%);
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        position: relative;
        overflow: hidden;
    }
    
    .banner-content.banner-no-text {
        padding: 0;
        min-height: 500px;
        aspect-ratio: 16 / 9;
    }
    
    .banner-content::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 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="40" fill="%23FFB22C" opacity="0.1"/></svg>');
        background-size: 200px 200px;
        opacity: 0.3;
        z-index: 0;
    }
    
    .banner-text {
        text-align: right;
        flex: 1;
        z-index: 2;
        position: relative;
    }
    
    .banner-title {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .banner-subtitle {
        font-size: 20px;
    }
    
    .banner-image {
        max-width: 450px;
        flex-shrink: 0;
        z-index: 2;
        position: relative;
    }
    
    .category-tabs {
        margin-bottom: 25px;
    }
    
    .category-tab {
        padding: 15px 25px;
        font-size: 16px;
    }
    
    .categories-grid {
        gap: 20px;
        min-height: 370px;
    }
    
    .category-item {
        padding: 15px;
    }
    
    .category-icon {
        width: 90px;
        height: 90px;
    }
    
    .category-icon-placeholder {
        font-size: 36px;
    }
    
    .category-name {
        font-size: 14px;
    }
    
    .front-page-features {
        margin-top: 40px;
        padding: 30px;
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    .feature-item {
        padding: 20px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .feature-title {
        font-size: 15px;
    }
    
    .feature-text {
        font-size: 13px;
    }
    
    .special-offer-section {
        margin-top: 40px;
    }
    
    .promotional-banners-section {
        margin-top: 0;
    }
    
    .two-banners-section {
        margin-top: 0;
    }
    
    .latest-products-section {
        margin-top: 0;
    }
    
    .blog-section {
        margin-top: 0;
    }
}

/* ============================================
   Tablet Styles - Only for screens 768px to 991px
   ============================================ */

@media (min-width: 768px) and (max-width: 991px) {
    .banner-content {
        min-height: 300px;
        padding: 30px;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    .banner-content.banner-no-text {
        padding: 0;
        min-height: 350px;
        aspect-ratio: 16 / 9;
    }
    
    .banner-title {
        font-size: 24px;
    }
    
    .banner-subtitle {
        font-size: 16px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .category-icon {
        width: 80px;
        height: 80px;
    }
    
    .category-name {
        font-size: 13px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Special Offer Section - Mobile First
   ============================================ */

.special-offer-section {
    width: 100%;
    margin: 30px 0;
    padding: 0;
}

.special-offer-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 15px 15px 0 0;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.latest-women-products-section .special-offer-header,
.latest-men-products-section .special-offer-header,
.latest-products-section .special-offer-header {
    background: transparent;
    border-radius: 0;
    border-bottom: 2px solid #f0f0f0;
    padding: 15px 20px;
    flex-direction: row-reverse;
    justify-content: space-between;
}

.latest-women-products-section .special-offer-title,
.latest-men-products-section .special-offer-title,
.latest-products-section .special-offer-title {
    color: #333;
    margin: 0;
}

/* دکمه مشاهده همه */
.view-all-products-button {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    color: #000;
    text-decoration: none;
    border: 2px solid #000;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.view-all-products-button:hover {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.special-offer-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.special-offer-tabs {
    display: flex;
    gap: 8px;
}

.special-offer-tab {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.special-offer-tab.active {
    background: #FFB22C;
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 178, 44, 0.4);
}

.special-offer-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.3);
}

.special-offer-content {
    /* background: #f5f5f5; */
    border-radius: 0 0 15px 15px;
    padding: 20px;
    min-height: 400px;
}

.special-offer-products {
    display: none;
}

.special-offer-products.active {
    display: block;
}
.top-offer{
    background: #FF9800;
}

/* Products Slider Styles */
.products-slider {
    width: 100%;
    position: relative; /* اطمینان از position relative برای دکمه‌های absolute */
    padding: 0 50px; /* فضای کافی برای دکمه‌های navigation */
}

/* Swiper خودش wrapper را مدیریت می‌کند - نیازی به استایل اضافی نیست */

.products-slider .swiper-slide {
    height: auto;
    flex-shrink: 0; /* جلوگیری از کوچک شدن slides */
    width: auto; /* عرض خودکار بر اساس slidesPerView */
}

.products-slider .swiper-slide .product-card {
    margin: 0;
}

/* Swiper Arrows Customization - با آیکن Font Awesome */
.products-slider .swiper-button-prev,
.products-slider .swiper-button-next {
    background: #fff;
    border: 2px solid #FFB22C;
    width: 40px;
    height: 40px;
    opacity: 1;
    transition: all 0.3s ease;
    color: #FFB22C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10; /* اطمینان از نمایش دکمه‌ها روی سایر المان‌ها */
    pointer-events: auto; /* اطمینان از قابل کلیک بودن دکمه‌ها */
    cursor: pointer; /* نمایش cursor pointer */
    position: absolute; /* اطمینان از position absolute */
}

.products-slider .swiper-button-prev:hover,
.products-slider .swiper-button-next:hover {
    background: #FFB22C;
    border-color: #FFB22C;
    color: #fff;
}

/* حذف آیکن پیش‌فرض Swiper */
.products-slider .swiper-button-prev::after,
.products-slider .swiper-button-next::after {
    display: none;
}

/* اضافه کردن آیکن Font Awesome */
/* در RTL: دکمه prev باید به راست (→) و next باید به چپ (←) باشد */
/* استفاده از !important برای override کردن استایل عمومی که font-family را تغییر می‌دهد */
.products-slider .swiper-button-prev::before,
.products-slider .swiper-button-next::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    display: block !important;
    /* Override هر استایل دیگری که ممکن است از پلاگین‌ها یا وردپرس بیاید */
    font-style: normal !important;
    line-height: 1 !important;
}

/* در RTL: prev = راست (→) */
.products-slider[dir="rtl"] .swiper-button-prev::before {
    content: "\f054" !important; /* fa-chevron-right */
}

/* در RTL: next = چپ (←) */
.products-slider[dir="rtl"] .swiper-button-next::before {
    content: "\f053" !important; /* fa-chevron-left */
}

/* استایل با specificity بالاتر برای اطمینان از override */
/* استفاده از multiple classes برای افزایش specificity */
.products-slider.swiper .swiper-button-prev::before,
.products-slider.swiper .swiper-button-next::before,
div.products-slider.swiper .swiper-button-prev::before,
div.products-slider.swiper .swiper-button-next::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

.products-slider[dir="rtl"].swiper .swiper-button-prev::before,
div.products-slider[dir="rtl"].swiper .swiper-button-prev::before {
    content: "\f054" !important;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
}

.products-slider[dir="rtl"].swiper .swiper-button-next::before,
div.products-slider[dir="rtl"].swiper .swiper-button-next::before {
    content: "\f053" !important;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
}

/* استایل با بالاترین specificity - برای override استایل‌های عمومی */
body .products-slider .swiper-button-prev::before,
body .products-slider .swiper-button-next::before,
body .products-slider[dir="rtl"] .swiper-button-prev::before,
body .products-slider[dir="rtl"] .swiper-button-next::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

.products-slider .swiper-button-prev {
    left: 0; /* تغییر از -20px به 0 برای قرارگیری در padding */
    right: auto;
}

.products-slider .swiper-button-next {
    right: 0; /* تغییر از -20px به 0 برای قرارگیری در padding */
    left: auto;
}

/* Hide arrows on mobile */
@media (max-width: 767px) {
    .products-slider .swiper-button-prev,
    .products-slider .swiper-button-next {
        display: none;
    }
}

/* ============================================
   Promotional Banners Slider - Mobile First
   ============================================ */

.promotional-banners-section {
    width: 100%;
    max-width: 100%;
    margin: 30px 0;
    padding: 0 15px;
    box-sizing: border-box;
    /* جلوگیری از کشیده شدن بی‌نهایت */
    overflow: hidden;
    position: relative;
    /* جلوگیری از transform ناخواسته */
    transform: none;
}

.banners-slider {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-sizing: border-box;
    /* جلوگیری از کشیده شدن بی‌نهایت */
    min-width: 0; /* مهم برای flex/grid items */
    flex-shrink: 1;
}

/* Swiper خودش wrapper را مدیریت می‌کند - نیازی به استایل اضافی نیست */

.banners-slider .swiper-slide {
    height: auto;
    flex-shrink: 0;
    /* عرض را به Swiper می‌سپاریم - نباید width را تنظیم کنیم */
    box-sizing: border-box;
    /* جلوگیری از کشیده شدن بی‌نهایت */
    min-width: 0;
    max-width: 100%;
}

.promotional-banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.promotional-banner-link:hover {
    text-decoration: none;
}

.promotional-banner {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.banner-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-content-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

.banner-title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
    color: #fff;
    font-size: 14px;
    margin: 0 0 15px 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

.banner-button {
    display: inline-block;
    padding: 10px 24px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.promotional-banner-link:hover .banner-button {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Swiper Pagination for Banners */
.banners-slider {
    position: relative; /* برای positioning pagination */
}

.banners-slider .swiper-pagination {
    position: absolute;
    bottom: 15px;
    left: 50% !important; /* اطمینان از وسط بودن */
    right: auto !important; /* جلوگیری از override در RTL */
    transform: translateX(-50%);
    width: auto;
    z-index: 10;
    text-align: center; /* برای RTL */
}

.banners-slider .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.banners-slider .swiper-pagination-bullet-active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* Desktop Styles for Promotional Banners */
@media (min-width: 992px) {
    .promotional-banners-section {
        /* grid-column و order در media query بالاتر (خط 425) تنظیم شده */
        padding: 0;
        margin: 40px 0;
        max-width: 100%;
        overflow: hidden;
        width: 100%;
    }
    
    .banners-slider {
        max-width: 100%;
        overflow: hidden;
        width: 100%;
    }
    
    .promotional-banner {
        height: 300px;
        width: 100%;
    }
    
    .banner-title {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .banner-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .banner-button {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .banners-slider .swiper-pagination {
        bottom: 20px;
    }
}

/* Mobile Styles for Pagination - Fix positioning */
@media (max-width: 991px) {
    .banners-slider .swiper-pagination {
        position: absolute !important;
        bottom: 15px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        z-index: 10 !important;
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* Desktop Styles for Special Offer */
@media (min-width: 992px) {
    .special-offer-header {
        padding: 20px 30px;
    }
    
    .special-offer-title {
        font-size: 24px;
    }
    
    .special-offer-tab {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .special-offer-content {
        padding: 30px;
        min-height: 500px;
    }
    
    .latest-women-products-section .special-offer-header,
    .latest-men-products-section .special-offer-header,
    .latest-products-section .special-offer-header {
        padding: 20px 30px;
    }
    
    .view-all-products-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .latest-women-products-section .special-offer-title,
    .latest-men-products-section .special-offer-title,
    .latest-products-section .special-offer-title {
        font-size: 24px;
    }
}

/* ============================================
   Two Banners Section - Mobile First
   ============================================ */

.two-banners-section {
    width: 100%;
    margin: 30px 0;
    padding: 0 15px;
    box-sizing: border-box;
}

.two-banners-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.single-banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.single-banner-link:hover {
    text-decoration: none;
}

.single-banner-item {
    position: relative;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.single-banner-link:hover .single-banner-item {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.single-banner-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
}

.single-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.single-banner-content-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    padding: 25px 20px;
    text-align: right;
}

.single-banner-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.single-banner-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0 0 15px 0;
}

.single-banner-button {
    display: inline-block;
    padding: 10px 25px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    pointer-events: none;
}

.single-banner-link:hover .single-banner-button {
    background: #FFB22C;
    color: #000;
    border-color: #FFB22C;
    transform: scale(1.05);
}

/* Desktop Styles for Two Banners */
@media (min-width: 992px) {
    .two-banners-section {
        grid-column: 1 / -1;
        padding: 0;
        margin: 40px 0;
    }
    
    .two-banners-container {
        flex-direction: row;
        gap: 30px;
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    .single-banner-link {
        flex: 1;
        width: 50%;
    }
    
    .single-banner-item {
        width: 100%;
    }
    
    .single-banner-image-wrapper {
        height: 300px;
    }
    
    .single-banner-content-overlay {
        padding: 30px 25px;
    }
    
    .single-banner-title {
        font-size: 24px;
    }
    
    .single-banner-subtitle {
        font-size: 16px;
    }
    
    .single-banner-button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* ============================================
   Blog Section - Mobile First
   ============================================ */

.blog-section {
    width: 100%;
    max-width: 100%;
    margin: 40px 0;
    padding: 0 15px;
    box-sizing: border-box;
    /* overflow-x: hidden;  */
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
    flex-direction: row-reverse; /* برای RTL: دکمه سمت چپ، عنوان سمت راست */
}

.blog-header-left {
    order: 1;
}

.blog-all-posts-button {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    color: #000;
    text-decoration: none;
    border: 2px solid #000;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-all-posts-button:hover {
    background: #000;
    color: #fff;
}

.blog-header-right {
    order: 2;
    flex: 1;
    text-align: right;
}

.blog-main-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0 0 5px 0;
}

.blog-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.blog-posts-slider {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: visible!important; /* برای نمایش pagination */
    margin-bottom: 30px;
    padding-bottom: 80px; /* فضا بیشتر برای pagination */
}

.blog-posts-slider .swiper-wrapper {
    display: flex;
}

.blog-posts-slider .swiper-slide {
    height: auto;
    flex-shrink: 0;
    width: auto;
    display: flex; /* برای یکسان کردن ارتفاع */
}

.blog-post-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* یکسان کردن ارتفاع */
    width: 100%;
}

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

.blog-post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.blog-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.blog-placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #999;
    font-size: 14px;
}

.blog-post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1; /* برای پر کردن فضای باقیمانده */
    justify-content: space-between; /* فاصله بین المان‌ها */
}

.blog-post-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    flex-shrink: 0; /* جلوگیری از کوچک شدن */
}

.blog-post-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-title a:hover {
    color: #FFB22C;
}

.blog-post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 15px 0; /* از بالا چسبیده، فاصله از پایین */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* محدود به 2 خط */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1; /* برای پر کردن فضای باقیمانده */
    min-height: 0; /* برای کار کردن line-clamp */
}

.blog-read-more {
    display: inline-block;
    color: #FFB22C;
    text-decoration: none;
    font-size: 14px;
    padding: 10px 20px;
    margin-top: auto; /* چسبیدن به پایین */
    background: #fff;
    border: none; /* حذف border */
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0; /* جلوگیری از کوچک شدن */
    align-self: flex-end; /* چسبیدن به سمت چپ (RTL) */
    cursor: pointer;
    text-align: center;
    min-width: 120px;
}

.blog-read-more:hover {
    background: #FFB22C;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 178, 44, 0.3);
}

.blog-no-posts {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Blog Slider Pagination */
.blog-slider-pagination {
    position: absolute;
    bottom: 20px; /* پایین‌تر از کارت‌ها */
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    z-index: 10;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    top: 430px !important;
}

.blog-slider-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    margin: 0 4px;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.blog-slider-pagination .swiper-pagination-bullet-active {
    background: #FFB22C;
    width: 30px;
    border-radius: 5px;
}

/* Desktop Styles for Blog Section */
@media (min-width: 992px) {
    .blog-section {
        padding: 0;
        margin: 40px 0;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        overflow-x: hidden;
    }
    
    .blog-header {
        margin-bottom: 40px;
        padding: 0 20px;
    }
    
    .blog-header {
        flex-direction: row-reverse; /* برای RTL: دکمه سمت چپ، عنوان سمت راست */
    }
    
    .blog-header-left {
        order: 1;
    }
    
    .blog-header-right {
        order: 2;
        text-align: right;
    }
    
    .blog-main-title {
        font-size: 32px;
    }
    
    .blog-subtitle {
        font-size: 18px;
    }
    
    .blog-posts-slider {
        padding: 0 20px 90px 20px; /* فضا بیشتر برای pagination */
    }
    
    .blog-slider-pagination {
        bottom: 30px; /* پایین‌تر در دسکتاپ */
    }
    
    .blog-post-image {
        height: 250px;
    }
    
    .blog-post-content {
        padding: 25px;
        display: flex;
        flex-direction: column;
        flex: 1;
        justify-content: space-between;
    }
    
    .blog-post-title {
        font-size: 20px;
        margin: 0 0 12px 0;
        flex-shrink: 0;
    }
    
    .blog-post-excerpt {
        font-size: 15px;
        margin: 0 0 15px 0;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        flex: 1;
        min-height: 0;
    }
    
    .blog-read-more {
        font-size: 15px;
        padding: 12px 25px;
        margin-top: auto;
        flex-shrink: 0;
        align-self: flex-end; /* سمت چپ در RTL */
        min-width: 140px;
        border: none; /* حذف border */
    }
    
    .blog-read-more:hover {
        background: #FFB22C;
        color: #000;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(255, 178, 44, 0.3);
    }
    .blog-slider-pagination {
        top: 500px !important;
    }
}

