/* ======== 1. تنظیمات ریشه و متغیرها ======== */
:root {
    --primary-color: #c55f24; /* رنگ اصلی آبی از PDF */
    --secondary-color: #f4f7fa; /* پس زمینه روشن بخش ها */
    --dark-color: #333333;
    --light-color: #ffffff;
    --grey-text: #555555;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* ======== 2. تنظیمات عمومی و فونت ======== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.7;
    background-color: var(--light-color);
    color: var(--dark-color);
    direction: rtl;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.3;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
}

/* خط زیرین زیبا برای عناوین بخش‌ها */
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    opacity: 0.5;
}

p {
    color: var(--grey-text);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

section {
    padding: 4.5rem 0;
}

/* ======== 3. هدر و ناوبری ======== */
.main-header {
    background: var(--light-color);
    padding: 1.2rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav li {
    margin-right: 2.5rem;
}

.main-nav a {
    color: var(--grey-text);
    font-weight: 600;
    transition: color 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ======== 4. بخش درباره ما (Hero) ======== */
.hero {
    background: var(--light-color);
    padding-top: 2rem; /* هدر فضا دارد، پس پدینگ بالا کمتر */
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
}

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    text-align: right;
}

/* ریست کردن خط زیرین برای این h2 */
.hero-content h2::after {
    display: none;
} 

.hero-content p {
    font-size: 1.1rem;
    text-align: justify;
}

.hero-image {
    flex: 0 0 45%; /* کمی کوچکتر از محتوا */
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ======== 5. بخش خدمات ======== */
#services {
    background: var(--secondary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.service-item {
    background: var(--light-color);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.service-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-item h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    min-height: 45px; /* یکدست سازی ارتفاع عناوین */
}

/* ======== 6. بخش دانلود (CTA) ======== */
#cta-guide {
    background-color: var(--primary-color);
    color: var(--light-color);
    text-align: center;
}

#cta-guide h2 {
    color: var(--light-color);
}

#cta-guide h2::after {
    background-color: var(--light-color);
    opacity: 0.6;
}

#cta-guide p {
    color: #e0e0e0;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.cta-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.cta-form input {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 5px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    direction: ltr; /* برای ورودی شماره موبایل */
    text-align: left;
}

.btn {
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-light {
    background: var(--light-color);
    color: var(--primary-color);
}

.btn-light:hover {
    background: #e9e9e9;
    transform: scale(1.02);
}

/* ======== 7. فوتر ======== */
footer {
    padding: 3rem 0 1.5rem 0;
    background: #2b2b2b;
    color: #ccc;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    color: var(--light-color);
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: #ccc;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.contact-info i {
    font-size: 1.1rem;
    margin-left: 0.75rem;
    width: 20px; /* هم‌ترازی آیکون‌ها */
}

.footer-map {
    flex: 1;
}

.footer-map img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #555;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 1.5rem;
    font-size: 0.9rem;
    color: #999;
}

/* ======== 8. کدهای واکنش‌گرایی (Responsive) ======== */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.9rem;
    }
    
    .main-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 0 0.75rem;
    }

    .hero .container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content h2 {
        text-align: center;
        font-size: 1.3rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-info p {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-form {
        flex-direction: column;
    }
    .cta-form input,
    .cta-form button {
        width: 100%;
    }
}
/* ======== 3.5: بازطراحی بخش Hero ======== */

/* دکمه‌های فراخوان (CTA) */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--light-color);
}

.btn-primary:hover {
    background: #003a7a; /* کمی تیره‌تر */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: #f0f6ff; /* هاور با پس‌زمینه خیلی روشن */
    transform: translateY(-2px);
}

/* ساختار اصلی بخش Hero */
.hero-redesigned {
    background: linear-gradient(180deg, var(--light-color) 0%, var(--secondary-color) 100%);
    padding: 4rem 0;
    overflow: hidden; /* برای جلوگیری از بیرون زدن حباب */
}

.hero-redesigned .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* بخش محتوای متنی */
.hero-content {
    flex: 1;
    z-index: 10; /* روی تصویر قرار می‌گیرد */
}

.hero-subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.hero-content h1 {
    font-size: 3.2rem; /* بسیار بزرگتر و با ابهت‌تر */
    font-weight: 900;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--grey-text);
    max-width: 500px; /* محدود کردن عرض پاراگراف برای خوانایی */
    margin-bottom: 2rem;
}

.hero-cta-buttons {
    display: flex;
    gap: 1rem; /* فاصله بین دکمه‌ها */
}

