/* =========================================
   فونت و تنظیمات پایه
   ========================================= */
html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'AFRANDFONT', Tahoma, Arial, sans-serif !important;
    margin: 0;
    padding-top: 150px;
    direction: rtl;
    background-color: #f4f4f4;
    color: #333;
}
/* =========================================
   اصلاح z-index برای مدال‌ها (به خاطر هدر fixed)
   ========================================= */
.modal {
    z-index: 1100 !important;
}

/* =========================================
   هدر سایت (فرانت‌اند) - استیکی و سایه
   ========================================= */
.site-header {
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    transition: all 0.3s ease;
}
/* =========================================
   منوی اصلی سایت (شبیه دکمه)
   ========================================= */
.header-menu .nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
}

.header-menu .nav-item {
    position: relative;
}

.header-menu > .nav-menu > .nav-item > a {
    background-color: var(--main-menu-bg, #1a237e);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: block;
    text-align: center;
    transition: opacity 0.3s;
    min-width: 100px;
}

.header-menu > .nav-menu > .nav-item > a:hover {
    opacity: 0.8;
}

/* =========================================
   زیرمنوها (دسکتاپ)
   ========================================= */
.header-menu .has-submenu:hover > .nav-menu {
    display: block;
}

.header-menu .nav-menu .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--sub-menu-bg, #ffc107) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 999;
    border-radius: 5px;
    margin-top: 10px;
    padding: 10px;
}

.header-menu .has-submenu::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 15px;
    display: none;
}

.header-menu .has-submenu:hover::after {
    display: block;
}

.header-menu .nav-menu .nav-menu a {
    color: #333;
    padding: 8px 15px;
    display: block;
    text-decoration: none;
    border-radius: 3px;
    font-weight: normal;
    transition: background 0.2s;
}

.header-menu .nav-menu .nav-menu a:hover {
    background-color: rgba(0,0,0,0.1);
}

/* =========================================
   استایل‌های واکنش‌گرا (موبایل)
   ========================================= */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 5px;
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    .mobile-menu-toggle {
        display: block;
        order: 1;
    }

    .header-menu {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 15px;
        background-color: #fff;
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .header-menu.active {
        display: block;
    }

    .header-menu .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .header-menu .nav-item {
        border-bottom: 1px solid #eee;
    }

    .header-menu > .nav-menu > .nav-item > a {
        display: block;
        text-align: right;
        padding: 15px;
        border-radius: 0;
        background-color: transparent !important;
        color: #333 !important;
    }

    .header-menu .nav-menu .nav-menu {
        position: static;
        display: none;
        box-shadow: none;
        background-color: #f9f9f9 !important;
        padding: 0;
        margin: 0;
        border-radius: 0;
        width: 100%;
    }
    
    .header-menu .nav-menu .nav-menu a {
        color: #555 !important;
        padding: 12px 30px;
        display: block;
        border-bottom: 1px solid #eee;
        background-color: transparent !important;
    }
    
    .header-menu .nav-menu .nav-menu a:hover {
        background-color: #eee !important;
    }

    .header-menu .has-submenu:hover > .nav-menu {
        display: block; 
    }
}

/* =========================================
   اسلایدر
   ========================================= */
.slider-wrapper {
    width: 100%;
    position: relative;
}

.swiper.mySwiper {
    width: 100%;
    height: 500px !important;
}

.swiper.postCarousel {
    width: 100%;
    height: 400px !important;
}

.slide-fullscreen {
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
}

.slide-content-overlay {
    position: absolute;
    bottom: 50px;
    right: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    backdrop-filter: blur(5px);
}

.slide-split {
    display: flex;
    width: 100%;
    height: 100%;
}

.slide-text {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #f8f9fa;
}

.slide-image {
    width: 50%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

@media (max-width: 768px) {
    .swiper.mySwiper, .swiper.postCarousel { 
        height: 400px !important; 
    }
    .slide-split { flex-direction: column; }
    .slide-text, .slide-image { width: 100%; height: 50%; }
    .slide-content-overlay { right: 10px; bottom: 10px; left: 10px; max-width: none; padding: 15px; }
}
/* =========================================
   اصلاح چک‌باکس‌ها در مدال تنظیمات
   ========================================= */
.modal-body .checkbox {
    padding-right: 0;
}

.modal-body .checkbox label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
}

.modal-body .checkbox input[type="checkbox"] {
    margin: 0;
    position: relative;
    width: 18px;
    height: 18px;
}

/* =========================================
   مخفی کردن اسلایدر در دستگاه‌های مختلف
   ========================================= */
