﻿/* --- متغیرها --- */
:root {
    --primary-color: #1a4d6d;
    --secondary-color: #f16820;
    --text-dark: #2d3748;
    --text-light: #ffffff;
    --bg-light: #f8fafc;
    --border-radius-lg: 16px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: #f1f5f9;
    color: var(--text-dark);
    line-height: 1.7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- هدر --- */
.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    position: relative;
}

    .main-nav a.active::after {
        content: '';
        position: absolute;
        bottom: -5px;
        right: 0;
        width: 100%;
        height: 2px;
        background: var(--secondary-color);
    }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* --- محتوای اصلی --- */
.main-content {
    padding: 60px 0;
}

.articles-section .container {
    text-align: center;
}

.section-title {
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: inline-block;
    position: relative;
    padding: 0 20px;
    background: white;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
}

    .section-title::before,
    .section-title::after {
        content: '';
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 2px;
        background: var(--secondary-color);
    }

    .section-title::before {
        left: -25px;
    }

    .section-title::after {
        right: -25px;
    }

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 20px 0 40px;
}

/* --- کارت مقاله --- */
.articles-section table {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
    border-collapse: collapse;
}

.articles-section tr {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.articles-section td {
    padding: 0;
    vertical-align: top;
    width: calc(33.333% - 20px);
    max-width: 380px;
    flex: 1 1 300px;
}

.article-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid #e2e8f0;
}

    .article-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-md);
    }

.article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 4px solid var(--secondary-color);
}

.article-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.article-summary {
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    align-self: flex-start;
}

    .read-more-btn:hover {
        background: #e05e19;
        transform: scale(1.05);
    }

    .read-more-btn i {
        transition: transform 0.3s ease;
    }

    .read-more-btn:hover i {
        transform: translateX(-5px);
    }

/* --- فوتر --- */
.main-footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 80px;
}

/* --- واکنش‌گرا --- */
@media (max-width: 992px) {
    .articles-section td {
        width: calc(50% - 15px);
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
    }

        .main-nav.active {
            display: block;
            margin-top: 15px;
        }

        .main-nav ul {
            flex-direction: column;
            gap: 1rem;
        }

    .articles-section td {
        width: 100%;
        max-width: 500px;
    }

    .section-title {
        font-size: 2rem;
    }
}