/* بخش تصویر */
.hero-image-wrapper {
    flex: 0 0 45%;
    position: relative; /* برای موقعیت‌دهی حباب و تصویر */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
}

.hero-image-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: linear-gradient(135deg, #e0f0ff 0%, #d86e3154 100%); /* گرادینت آبی بسیار روشن */
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; /* شکل حبابی نامنظم */
    opacity: 0.7;
    z-index: 1;
    /* انیمیشن ملایم برای چرخش حباب */
    animation: blob-rotate 15s linear infinite;
}

.hero-image-wrapper img {
    max-width: 90%;
    height: auto;
    position: relative;
    z-index: 5; /* روی حباب */
    border-radius: 0px;
}

/* انیمیشن چرخش حباب */
@keyframes blob-rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}


/* ======== واکنش‌گرایی برای بخش Hero جدید ======== */
@media (max-width: 768px) {
    .hero-redesigned .container {
        /* در موبایل، متن بالا و تصویر پایین */
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        order: 2; /* متن دوم میاد */
    }
    
    .hero-image-wrapper {
        order: 1; /* تصویر اول میاد */
        width: 100%;
        min-height: 350px;
        margin-bottom: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-cta-buttons {
        justify-content: center;
    }
}

/* ======== 5.6: بازطراحی بخش خدمات (گرید مدرن) ======== */

#services {
    background: var(--light-color); /* یا var(--secondary-color) */
}

/* استایل زیرعنوان (Subtitle) برای بخش‌ها */
.section-subtitle {
    text-align: center;
    font-size: 1.15rem;
    color: var(--grey-text);
    max-width: 650px;
    margin: -2.5rem auto 3rem auto; /* کمی بالا می‌رود تا به عنوان بچسبد */
}

.services-grid-professional {
    display: grid;
    /* این گرید جادویی است:
      - ستون‌هایی با حداقل عرض 280px می‌سازد.
      - تا جایی که جا باشد کنار هم قرار می‌گیرد (auto-fit).
      - فضای باقی‌مانده را به طور مساوی تقسیم می‌کند (1fr).
    */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.service-card {
    background: var(--light-color);
    border: 1px solid #e9ecef; /* یک حاشیه بسیار محو و حرفه‌ای */
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.service-card .card-icon {
    font-size: 3rem;
    line-height: 1;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--grey-text);
    line-height: 1.7;
    margin: 0;
}

/* ======== 7: فوتر (ویرایش بخش نقشه) ======== */

/* ... استایل‌های .footer-content و .contact-info ... */

.footer-map {
    flex: 1;
    min-height: 280px; /* حداقل ارتفاع برای نمایش نقشه */
    height: 100%; /* تلاش برای پر کردن ارتفاع ستون */
}

.footer-map iframe {
    width: 100%;
    height: 100%; /* 100% ارتفاع والد خود (.footer-map) */
    border-radius: 8px;
    border: 2px solid #555;
    opacity: 0.9;
    min-height: 280px; /* اطمینان از ارتفاع در هر حالتی */
}

/* ... استایل .footer-bottom ... */

/* ======== 6.5: بازطراحی بخش دانلود (CTA) ======== */

#cta-guide {
    background: var(--secondary-color); /* پس‌زمینه روشن برای کل بخش */
    padding: 4.5rem 0;
}

.cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between; /* متن راست، آیکون چپ */
    gap: 3rem;
    /* گرادینت جذاب به جای رنگ ثابت */
    background: linear-gradient(135deg, var(--primary-color) 0%, #003a7a 100%);
    color: var(--light-color);
    padding: 4rem 4.5rem;
    border-radius: 20px; /* گوشه‌های گردتر و مدرن‌تر */
    box-shadow: 0 15px 35px rgba(0, 58, 122, 0.25); /* سایه همرنگ و عمیق */
    overflow: hidden; /* برای جلوگیری از بیرون زدن آیکون */
    position: relative; /* برای موقعیت‌دهی آیکون */
}

.cta-content {
    flex: 2; /* فضای بیشتری به متن بده */
    z-index: 5; /* روی آیکون قرار می‌گیرد */
}

.cta-content h2 {
    color: var(--light-color);
    text-align: right;
    margin-bottom: 1rem;
    font-size: 2.3rem;
}

/* ریست کردن خط زیرین عنوان که از استایل عمومی می‌آید */
.cta-content h2::after {
    display: none; 
}

.cta-content p {
    color: #e0e0e0;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.cta-form-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 500px;
}

