/* Custom CSS - Professional Black & White Theme با رفع مشکل صفحات وبلاگ */
:root {
    --primary-red: #dc3545;
    --primary-red-hover: #c82333;
    --primary-red-active: #bd2130;
    --bg-white: #ffffff;
    --bg-dark: #1a1a1a;
    --text-dark: #212529;
    --text-white: #f8f9fa;
    --border-light: #e9ecef;
    --border-dark: #333333;
    --muted-light: #6c757d;
    --muted-dark: #adb5bd;
    --box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --transition-base: all 0.3s ease-in-out;
    --transition-slow: all 0.5s ease-in-out;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
}
h1, h2, h3, h4, h5, h6 { color: var(--text-dark); font-weight: 600; }
p { color: var(--muted-light); }
.text-muted { color: var(--muted-light) !important; }

/* بخش‌های تیره - فقط سرویس‌ها و فوتر (بدون .py-5) */
#services, footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
}
#services h1, #services h2, #services h3, #services h4, #services h5, #services h6,
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6 {
    color: var(--text-white);
}
#services h2 { color: #000000 !important; } /* عنوان خدمات ما مشکی */
#services p, footer p { color: var(--muted-dark); }
#services .text-muted, footer .text-muted { color: var(--muted-dark) !important; }
#services .border-bottom, footer .border-top { border-color: var(--border-dark) !important; }

/* بخش‌های روشن */
.hero-section, .bg-light, .bg-white {
    background-color: var(--bg-white) !important;
    color: var(--text-dark);
}
.hero-section h1, .hero-section h2, .bg-light h1, .bg-light h2, .bg-white h1, .bg-white h2 {
    color: var(--text-dark);
}

/* نوار ناوبری */
.navbar {
    background-color: var(--bg-white) !important;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--box-shadow-sm);
}
.navbar-brand {
    color: var(--text-dark) !important;
    font-size: 2.5rem;
    font-weight: bold;
    transition: var(--transition-base);
}
@media (max-width: 768px) { .navbar-brand { font-size: 1.5rem; } }
@media (max-width: 576px) { .navbar-brand { font-size: 0.9rem; } }
.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    transition: var(--transition-base);
    font-weight: 500;
}
.navbar-nav .nav-link:hover { color: var(--primary-red) !important; }
.navbar-toggler { border-color: var(--border-light) !important; }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* دکمه‌ها */
.btn-primary {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    transition: var(--transition-base);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
}
.btn-primary:hover {
    background-color: var(--primary-red-hover);
    border-color: var(--primary-red-hover);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-sm);
}
.btn-outline-primary {
    color: var(--primary-red);
    border-color: var(--primary-red);
    transition: var(--transition-base);
    border-radius: 2rem;
    padding: 0.5rem 1.5rem;
}
.btn-outline-primary:hover {
    background-color: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-sm);
}

/* بخش قهرمان (Hero) */
.hero-section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}
.hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-title-on-image {
    position: absolute;
    top: 55%;
    left: 8%;
    transform: translateY(-50%);
    z-index: 2;
    text-align: left;
    direction: ltr;
}
.hero-title-on-image h1 {
    display: flex;
    flex-direction: column;
    gap: 0.5cm;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.hero-title-on-image h1 span {
    font-size: 4rem;
    background-color: #ffffff;
    color: #1a1a1a;
    display: inline-block;
    width: fit-content;
    padding: 0;
    line-height: 1.2;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
@media (max-width: 768px) {
    .hero-title-on-image {
        left: 5%;
        top: 60%;
    }
    .hero-title-on-image h1 span {
        font-size: 3rem;
    }
    .hero-title-on-image h1 {
        gap: 0.3cm;
    }
}
.hero-content-below {
    padding: 80px 0;
    background-color: var(--bg-white);
}
.hero-content-below .lead {
    font-size: 3rem;
    font-weight: 500;
}
@media (max-width: 768px) {
    .hero-content-below .lead {
        font-size: 2rem;
    }
}
.hero-content-below .description {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--muted-light);
}

/* بخش خدمات */
#services {
    background-color: #f4f6f9;
    padding: 80px 0;
}
#services.services-section {
    padding: 80px 0;
}
#services .row {
    direction: rtl;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.service-card {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    height: 100%;
    min-height: 280px;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card::after {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #555, #222, #000, #555);
    background-size: 300% 300%;
    border-radius: 30px;
    z-index: -1;
    animation: rotateBorder 4s linear infinite;
    opacity: 0.4;
    pointer-events: none;
}
@keyframes rotateBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.15);
}
.service-card.is-reversed {
    flex-direction: row-reverse;
}
.service-card__image {
    position: relative;
    flex: 0 0 38%;
    max-width: 38%;
    min-height: 100%;
    background: #ffffff !important;
}
.service-card__image::after {
    display: none !important;
}
.service-card__image img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.service-card:hover .service-card__image img {
    transform: scale(1.04);
}
.service-card__content {
    flex: 1;
    padding: 32px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}
