/* تنظیمات متغیرها برای تغییر آسان در آینده */
:root {
    --bg-paper: #FDF8F5;    /* زمینه کرم روشن (حس کاغذ مانگا) */
    --primary-red: #E63946;  /* قرمز علامت HM */
    --deep-navy: #1D3557;    /* سرمه‌ای متن لوگو */
    --text-body: #333333;    /* رنگ متن اصلی */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-paper); 
    color: var(--text-body); 
    line-height: 1.6; 
}

/* Header & Navigation - Montserrat */
nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 10%; 
    background: #fff; 
    border-bottom: 1px solid rgba(29, 53, 87, 0.1); 
    font-family: 'Montserrat', sans-serif; 
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px; /* تنظیم اندازه لوگوی شما */
    width: auto;
}

.logo-text { 
    font-size: 22px; 
    font-weight: 700; 
    color: var(--deep-navy); 
    letter-spacing: -0.5px;
}

.logo-text span { color: var(--primary-red); }

nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 30px; }
nav ul li a { 
    text-decoration: none; 
    color: var(--deep-navy); 
    font-size: 13px; 
    font-weight: 600; 
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s; 
}

nav ul li a:hover { color: var(--primary-red); }

/* Grid Layout */
.content-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    width: 80%; 
    margin: 50px auto; 
}

.card { background: #fff; border-radius: 8px; overflow: hidden; transition: 0.3s; }
.card img { width: 100%; height: 250px; object-fit: cover; }
.card-body { padding: 20px; }

.card-category { 
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-red); 
    font-weight: 700; 
    font-size: 11px; 
    text-transform: uppercase;
}

.card-title { 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 700;
    color: var(--deep-navy);
    margin: 10px 0;
    font-size: 1.2rem;}

@media screen and (max-width: 768px) {
    /* ۱. مخفی کردن قطعی منوی متنی در هدر */
    .nav-menu {
        display: none !important; 
        flex-direction: column;
        position: absolute;
        top: 100%; /* دقیقاً زیر هدر باز شود */
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 20px 0;
        border-bottom: 2px solid var(--primary-red);
        z-index: 1000;
    }

    /* ۲. وقتی همبرگری کلیک شد */
    .nav-menu.active {
        display: flex !important;
    }

    /* ۳. تنظیم هدر برای لوگو و دکمه */
    nav {
        position: relative;
        justify-content: space-between !important;
        padding: 10px 20px !important;
    }

    .menu-toggle {
        display: flex !important;
    }

    .nav-menu li {
        text-align: center;
        margin: 15px 0;
    }
}
/* تنظیمات دکمه همبرگری */
.menu-toggle {
    display: none; /* در دسکتاپ مخفی است */
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--deep-navy);
    margin: 3px 0;
    transition: 0.4s;
}

/* استایل مخصوص موبایل */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        z-index: 100;
    }

    .nav-list {
        position: fixed;
        right: -100%; /* منو در حالت عادی خارج از صفحه است */
        top: 70px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 40px 0;
    }

    .nav-list.active {
        right: 0; /* با کلیک وارد صفحه می‌شود */    }

    .nav-list li {
        margin: 15px 0;    }

    /* انیمیشن تبدیل همبرگر به X */
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

/* استایل لینک فعال */
nav ul li a.active {
    color: var(--primary-red); /* تغییر رنگ متن به قرمز */
    position: relative;
}

/* اضافه کردن یک خط کوچک زیر لینک فعال برای زیبایی بیشتر (اختیاری) */
nav ul li a.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--primary-red);
    bottom: -5px;
    left: 0;
}

/* در نسخه موبایل */
@media (max-width: 768px) {
    nav ul li a.active {
        background-color: rgba(230, 57, 70, 0.1); /* یک پس‌زمینه بسیار ملایم قرمز */
        padding: 5px 15px;
        border-radius: 5px;
    }
    nav ul li a.active::after {
        display: none; /* خط زیرین در موبایل حذف شود تا شلوغ نشود */
    }
}


.site-footer {
    background-color: var(--deep-navy); /* همان سرمه‌ای لوگو */
    color: #ffffff;
    padding: 60px 10% 20px;
    margin-top: 80px;
    font-family: 'Montserrat', sans-serif;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
}

.footer-logo {
    font-size: 26px;
    margin-bottom: 15px;
    color: white !important;
}

.footer-logo span {
    color: var(--primary-red);
}

.footer-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #bdc3c7;
    max-width: 300px;
    line-height: 1.8;
}

.footer-nav-section h4 {
    color: var(--primary-red);
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 12px;
}

.footer-list a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
    font-weight: 400;
}

.footer-list a:hover {
    color: var(--primary-red);
    padding-left: 5px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    text-decoration: none;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 5px 10px;
    border-radius: 4px;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 12px;
    color: #7f8c8d;
}

/* بهینه‌سازی برای موبایل */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-tagline {
        margin: 0 auto;
    }

    .social-links {
        justify-content: center;
    }
}

.main-content {
    padding: 40px 10%;
    max-width: 1400px;
    margin: 0 auto;
}

/* استایل بخش هیرو */
.hero-container {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    background: #fff;
    border: 1px solid #eee;
}

.hero-image-box {
    flex: 2; /* فضای بیشتر برای عکس */
    height: 450px;
}

.hero-image-box img {
    width: 100%; height: 100%; object-fit: cover;
}

.hero-text-box {
    flex: 1; /* فضای کمتر برای متن */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-text-box h1 {
    font-size: 32px;
    margin: 15px 0;
    color: var(--deep-navy);
}

/* استایل بخش گرید */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.grid-card {
    background: #fff;
    border: 1px solid #eee;
    transition: 0.3s;
}

.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card-img {
    height: 250px;
}

.card-img img {
    width: 100%; height: 100%; object-fit: cover;
}

.card-content {
    padding: 20px;
}

/* بهینه‌سازی برای موبایل */
@media (max-width: 992px) {
    .hero-container { flex-direction: column; }
    .articles-grid { grid-template-columns: 1fr; }
    .main-content { padding: 20px 5%; }
}