@media (min-width: 992px) {
    .hide-on-desktop {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .hide-on-tablet {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* =========================================
   کروسل مطالب (کارت‌ها)
   ========================================= */
.post-carousel-section {
    position: relative;
    z-index: 1;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); 
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #303131;
}

.post-card-img {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.post-card:hover .post-card-img img {
    transform: scale(1.05);
}

.post-card-img .no-image {
    width: 100%;
    height: 100%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.post-card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card-body h3 {
    font-size: 16px;
    margin: 0 0 10px 0;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 48px;
    line-height: 1.5;
}

.post-card-body h3 a {
    color: #333;
    text-decoration: none;
}

.post-card-body h3 a:hover {
    color: #007bff;
}

.post-card-body p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 62px;
}
/* =========================================
   کروسل مشتریان ما
   ========================================= */
.clients-section {
    position: relative;
    z-index: 1;
}

.client-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.1);
}

.client-card img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
}

.client-card h3 {
    font-size: 14px;
    margin: 0;
    font-weight: normal;
    text-align: center;
}

@media (max-width: 768px) {
    .client-card {
        height: 120px;
        padding: 15px;
    }
    .client-card img {
        max-height: 60px;
    }
}
/* =========================================
   بخش خدمات
   ========================================= */
.services-section {
    position: relative;
    z-index: 1;
}

.service-card {
    position: relative;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 25px;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.service-card-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.service-title {
    font-size: 20px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.service-title-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(255,255,255,0.3);
    margin: 5px 0 15px 0;
}

.service-excerpt {
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
    text-align: justify;
    text-justify: inter-word;
}
/* =========================================
   بخش آشنایی با ما
   ========================================= */
.about-section {
    position: relative;
    z-index: 1;
    padding: 40px; 
    border-radius: 15px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); 
    margin: 20px 0;
}

.about-image {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    object-fit: cover;
}

.about-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 30px;
}

.about-btn {
    padding: 10px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
}

.about-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .about-section {
        padding: 20px;
    }
    .about-title {
        font-size: 22px;
    }
    .about-text {
        font-size: 14px;
    }
}
/* =========================================
   بخش نظرات مشتریان
   ========================================= */
.testimonials-section {
    position: relative;
    z-index: 1;
}

.testimonial-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-author h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.testimonial-quote-icon {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 35px;
    opacity: 0.9;
}

.testimonial-text {
    font-size: 14px;
    line-height: 1.8;
    text-align: justify;
    flex-grow: 1;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .testimonial-card {
        padding: 20px;
    }
    .testimonial-text {
        font-size: 13px;
    }
}
/* =========================================
   تنظیم فلش‌های اسلایدر نظرات
   ========================================= */
.testimonialsCarousel {
    padding: 40px !important;
}

.testimonialsCarousel .swiper-pagination {
    bottom: 0px !important;
}
.testimonialsCarousel .swiper-button-next,
.testimonialsCarousel .swiper-button-prev {
    width: 30px !important;
    height: 30px !important;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333 !important;
}

.testimonialsCarousel .swiper-button-next:after,
.testimonialsCarousel .swiper-button-prev:after {
    font-size: 14px !important;
    font-weight: bold;
}

.testimonialsCarousel .swiper-button-next {
    right: 0;
}

.testimonialsCarousel .swiper-button-prev {
    left: 0;
}
/* =========================================
   فوتر سایت
   ========================================= */
.site-footer {
    position: relative;
    margin-top: 50px;
}

.footer-title {
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: #007bff;
}

.footer-contact li {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-menu li {
    margin-bottom: 8px;
}

.footer-menu a {
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: #007bff !important;
}

.footer-social a {
    transition: transform 0.3s, color 0.3s;
}

.footer-social a:hover {
    transform: translateY(-3px);
    color: #007bff !important;
}

.footer-map iframe {
    width: 100%;
    height: 150px;
    border: none;
    border-radius: 8px;
}
/* =========================================
   استایل شبکه‌های اجتماعی در فوتر
   ========================================= */
.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
    font-size: 24px;
}

.footer-social a {
    display: inline-block;
    transition: transform 0.3s, color 0.3s;
}

.footer-social a:hover {
    transform: translateY(-3px);
    color: #007bff !important;
}
.list-unstyled {
    padding-right: 0 !important;}
/* =========================================
   استایل‌های صفحه آرشیو
   ========================================= */
.archive-section {
    position: relative;
    z-index: 1;
}

.archive-section .post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* برای یکدست شدن ارتفاع کارت‌ها */
}

.archive-section .post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.archive-section .post-card-img {
    display: block;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0; /* جلوگیری از جمع شدن عکس */
}

.archive-section .post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.archive-section .post-card:hover .post-card-img img {
    transform: scale(1.05);
}