.service-card__content h3 {
    margin: 0 0 14px;
    font-size: 1.4rem;
    line-height: 1.4;
    color: #1f2937;
    font-weight: 800;
}
.service-card__content p {
    margin: 0;
    color: #6b7280;
    line-height: 2;
    font-size: 1rem;
}
@media (max-width: 991.98px) {
    .service-card__image {
        flex: 0 0 35%;
        max-width: 35%;
    }
    .service-card__image img {
        min-height: 220px;
        max-height: 220px;
    }
    .service-card__content {
        padding: 24px 20px;
    }
}
@media (max-width: 767.98px) {
    .service-card,
    .service-card.is-reversed {
        flex-direction: row !important;
        min-height: auto;
    }
    .service-card__image {
        flex: 0 0 30%;
        max-width: 30%;
    }
    .service-card__image img {
        min-height: 180px;
        max-height: 180px;
        object-fit: cover;
    }
    .service-card__content {
        padding: 16px 15px;
    }
    .service-card__content h3 {
        font-size: 1.2rem;
    }
    .service-card__content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    .service-card::after {
        animation: none;
        background: #aaa;
        opacity: 0.2;
    }
}
@media (max-width: 575.98px) {
    #services.services-section {
        padding: 60px 0;
    }
    .service-card__image {
        flex: 0 0 28%;
        max-width: 28%;
    }
    .service-card__image img {
        min-height: 140px;
        max-height: 140px;
    }
    .service-card__content {
        padding: 12px 12px;
    }
    .service-card__content h3 {
        font-size: 1rem;
    }
    .service-card__content p {
        font-size: 0.85rem;
    }
}
#services .service-card,
#services .service-card .service-card__content,
#services .service-card .service-card__content * {
    color: var(--text-dark, #212529) !important;
}
#services .service-card p,
#services .service-card .service-card__content p {
    color: var(--muted-light, #6c757d) !important;
}
#services .service-card h3,
#services .service-card .service-card__content h3 {
    color: var(--text-dark, #212529) !important;
    font-weight: 800;
}

/* بخش فرآیند کار */
.process-step {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    height: 100%;
    transition: var(--transition-base);
    box-shadow: var(--box-shadow-sm);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}
.process-step:nth-child(1) { animation-delay: 0.1s; }
.process-step:nth-child(2) { animation-delay: 0.2s; }
.process-step:nth-child(3) { animation-delay: 0.3s; }
.process-step:nth-child(4) { animation-delay: 0.4s; }
.process-step:hover {
    transform: translateY(-8px);
    border-color: var(--primary-red);
    box-shadow: var(--box-shadow-lg);
}
#services .process-step, footer .process-step {
    background-color: var(--bg-dark);
    border-color: var(--border-dark);
    color: var(--text-white);
}
#services .process-step h5, footer .process-step h5 {
    color: var(--text-white);
}
.process-number {
    background-color: var(--primary-red);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 20px auto;
    box-shadow: var(--box-shadow-sm);
    transition: var(--transition-base);
}
.process-step:hover .process-number {
    transform: scale(1.1);
    box-shadow: var(--box-shadow-md);
}
.process-step small { color: var(--muted-light); }
#services .process-step small, footer .process-step small {
    color: var(--muted-dark);
}

/* بخش چرا ما و تماس */
.py-5 i, .bg-light i, .bg-white i { color: var(--primary-red); }