/* افکت شیشه‌ای (Glassmorphism) برای فیلد ورودی */
.cta-form-inline input {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: var(--light-color);
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    direction: ltr;
    text-align: left;
    transition: all 0.3s ease;
}

.cta-form-inline input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--light-color);
}

/* استایل placeholder */
.cta-form-inline input::placeholder {
    color: #c0dfff;
    opacity: 1;
}

/* استایل دکمه */
.cta-form-inline .btn-light {
    flex-shrink: 0; /* جلوگیری از کوچک شدن دکمه */
    padding: 0.9rem 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.cta-form-inline .btn-light:hover {
    background: #f0f0f0;
    transform: scale(1.03);
}

/* بخش بصری (آیکون بزرگ) */
.cta-visual {
    flex: 1;
    text-align: left;
    z-index: 2;
    position: absolute; /* موقعیت‌دهی مطلق برای افکت واترمارک */
    left: 40px; /* فاصله از چپ */
    top: 50%;
    transform: translateY(-50%) rotate(-10deg); /* چرخش ملایم */
    opacity: 0.15; /* بسیار محو */
    user-select: none; /* غیرقابل انتخاب */
}

.cta-visual i {
    font-size: 12rem; /* بسیار بزرگ */
    color: var(--light-color);
}

/* ======== واکنش‌گرایی برای CTA ======== */
@media (max-width: 992px) {
    .cta-card {
        /* در تبلت، آیکون ناپدید می‌شود تا فضا برای فرم باز شود */
        padding: 3rem 2.5rem;
    }
    .cta-visual {
        display: none; 
    }
    .cta-content {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 3rem 2rem;
    }

    .cta-content h2, .cta-content p {
        text-align: center;
        max-width: 100%;
    }

    .cta-form-inline {
        flex-direction: column;
        width: 100%;
    }

    .cta-form-inline input,
    .cta-form-inline button {
        width: 100%;
    }
}
/* ======== 8: بازطراحی فوتر ======== */

/* حذف استایل‌های قدیمی فوتر برای جلوگیری از تداخل 
   اگر استایل‌های قبلی را حذف نکرده‌اید، این بخش آن‌ها را بازنویسی می‌کند.
*/
footer {
    padding: 5rem 0 0 0; /* پدینگ بالا زیاد، پایین صفر */
    background: #222; /* پس‌زمینه تیره‌تر و حرفه‌ای‌تر */
    color: #ccc;
}

/* استایل‌های جدید برای فوتر 
*/
.footer-main-content {
    display: grid;
    /* گرید 4 ستونه حرفه‌ای:
      دو ستون اول 1.5 برابر، ستون سوم 2 برابر، ستون چهارم 2.5 برابر فضا می‌گیرند
      تا ستون نقشه بزرگتر باشد.
    */
    grid-template-columns: 1.5fr 1fr 1.5fr 2fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column {
    padding-right: 1.5rem; /* کمی فاصله داخلی برای ستون‌ها */
}

/* استایل عناوین ستون‌ها */
.footer-column h4,
.footer-column h3 {
    color: var(--light-color);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

/* خط زیرین زیبا برای عناوین فوتر */
.footer-column h4::after,
.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.footer-logo {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary-color);
}
.footer-logo::after {
    display: none; /* لوگو خط زیرین نیاز ندارد */
}

#footer-about p {
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* آیکون‌های شبکه‌های اجتماعی */
.social-icons {
    display: flex;
    gap: 0.75rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    color: var(--light-color);
    background: #444;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-3px);
}

/* لیست لینک‌ها و اطلاعات تماس */
.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 1rem;
}

.footer-column ul a {
    color: #ccc;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-column ul a:hover {
    color: var(--primary-color);
    padding-right: 5px; /* افکت هاور زیبا */
}

/* استایل لیست اطلاعات تماس */
#footer-contact-info ul li {
    display: flex;
    align-items: flex-start; /* تراز از بالا */
    gap: 0.75rem;
    font-size: 0.95rem;
}

#footer-contact-info i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 4px; /* هم‌ترازی آیکون با متن */
    width: 20px;
}

/* استایل نقشه (جایگزین استایل قبلی) */
.footer-map {
    height: 220px; /* ارتفاع ثابت برای نقشه */
    border-radius: 10px;
    overflow: hidden; /* برای گرد شدن گوشه‌های iframe */
    border: 1px solid #555;
}

.footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* بخش کپی رایت */
.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #999;
}

.footer-bottom strong {
    color: #eee;
    font-weight: 600;
}


