/* ====================================================
   متغیرهای اصلی سایت
   ==================================================== */
:root {
    --primary-color: #0B2A4A;
    --accent-color: #F39C12;
    --footer-bg: #0A1F33;
    --footer-text: rgba(255, 255, 255, 0.85);
}

/* ====================================================
   کاهش ۱۰ درصدی اندازه کلی فونت‌ها
   ==================================================== */
html {
    font-size: 90%;
}
body {
    font-size: 0.9rem;
}

/* ====================================================
   استایل‌های پایه
   ==================================================== */
body {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 400;
    background: #fff;
    color: #1e2b3a;
}

/* ===== رفع مشکل اسکرول منوها (پنهان شدن پشت هدر) ===== */
#about, #services, #projects, #contact {
    scroll-margin-top: 80px;
}

/* ===== هدر ===== */
.navbar {
    background-color: var(--primary-color);
    padding: 0.7rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0.4rem;
    transition: 0.3s;
    font-weight: 500;
}
.navbar .nav-link:hover {
    color: var(--accent-color);
}
.navbar-brand .brand-text {
    font-size: 1.6rem;
    color: #fff;
    margin-right: 8px;
    font-weight: 800;
}
.navbar-brand .brand-text span {
    color: var(--accent-color);
}
.navbar-brand img {
    max-height: 45px;
}

/* ===== دکمه‌ها ===== */
.btn-accent {
    background-color: var(--accent-color);
    border: none;
    color: #fff;
    padding: 0.4rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s;
    font-weight: 600;
}
.btn-accent:hover {
    background-color: #d68910;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(243, 156, 18, 0.3);
}
.btn-outline-accent {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
    border-radius: 50px;
    padding: 0.3rem 1.2rem;
    transition: 0.3s;
    font-weight: 600;
}
.btn-outline-accent:hover {
    background: var(--accent-color);
    color: #fff;
}

/* ===== اسلایدر ===== */
.hero-slider .carousel-item {
    height: 85vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero-slider .carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 42, 68, 0.4);
}
.hero-slider .carousel-caption {
    z-index: 2;
    bottom: 30%;
    text-align: right;
}
.hero-slider .carousel-caption h1 {
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.hero-slider .carousel-caption p {
    font-size: 1.3rem;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== بخش‌ها ===== */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin-top: 8px;
    border-radius: 4px;
}
.section-title.text-center::after {
    margin: 8px auto 0;
}

/* ===== طراحی جدید بخش خدمات (کارت‌های مدرن) ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.services-grid .service-item {
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(244,248,252,.96));
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 22px rgba(11,42,74,.08);
    border: 1px solid rgba(11,42,74,.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.services-grid .service-item::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(243,156,18,.18);
    border-radius: 50%;
    left: -72px;
    bottom: -86px;
    box-shadow: 0 0 0 14px rgba(243,156,18,.05), 0 0 0 28px rgba(37,99,235,.035);
    pointer-events: none;
}

.services-grid .service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.services-grid .service-item:hover::before {
    transform: scaleX(1);
}

.services-grid .service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 36px rgba(11,42,74,.16);
    border-color: rgba(243, 156, 18, 0.45);
}

.services-grid .service-item .icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(243, 156, 18, 0.08);
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    transition: 0.3s;
}

.services-grid .service-item:hover .icon-wrapper {
    background: var(--accent-color);
    color: #fff;
    transform: scale(1.05);
}

.services-grid .service-item h5 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.services-grid .service-item p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.6;
}

.services-grid .service-item .text-accent {
    color: var(--accent-color);
    font-size: 0.8rem;
    opacity: 0.8;
}

.services-grid .service-item:hover .text-accent {
    opacity: 1;
}

/* ===== استایل مودال نمایش همه آیتم‌های خدمات ===== */
.service-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}
.service-modal-overlay.active {
    display: flex;
}
.service-modal {
    background: #fff;
    border-radius: 24px;
    max-width: 550px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem 2rem 1.8rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s ease;
    position: relative;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.service-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f2f5;
}
.service-modal .modal-header h4 {
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}
.service-modal .modal-header .modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6c757d;
    transition: 0.3s;
    line-height: 1;
}
.service-modal .modal-header .modal-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}
.service-modal .modal-body {
    padding: 0.5rem 0;
}
.service-modal .modal-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.service-modal .modal-body ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #1e2b3a;
}
.service-modal .modal-body ul li:last-child {
    border-bottom: none;
}
.service-modal .modal-body ul li i {
    color: var(--accent-color);
    width: 20px;
    font-size: 0.9rem;
}
.service-modal .modal-footer {
    margin-top: 1.2rem;
    padding-top: 0.8rem;
    border-top: 1px solid #f0f2f5;
    display: flex;
    justify-content: flex-end;
}
.service-modal .modal-footer .btn-close-modal {
    background: var(--accent-color);
    border: none;
    color: #fff;
    padding: 0.5rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
}
.service-modal .modal-footer .btn-close-modal:hover {
    background: #d68910;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
}

