﻿
:root {
    --primary-color: #007a51;
    --secondary-color: #111a17;
    --accent-color: #f3f7f4;
    --dark-color: #111a17;
    --light-color: #cfcfcf;
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-secondary {
    background-color: var(--secondary-color);
}

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

/* استایل‌های هیرو */
.hero-section {
    position: relative;
    margin-bottom: 80px;
}

.hero-container {
    height: 300px;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
    position: relative;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem;
    border-radius: 15px 15px 15px 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 100;
}

.hero-buttons {
    position: absolute;
    bottom: 30px;
    right: 5%;
    display: flex;
    gap: 8px;
    z-index: 101;
    flex-direction: row;
}



/* اسلاید با افکت فِید */
#heroSlider {
    position: relative;
    width: 100%;
    height: 100%;
}

    #heroSlider .hero-slide {
        position: absolute;
        inset: 0;
        opacity: 0;
        transition: opacity .8s ease;
        z-index: 0;
    }

        #heroSlider .hero-slide.active {
            opacity: 1;
            z-index: 1;
        }

    #heroSlider img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* دات‌های ناوبری */
#heroDots {
    position: absolute;
    z-index: 5;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

    #heroDots .dot {
        width: 8px;
        height: 8px;
        border-radius: 9999px;
        background: rgba(255,255,255,.6);
        border: 1px solid rgba(255,255,255,.95);
        cursor: pointer;
        transition: background 0.3s ease;
    }

        #heroDots .dot.active {
            background: #fff;
        }

/* فلش‌های ناوبری */
#prevSlide, #nextSlide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 5;
    cursor: pointer;
    transition: background 0.3s ease;
}

    #prevSlide:hover, #nextSlide:hover {
        background: rgba(0,0,0,0.5);
    }

#prevSlide {
    left: 15px;
}

#nextSlide {
    right: 15px;
}

/* استایل‌های ریسپانسیو */
@media (min-width: 480px) {
    .hero-buttons {
        flex-direction: row;
    }
}

@media (min-width: 640px) {
    .hero-container {
        height: 400px;
    }

    .hero-overlay {
        padding: 1.5rem;
    }

    .hero-buttons {
        bottom: 20px;
        gap: 10px;
    }
}

@media (min-width: 768px) {
    .hero-container {
        height: 500px;
    }

    .hero-overlay {
        width: 80%;
        padding: 1.5rem;
    }

    .hero-buttons {
        right: 11%;
    }
}

@media (min-width: 1024px) {
    .hero-section {
        margin-bottom: 120px;
    }
}

/* بهبود اسلایدشو برای موبایل */
@media (max-width: 767px) {
    .hero-container {
        height: 150px !important;
        border-radius: 0;
    }

    /* استایل‌های منوی موبایل فعال */
    #mobileMenu nav a.active-nav-item {
        color: var(--primary-color);
        font-weight: bold;
    }

        #mobileMenu nav a.active-nav-item::before,
        #mobileMenu nav a.active-nav-item::after {
            content: '';
            position: absolute;
            right: 0;
            height: 2px;
            width: 30px;
            background-color: var(--primary-color);
        }

        #mobileMenu nav a.active-nav-item::before {
            top: 0;
        }

        #mobileMenu nav a.active-nav-item::after {
            bottom: 0;
        }

    #heroSlider img {
        object-fit: cover;
    }

    .hero-slide {
        height: 100%;
    }

    .hero-buttons {
        display: none !important;
    }

        .hero-buttons button {
            padding: 8px 12px;
            font-size: 12px;
            width: 140px;
        }

    .hero-overlay {
        bottom: -40px;
        width: 95%;
        padding: 12px;
    }

        .hero-overlay h1 {
            font-size: 16px;
            line-height: 1.4;
            margin: 0;
        }

    /* مخفی کردن فلش‌های ناوبری در موبایل */
    #prevSlide, #nextSlide {
        display: none !important;
    }

    #heroDots {
        bottom: 10px;
    }

    .hero-section {
        margin-bottom: 60px;
    }
}

/* بهبود برای تبلت‌های کوچک */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-container {
        height: 350px !important;
    }
}

/* بهبود نمایش در دستگاه‌های بسیار کوچک */
@media (max-width: 400px) {
    .hero-buttons button {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        width: 120px;
    }

    .hero-overlay h1 {
        font-size: 14px;
    }
}

/* استایل‌های منو */
.mobile-menu {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

/* خط بالا و پایین برای منوی فعال */
nav a.active-nav-item {
    position: relative;
}

    nav a.active-nav-item::before,
    nav a.active-nav-item::after {
        content: '';
        position: absolute;
        right: 0;
        height: 2px;
        width: 100%;
        background-color: var(--primary-color);
    }

    nav a.active-nav-item::before {
        top: 0;
    }

    nav a.active-nav-item::after {
        bottom: 0;
    }

/* فقط برای هاور روی لینک‌هایی که اکتیو نیستن */
nav a:not(.active-nav-item):hover::before,
nav a:not(.active-nav-item):hover::after {
    content: '';
    position: absolute;
    right: 0;
    height: 2px;
    width: 100%;
    background-color: var(--primary-color);
    transform: scaleX(0.8);
    transition: all 0.3s ease;
}

nav a:not(.active-nav-item):hover::before {
    top: 0;
}

nav a:not(.active-nav-item):hover::after {
    bottom: 0;
}

/* استایل‌های بخش خدمات */
.services-container {
    margin-top: -40px;
}

@media (min-width: 768px) {
    .services-container {
        margin-top: -50px;
    }
}

/* استایل‌های فرم */
.form-section {
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .form-section {
        padding: 5rem 2rem;
    }
}

/* استایل‌های ویدیو */
.video-container {
    margin-top: -120px;
}

@media (min-width: 768px) {
    .video-container {
        margin-top: -200px;
    }
}

@media (min-width: 1024px) {
    .video-container {
        margin-top: -280px;
    }
}

/* استایل‌های بخش پایانی */
.about-section {
    flex-direction: column;
}

@media (min-width: 768px) {
    .about-section {
        flex-direction: row;
    }
}

/* Footer – clean, de-duplicated, RTL-friendly */
.footer {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
    direction: rtl; /* در صورت RTL بودن سایت */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr; /* موبایل: تک‌ستون */
    gap: 2rem;
}

    /* همه ستون‌ها از بالا تراز شوند */
    .footer-container > * {
        align-self: start;
    }

/* ستون لوگو/توضیح */
.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

    .footer-logo img {
        height: 80px;
        margin-bottom: 1rem;
    }

    .footer-logo p {
        color: #cfcfcf;
        font-size: 0.9rem;
        line-height: 1.8;
        text-align: justify;
        text-align-last: right;
    }

/* هدینگ‌های ستون‌ها (شامل اینماد) */
.footer-links h4,
.footer-contact h4,
.enamad-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    color: var(--primary-color);
}

    .footer-links h4::after,
    .footer-contact h4::after,
    .enamad-section h4::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 50px;
        height: 2px;
        background-color: var(--primary-color);
    }