/* ======== واکنش‌گرایی برای فوتر جدید ======== */
@media (max-width: 992px) {
    .footer-main-content {
        /* در تبلت 2 ستونه می‌شود */
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-main-content {
        /* در موبایل تک ستونه می‌شود */
        grid-template-columns: 1fr;
    }

    .footer-column {
        padding-right: 0; /* حذف پدینگ اضافه */
        text-align: center;
    }

    .footer-column h4::after,
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-icons {
        justify-content: center;
    }

    #footer-contact-info ul li {
        text-align: right; /* متن‌ها راست‌چین می‌مانند */
    }
}

/* ======== 9: بخش نمونه کار ======== */

#portfolio {
    background: var(--secondary-color); /* یا var(--light-color) */
    padding: 4.5rem 0;
}

/* دکمه‌های فیلتر */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap; /* برای نمایش بهتر در موبایل */
}

.filter-btn {
    font-family: 'Vazirmatn', sans-serif;
    padding: 0.6rem 1.25rem;
    border: 2px solid var(--primary-color);
    background: var(--light-color);
    color: var(--primary-color);
    border-radius: 30px; /* دکمه‌های کپسولی مدرن */
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e0f0ff; /* هاور آبی بسیار روشن */
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--light-color);
    box-shadow: 0 4px 10px rgba(0, 58, 122, 0.2);
}

/* گرید نمونه کارها */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 ستون در دسکتاپ */
    gap: 0.5rem; /* گپ (فاصله) کمتر برای جا شدن 5 ستون */
}

.portfolio-item {
    width: 100%;
    height: 240px; /* کاهش ارتفاع برای تناسب بهتر */
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative; /* برای لایه رویی (overlay) */
    border-radius: 12px;
    overflow: hidden; /* برای گرد شدن گوشه‌های عکس */
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    cursor: pointer;
}

/* انیمیشن برای فیلتر شدن */
.portfolio-item.hide {
    transform: scale(0.8);
    opacity: 0;
    width: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    gap: 0;
}

.portfolio-item img {
    width: 100%;
    height: 300px; /* ارتفاع ثابت برای همه کارت‌ها */
    object-fit: cover; /* عکس‌ها را برش می‌زند تا فیت شوند */
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portfolio-item:hover img {
    transform: scale(1.1); /* افکت زوم روی عکس */
}

/* لایه رویی (Overlay) */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 58, 122, 0.85) 0%, rgba(0, 0, 0, 0.1) 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end; /* تراز محتوا در پایین */
    padding: 1.5rem;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay .overlay-content {
    transform: translateY(15px); /* شروع از کمی پایین‌تر */
    transition: transform 0.4s ease;
}

.portfolio-item:hover .overlay-content {
    transform: translateY(0); /* آمدن به جای اصلی */
}

.overlay-content h3 {
    color: var(--light-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.overlay-content span {
    color: #e0f0ff;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ======== 10: اصلاح استایل لینک‌های فوتر ======== */
#footer-contact-info ul li a {
    color: #ccc; /* ارث‌بری رنگ از متن فوتر */
    text-decoration: none; /* حذف خط زیرین */
    transition: color 0.3s ease;
}

#footer-contact-info ul li a:hover {
    color: var(--primary-color); /* افکت هاور */
}
/* ======== 11: بخش شبکه‌های اجتماعی ======== */

#social-feed {
    padding: 4.5rem 0;
    background: var(--light-color);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* گرید ۵ ستونه */
    gap: 1.25rem;
}

.social-grid-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: block;
    aspect-ratio: 1 / 1; /* ایجاد کادرهای مربعی کامل */
}

.social-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* عکس‌ها کاملاً فیت می‌شوند */
    transition: transform 0.4s ease;
}

.social-grid-item:hover img {
    transform: scale(1.1);
}

.social-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* لایه تیره */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.social-grid-item:hover .social-overlay {
    opacity: 1;
}

.social-overlay i {
    font-size: 3rem;
    color: var(--light-color);
    opacity: 0.8;
}

.social-button-wrapper {
    text-align: center;
    margin-top: 3rem; /* فاصله دکمه از گرید */
}