.archive-section .post-card-img .no-image {
    width: 100%;
    height: 100%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.archive-section .post-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.archive-section .post-card-body h3 {
    font-size: 18px;
    margin: 0 0 15px 0;
    font-weight: bold;
    line-height: 1.5;
}

.archive-section .post-card-body h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.archive-section .post-card-body h3 a:hover {
    color: #007bff;
}

.archive-section .post-card-body p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 0 0 15px 0;
    text-align: justify;
}

.archive-section .post-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.archive-section .post-meta span {
    display: inline-flex;
    align-items: center;
}

.archive-section .post-meta i {
    margin-left: 5px;
    color: #007bff;
}

.archive-section .pagination {
    margin-top: 30px;
}

.archive-section .page-item.active .page-link {
    background-color: #1a237e;
    border-color: #1a237e;
}

.archive-section .page-link {
    color: #1a237e;
    margin: 0 3px;
    border-radius: 5px;
}
/* =========================================
   اصلاح کارت‌های آرشیو در حالت موبایل (عکس بالا)
   ========================================= */
@media (max-width: 768px) {
	.row {
       display:block !important;
     } 
    .archive-section .post-card {
        height: auto !important; /* اجازه بده ارتفاع بر اساس محتوا تنظیم بشه */
    }

    .archive-section .post-card-img {
        height: 200px !important; /* ارتفاع ثابت برای عکس در موبایل */
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .archive-section .post-card-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}
/* =========================================
   اصلاح حالت عکس کنار متن در آرشیو
   ========================================= */
.post-card-side-layout {
    display: flex;
    flex-direction: row;
    height: 100%;
}

.post-card-side-img {
    flex-shrink: 0;
    display: block;
    overflow: hidden;
    border-radius: 0 10px 10px 0;
}

.post-card-side-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-side-img .no-image {
    width: 100%;
    height: 100%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.post-card-side-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.archive-section .row > [class*="col-"] {
    margin-bottom: 30px;
}
/* =========================================
   استایل‌های صفحه تک‌مطلب (Single Post)
   ========================================= */
.single-post-section {
    position: relative;
    z-index: 1;
}

.single-main-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.single-post-content {
    line-height: 2.2;
    font-size: 16px;
    text-align: justify;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 20px;
}

.widget-title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: bold;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: #007bff;
}

.related-post-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.related-post-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    margin-left: 10px;
}

.related-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-title {
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.3s;
}

.share-buttons .btn {
    margin-left: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    padding: 0;
    line-height: 35px;
    text-align: center;
}

@media (max-width: 991px) {
    .single-post-section .col-lg-9 {
        margin-bottom: 30px;
    }
}
/* =========================================
   ویجت نمونه کارها / گالری
   ========================================= */
.portfolio-section {
    position: relative;
    z-index: 1;
}

.portfolio-card {
    background: transparent !important; /* حذف کامل پس‌زمینه کارت */
    border-radius: 0;
    overflow: visible;
    box-shadow: none !important;        /* حذف سایه مستطیلی */
    transition: none;
    position: relative;
}

.portfolio-card:hover {
    transform: none !important;         /* حذف جابجایی هاور */
    box-shadow: none !important;
}

.portfolio-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.portfolio-card img {
    width: 100%;
    height: auto !important;            /* حذف ارتفاع ثابت برای نمایش کامل تصویر */
    object-fit: contain;
    object-position: center;
    padding: 0;
    background: transparent !important;
    display: block;
    transition: none !important;        /* حذف انیمیشن‌ها */
}

.portfolio-card:hover img {
    transform: none !important;         /* جلوگیری از زوم ناخواسته */
}

.portfolio-card .no-image {
    width: 100%;
    height: auto;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* مخفی کردن کامل نوار عنوان (چون در عکس اول عنوان داخل عکس است) */
.portfolio-info {
    display: none !important;
}

/* یکدست‌سازی اسلایدهای Swiper */
.portfolioSwiper .swiper-slide {
    transition: none !important;
    opacity: 1 !important;              /* همه اسلایدها کاملاً واضح */
}

.portfolioSwiper .swiper-slide-active {
    opacity: 1 !important;
    transform: none !important;         /* حذف زوم اسلاید وسط */
    z-index: auto !important;
}

/* تنظیم فلش‌ها و دات‌ها برای پس‌زمینه‌های تیره */
.portfolio-section .swiper-button-next,
.portfolio-section .swiper-button-prev {
    color: #fff;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.portfolio-section .swiper-button-next:after,
.portfolio-section .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.portfolio-section .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.portfolio-section .swiper-pagination-bullet-active {
    opacity: 1;
    width: 20px;
    border-radius: 5px;
}