/* لینک‌های سریع */
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-bottom: 0.8rem;
}

    .footer-links li::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 1px;
        background-color: rgba(207,207,207,.2);
    }

    .footer-links li:last-child::after {
        display: none;
    }

.footer-links a {
    color: #cfcfcf;
    text-decoration: none;
    transition: color .3s;
    display: block;
    padding: .2rem 0;
}

    .footer-links a:hover {
        color: var(--primary-color);
    }

/* ارتباط با ما – لیبل (span) ثابت‌عرض، مقدار کنارِش */
.footer-contact p {
    margin: 0 0 .8rem;
    padding: 0 0 .8rem;
    position: relative;
    color: #cfcfcf;
    display: flex; /* لیبل و مقدار در یک خط */
    align-items: center;
    gap: .5rem;
}

    .footer-contact p::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 1px;
        background-color: rgba(207,207,207,.2);
    }

    .footer-contact p:last-child::after {
        display: none;
    }

.footer-contact span {
    color: var(--primary-color);
    font-weight: 700;
    display: inline-block;
    min-width: 120px; /* تراز عمودی آیتم‌ها */
    flex-shrink: 0;
}
/* تلاش برای یک‌خطی ماندن شماره‌ها روی دسکتاپ */
@media (min-width: 768px) {
    .footer-contact p b,
    .footer-contact p .value,
    .footer-contact p a {
        white-space: nowrap;
    }
}

/* بخش اینماد */
.enamad-section {
    display: flex;
    flex-direction: column;
}

.enamad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    background-color: rgba(255,255,255,.05);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.1);
}

.enamad-link {
    display: block;
    margin-bottom: 1rem;
    transition: transform .3s ease;
}

    .enamad-link:hover {
        transform: scale(1.05);
    }

.enamad-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,.2);
}

.enamad-description {
    color: #cfcfcf;
    font-size: .85rem;
    line-height: 1.5;
    margin: 0;
}

/* کپی‌رایت */
.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(207,207,207,.2);
    color: #cfcfcf;
    font-size: .9rem;
}

/* ریسپانسیو: دو ستون از md، چهار ستون از lg با عرض‌های منطقی */
@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links h4::after,
    .footer-contact h4::after,
    .enamad-section h4::after {
        width: 70px;
    }
}

@media (min-width: 992px) {
    .footer-container {
        grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr);
        gap: 2rem 2.5rem;
    }
}
/* موبایل: پاراگراف‌های تماس زیرهم بیفتند تا فشرده نشوند */
@media (max-width: 767px) {
    .footer-links h4, .footer-contact h4, .enamad-section h4 {
        margin-top: 1.5rem;
    }

    .enamad-container {
        padding: .8rem;
    }

    .enamad-description {
        font-size: .8rem;
    }

    .footer-contact p {
        display: block;
    }
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    html, body {
        overflow-x: hidden;
    }
}

/* دکمه‌ها کوچکتر شوند */
.btn-mobile {
    min-width: 5.5rem; /* عرض کوچکتر */
    max-width: 5.5rem;
    font-size: 0.65rem; /* فونت کوچکتر */
    padding: 0.3rem 0.45rem; /* ارتفاع کمتر */
    text-align: center;
    border-radius: 0.5rem;
    white-space: nowrap;
}

/* ردیف دکمه‌ها بالا */
.btn-row {
    display: flex;
    flex-direction: row-reverse;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-right: 0.5rem; /* فاصله ثابت از لبه راست */
}

/* دکمه پایین – مجموع دو دکمه بالا + فاصله بین */
.btn-mobile-full {
    width: calc((5.5rem * 2) + 0.5rem);
    max-width: calc((5.5rem * 2) + 0.5rem);
    text-align: center;
    margin-right: 0.5rem;
}

@media (max-width: 640px) {
    /* کاهش ارتفاع سکشن موبایل */
    .hero-mobile {
        min-height: 160px; /* از 220 به 200 کاهش */
    }

        /* تصویر مرد کمی پایین‌تر قرار بگیرد */
        .hero-mobile img.man-banner {
            height: 85%; /* قبلاً 75 بود */
        }

        /* کاهش فاصله قبل از دکمه‌ها */
        .hero-mobile .mt-3 {
            margin-top: 0.5rem; /* قبلش 0.75 بود */
        }
}
.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-slideIn {
    animation: slideIn 0.3s ease-out;
}