/* واکنش‌گرایی برای گرید */
@media (max-width: 992px) {
    .social-grid {
        /* در تبلت ۳ ستونه */
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* مخفی کردن آیتم‌های اضافی در تبلت */
    .social-grid-item:nth-child(4),
    .social-grid-item:nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .social-grid {
        /* در موبایل ۲ ستونه */
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* نمایش آیتم چهارم در موبایل */
    .social-grid-item:nth-child(4) {
        display: block;
    }
    
    /* مخفی کردن آیتم پنجم */
    .social-grid-item:nth-child(5) {
        display: none;
    }
}
/* ======== 12: استایل لوگوی هدر ======== */

/* استایل‌های قبلی .logo (مثل font-size) دیگر نیازی نیست */
.logo {
    display: block; /* برای چیدمان بهتر */
}

.logo img {
    height: 50px; /* ارتفاع لوگو را تنظیم کنید */
    width: auto;  /* عرض به صورت خودکار تنظیم می‌شود */
    display: block;
}
/* ======== 13: بازطراحی هدر (شیک و چسبان) ======== */

/* 1. استایل پایه هدر (حالت شناور و شفاف) */
.main-header {
    position: sticky; /* چسبان */
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0; /* پدینگ بیشتر در حالت شناور */
    background: transparent; /* شروع شفاف */
    
    /* ترنزیشن نرم برای تمام تغییرات */
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

/* 2. استایل هدر در حالت اسکرول خورده */
.main-header.scrolled {
    background-color: #ffffff; /* پس‌زمینه سفید هنگام اسکرول */
    padding: 0.75rem 0; /* پدینگ کمتر */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* سایه نرم و حرفه‌ای */
}

/* 3. تراز کردن آیتم‌های داخل هدر */
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 4. استایل لوگو (با ترنزیشن اندازه) */
.logo img {
    height: 50px;
    width: auto;
    transition: height 0.4s ease;
}

.main-header.scrolled .logo img {
    height: 45px; /* کمی کوچکتر شدن لوگو هنگام اسکرول */
}

/* 5. استایل منوی ناوبری */
.main-nav ul {
    display: flex;
    align-items: center; /* تراز عمودی لینک‌ها و دکمه */
    list-style: none;
    gap: 2.5rem; /* فاصله مدرن بین آیتم‌ها */
}

.main-nav a {
    text-decoration: none;
    /* رنگ متن لینک‌ها را تیره انتخاب می‌کنیم تا هم روی 
      تصویر Hero (که معمولا روشن است) و هم روی پس‌زمینه سفید خوانا باشد
    */
    color: var(--dark-color); 
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 8px; /* فاصله برای خط زیرین */
}

/* 6. افکت خط زیرین انیمیشنی (بسیار شیک) */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0; /* شروع از عرض صفر */
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%; /* نمایش کامل خط در هاور */
}

/* 7. استایل دکمه CTA (ارتباط با ما) */
.main-nav a.nav-cta {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.75rem 1.5rem;
    border-radius: 30px; /* دکمه کپسولی */
    transition: all 0.3s ease;
}

.main-nav a.nav-cta:hover {
    background-color: #003a7a; /* کمی تیره‌تر */
    box-shadow: 0 4px 10px rgba(0, 58, 122, 0.2);
    transform: translateY(-2px);
}

/* 8. حذف افکت خط زیرین از دکمه CTA */
.main-nav a.nav-cta::after {
    display: none;
}

/* ======== 14: بازطراحی هدر (افکت شیشه‌ای و منوی موبایل) ======== */

/* 1. استایل پایه هدر */
.main-header {
    position: fixed; /* تغییر به fixed برای افکت شیشه‌ای تمام صفحه */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: transparent; /* همیشه شفاف شروع می‌شود */
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

/* 2. حالت اسکرول خورده (افکت شیشه‌ای - Glassmorphism) */
.main-header.scrolled {
    /* پس‌زمینه سفید نیمه‌شفاف */
    background-color: rgba(255, 255, 255, 0.85);
    
    /* افکت "شیشه مات" (مهم‌ترین بخش) */
    @supports (backdrop-filter: blur(10px)) {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* سایه بسیار محو */
}

/* 3. چیدمان داخلی هدر */
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* برای منوی موبایل */
}

/* 4. استایل لوگو */
.logo img {
    height: 45px; /* ارتفاع ثابت و بهینه */
    width: auto;
    transition: height 0.4s ease;
}

/* 5. استایل منوی دسکتاپ (مخفی شدن در موبایل) */
.main-nav {
    display: block; /* در دسکتاپ نمایش داده شود */
}

.main-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2.2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-color); /* رنگ تیره برای خوانایی روی پس‌زمینه شفاف/روشن */
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 8px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* افکت خط زیرین انیمیشنی (ظریف‌تر) */
.main-nav a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:not(.nav-cta):hover::after {
    width: 100%;
}

/* 6. دکمه CTA در منو */
.main-nav a.nav-cta {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 0.7rem 1.4rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.main-nav a.nav-cta:hover {
    background-color: #003a7a;
    box-shadow: 0 4px 10px rgba(0, 58, 122, 0.2);
    transform: translateY(-2px);
}

/* 7. دکمه همبرگری (منوی موبایل) */
.mobile-nav-toggle {
    display: none; /* در دسکتاپ مخفی */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002; /* بالاتر از همه چیز در هدر */
    padding: 5px;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* 8. منوی تمام صفحه موبایل (Overlay) */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98); /* پس‌زمینه نیمه‌شفاف */
    
    @supports (backdrop-filter: blur(10px)) {
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    z-index: 1001; /* زیر هدر ولی روی محتوا */
    
    /* انیمیشن باز شدن */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
    
    /* چیدمان منو در مرکز */
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav ul {
    list-style: none;
    text-align: center;
}

.mobile-nav li {
    margin: 2.5rem 0;
}

.mobile-nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-size: 1.8rem; /* فونت بسیار بزرگ و شیک */
    font-weight: 700;
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--primary-color);
}

/* 9. انیمیشن دکمه همبرگری به "X" */
.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 10. واکنش‌گرایی هدر */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* مخفی کردن منوی دسکتاپ */
    }
    .mobile-nav-toggle {
        display: block; /* نمایش دکمه همبرگری */
    }
}