/* ===== مود تاریک برای بخش خدمات ===== */
body.dark-mode .services-grid .service-item {
    background: linear-gradient(145deg, #1a1a2e, #20203a);
    border-color: #2a2a40;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
body.dark-mode .services-grid .service-item::after {
    border-color: rgba(243,156,18,.22);
    box-shadow: 0 0 0 14px rgba(243,156,18,.07), 0 0 0 28px rgba(37,99,235,.05);
}
body.dark-mode .services-grid .service-item h5 {
    color: #ffffff;
}
body.dark-mode .services-grid .service-item p {
    color: #b0b0c8;
}
body.dark-mode .services-grid .service-item .icon-wrapper {
    background: rgba(243, 156, 18, 0.15);
}
body.dark-mode .services-grid .service-item:hover {
    border-color: rgba(243, 156, 18, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ===== رفع نمایش متن‌های text-muted در دارک مود ===== */
body.dark-mode .text-muted {
    color: #b0b0c8 !important;
}

/* ===== مود تاریک برای مودال ===== */
body.dark-mode .service-modal {
    background: #1a1a2e;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
body.dark-mode .service-modal .modal-header {
    border-bottom-color: #2a2a40;
}
body.dark-mode .service-modal .modal-header h4 {
    color: #ffffff;
}
body.dark-mode .service-modal .modal-header .modal-close {
    color: #a0a0b8;
}
body.dark-mode .service-modal .modal-header .modal-close:hover {
    color: var(--accent-color);
}
body.dark-mode .service-modal .modal-body ul li {
    color: #e8e8f0;
    border-bottom-color: #2a2a40;
}
body.dark-mode .service-modal .modal-footer {
    border-top-color: #2a2a40;
}

/* ===== پروژه‌ها ===== */
.project-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    height: 100%;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1);
}
.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.project-card .card-body {
    padding: 1rem 1.2rem;
}
.project-card .card-title {
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== فوتر ===== */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 3px solid var(--accent-color);
}
footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2.5rem;
    margin-bottom: 0.8rem;
}
footer .footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
footer .footer-links a:hover {
    color: var(--accent-color);
}
footer .footer-links i {
    color: var(--accent-color);
    width: 20px;
    font-size: 1rem;
}
footer .footer-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 500px;
    margin: 0.6rem auto;
}
footer .footer-copy {
    font-size: 0.85rem;
    opacity: 0.7;
}
footer .footer-copy a {
    color: var(--accent-color);
    text-decoration: none;
}

/* ===== شبکه‌های اجتماعی ===== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 0.8rem 0;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.3rem;
    transition: 0.3s;
    text-decoration: none;
}
.social-links a:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
}
.social-links a .fa-instagram {
    color: #fff;
}
.social-links a .fa-linkedin-in {
    color: #fff;
}
.social-links a:hover .fa-instagram,
.social-links a:hover .fa-linkedin-in {
    color: #fff;
}

/* ===== رفع نمایش منوی همبرگری در دارک مود ===== */
body.dark-mode .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}
body.dark-mode .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(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== مود تاریک ===== */
body.dark-mode .navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
}
body.dark-mode .navbar .nav-link:hover {
    color: var(--accent-color);
}
body.dark-mode footer {
    background: #0a0a18;
    border-top-color: var(--accent-color);
}
body.dark-mode footer .footer-links a {
    color: rgba(255, 255, 255, 0.85);
}
body.dark-mode footer .footer-links a:hover {
    color: var(--accent-color);
}
body.dark-mode footer .footer-copy {
    color: rgba(255, 255, 255, 0.7);
}
body.dark-mode .hero-slider .carousel-item::after {
    background: rgba(0, 0, 0, 0.5);
}
body.dark-mode .hero-slider .carousel-caption h1,
body.dark-mode .hero-slider .carousel-caption p {
    color: #fff;
}
body.dark-mode .stats-section {
    background: linear-gradient(135deg, var(--primary-color), #1c4e70);
}
body.dark-mode .stats-section .stat-number {
    color: var(--accent-color);
}
body.dark-mode .stats-section .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== مود روشن ===== */
body.light-mode footer {
    background: var(--primary-color);
}
body.light-mode footer .footer-links a {
    color: rgba(255, 255, 255, 0.85);
}
body.light-mode footer .footer-links a:hover {
    color: var(--accent-color);
}
body.light-mode footer .footer-copy {
    color: rgba(255, 255, 255, 0.7);
}
body.light-mode .stats-section {
    background: linear-gradient(135deg, var(--primary-color), #1c4e70);
}
body.light-mode .stats-section .stat-number {
    color: var(--accent-color);
}
body.light-mode .stats-section .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .hero-slider .carousel-caption h1 {
        font-size: 2rem;
    }
    .hero-slider .carousel-caption p {
        font-size: 1rem;
    }
    .hero-slider .carousel-item {
        height: 70vh;
    }
    .navbar-brand .brand-text {
        font-size: 1.3rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
    footer .footer-links {
        flex-direction: column;
        gap: 0.6rem;
        align-items: center;
    }
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.2rem;
    }
    .services-grid .service-item {
        padding: 1.5rem 1rem;
    }
    .services-grid .service-item .icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
    .service-modal {
        padding: 1.5rem;
        max-height: 90vh;
    }
    .service-modal .modal-header h4 {
        font-size: 1.2rem;
    }
    .service-modal .modal-body ul li {
        font-size: 0.9rem;
        padding: 0.5rem 0;
    }
}
/* force update v2 */