/* کارت‌های وبلاگ (کلی) */
.blog-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    color: var(--text-dark);
    transition: var(--transition-base);
    box-shadow: var(--box-shadow-sm);
    height: 100%;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-red);
    box-shadow: var(--box-shadow-lg);
}
.blog-card h4 { color: var(--text-dark); }
.blog-card .text-muted { color: var(--muted-light) !important; }
.blog-card img {
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-base);
}
.blog-card:hover img { transform: scale(1.03); }

/* فوتر */
footer {
    border-top: 1px solid var(--border-dark);
    padding-top: 50px;
    padding-bottom: 30px;
}
footer h5 {
    color: var(--text-white);
    margin-bottom: 20px;
    font-weight: 600;
}
footer a {
    color: var(--muted-dark);
    text-decoration: none;
    transition: var(--transition-base);
}
footer a:hover {
    color: var(--primary-red);
    padding-right: 5px;
}
footer .social-icons a {
    color: var(--text-white);
    margin-left: 15px;
    font-size: 1.4rem;
    display: inline-block;
    transition: var(--transition-base);
}
footer .social-icons a:hover {
    color: var(--primary-red);
    transform: translateY(-3px);
}

/* کلاس‌های کمکی */
.shadow-sm { box-shadow: var(--box-shadow-sm); }
.shadow-md { box-shadow: var(--box-shadow-md); }
html { scroll-behavior: smooth; }
.rounded-4 { border-radius: 1rem; }
a:not(.nav-link):not(.btn) {
    color: var(--primary-red);
    transition: var(--transition-base);
}
a:not(.nav-link):not(.btn):hover {
    color: var(--primary-red-hover);
    text-decoration: underline;
}
.custom-hr {
    border: none;
    height: 2px;
    background-color: #ffffff;
    opacity: 0.5;
    margin: 30px 0;
}
.py-5 .col-md-6.text-center img {
    width: 50% !important;
    max-width: 50% !important;
    height: auto;
    margin: 0 auto;
    display: block;
}
section { padding: 60px 0; }
.divider {
    width: 80px;
    height: 3px;
    background: var(--primary-red);
    margin: 20px auto;
    border-radius: 3px;
}
.w-10 { width: 10% !important; }
@media (max-width: 992px) { .w-10 { width: 20% !important; } }
@media (max-width: 768px) { .w-10 { width: 40% !important; margin: 0 auto; } }
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   استایل صفحات وبلاگ و ثابت (سفید)
   ============================================ */
body.blog, body.single-post, body.page, body.archive {
    background-color: #ffffff !important;
}
.blog .container, .single-post .container, .page .container, .archive .container {
    background-color: #ffffff !important;
}
.blog-card, article.post-item, .post-card {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 28px !important;
    margin-bottom: 2rem !important;
}
.blog-card img, article.post-item img, .post-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 28px 28px 0 0;
}
.blog-card .card-body, article.post-item .post-summary, .post-card .entry-content {
    padding: 1.5rem;
}
.single-post article, .page-content {
    background: #ffffff !important;
    padding: 2rem !important;
    border-radius: 32px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin: 2rem 0;
}
.page-content h1, .single-post .entry-header h1 {
    font-size: 2rem;
    border-right: 5px solid #dc3545;
    padding-right: 1rem;
    margin-bottom: 1.8rem;
}
@media (max-width: 768px) {
    .blog-card img, article.post-item img, .post-card img {
        height: 180px;
    }
    .single-post article, .page-content {
        padding: 1rem !important;
    }
}


/* فقط برای بخش مشکی در صفحه اصلی (چرا ما و شروع گفتگو) */
.homepage-dark-bg {
    background-color: #1a1a1a !important;  /* مشکی */
    color: #f8f9fa !important;
}
.homepage-dark-bg h2,
.homepage-dark-bg h3,
.homepage-dark-bg p {
    color: #f8f9fa !important;
}
.homepage-dark-bg hr {
    border-color: #ffffff !important;
}
.homepage-dark-bg .text-muted {
    color: #adb5bd !important;
}
/* اگر تصویر داخل این بخش باشد، مشکلی ندارد، تصویر بدون تغییر می‌ماند */