/* 11. ایجاد فاصله در بالای محتوای صفحه */
/* چون هدر fixed است، باید محتوای اصلی را به پایین هل دهیم */
main {
    padding-top: 80px; /* به اندازه ارتفاع تقریبی هدر */
}

/* ======== 15: استایل پاپ‌آپ (Modal) نمونه کار ======== */

/* 1. پس‌زمینه تیره (Overlay) */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* تیره‌تر برای تمرکز بیشتر */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    
    display: flex; /* برای وسط‌چینی */
    align-items: center;
    justify-content: center;
    
    /* انیمیشن باز شدن */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.portfolio-modal.active {
    opacity: 1;
    visibility: visible;
}

/* 2. کادر سفید محتوا */
.modal-content {
    background: var(--light-color);
    max-width: 900px; /* عرض بیشتر برای جزئیات */
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    
    /* انیمیشن پاپ‌آپ */
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portfolio-modal.active .modal-content {
    transform: scale(1);
}

.modal-body {
    display: flex;
    max-height: 80vh; /* محدودیت ارتفاع */
}

/* 3. دکمه بستن (X) */
.modal-close {
    position: absolute;
    top: -15px; /* کمی بیرون از کادر */
    right: -15px;
    background: var(--primary-color);
    color: var(--light-color);
    border: 3px solid var(--light-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 2rem;
    line-height: 35px;
    text-align: center;
    cursor: pointer;
    z-index: 2001;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: scale(1.1) rotate(90deg);
}

/* 4. محتوای داخل پاپ‌آپ */
.modal-image {
    flex: 1.2; /* عکس کمی بزرگتر از متن */
    overflow: hidden;
    border-radius: 12px 0 0 12px; /* گردی گوشه فقط در سمت راست */
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-details {
    flex: 1;
    padding: 2rem 2.5rem;
    overflow-y: auto; /* اسکرول در صورت زیاد بودن متن */
}

.modal-details h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-details p {
    font-size: 1rem;
    color: var(--grey-text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-details ul {
    list-style: none;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.modal-details ul li {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.modal-details ul li strong {
    color: var(--dark-color);
    min-width: 80px;
    display: inline-block;
}

/* 5. واکنش‌گرایی پاپ‌آپ */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column; /* چیدمان عمودی در موبایل */
        max-height: 85vh; /* ارتفاع بیشتر */
    }
    
    .modal-image {
        max-height: 250px;
        border-radius: 12px 12px 0 0; /* گردی گوشه‌ها در بالا */
    }
    
    .modal-details {
        padding: 1.5rem;
    }
    
    .modal-close {
        top: -10px;
        right: 10px;
        width: 35px;
        height: 35px;
        line-height: 30px;
        font-size: 1.5rem;
    }
}

/* ======== واکنش‌گرایی جدید برای گرید 5 ستونه نمونه کار ======== */
@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 ستون در تبلت */
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 ستون در موبایل */
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr; /* 1 ستون در موبایل‌های کوچک */
    }
}