/* =========================================================
   Classic Template - Vazirmatn
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;800&display=swap');

:root {
    --primary: #3d5f8f; /* این متغیر در layout.php آپدیت می‌شود */
    --primary-dark: #2f4a72;
    --text: #334155;
    --text-muted: #64748b;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Vazirmatn', sans-serif; }
body { background-color: var(--bg); color: var(--text); line-height: 1.7; font-size: 15px; }
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}
.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-area img { height: 48px; border-radius: 8px; }
.logo-area h1 { font-size: 20px; font-weight: 800; color: var(--primary-dark); }

.main-nav ul { display: flex; gap: 24px; list-style: none; }
.main-nav a { font-weight: 500; color: var(--text); position: relative; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }
.main-nav a::after {
    content: ''; position: absolute; bottom: -6px; left: 0; right: 0;
    height: 2px; background: var(--primary); transform: scaleX(0); transition: 0.2s;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.btn-contact {
    background: var(--primary); color: white; padding: 8px 20px;
    border-radius: 8px; font-weight: 500; font-size: 14px;
}
.btn-contact:hover { background: var(--primary-dark); box-shadow: 0 4px 10px rgba(61,95,143,0.3); }

/* ---------- Hero Slider ---------- */
.hero-slider {
    position: relative; width: 100%; height: 400px;
    background: #1e293b; overflow: hidden; margin-bottom: 40px;
}
.slider-item {
    position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease;
    display: flex; align-items: center; justify-content: center;
}
.slider-item.active { opacity: 1; z-index: 1; }
.slider-item img { width: 100%; height: 100%; object-fit: cover; }
.slider-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: white; padding: 20px;
}
.slider-overlay h2 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.slider-nav {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 10;
}
.slider-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.slider-dot.active { background: white; transform: scale(1.2); }

/* ---------- About ---------- */
.about-box {
    background: var(--surface); border-radius: var(--radius); padding: 40px;
    box-shadow: var(--shadow-md); text-align: center; margin-bottom: 40px;
    border-top: 4px solid var(--primary);
}
.about-box h2 { color: var(--primary-dark); margin-bottom: 16px; font-size: 24px; }
.about-box p { color: var(--text-muted); font-size: 16px; max-width: 800px; margin: 0 auto; }

/* ---------- Section Titles ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title h3 { font-size: 22px; font-weight: 800; color: var(--text); position: relative; padding-right: 16px; }
.section-title h3::before { content: ''; position: absolute; right: 0; top: 4px; bottom: 4px; width: 4px; background: var(--primary); border-radius: 4px; }
.btn-more { color: var(--primary); font-weight: 500; display: flex; align-items: center; gap: 6px; }

/* ---------- News Cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-bottom: 50px; }
.news-card {
    background: var(--surface); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: transform 0.3s, box-shadow 0.3s;
    display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-img { width: 100%; height: 200px; object-fit: cover; }
.news-content { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-date { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.news-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 10px; line-height: 1.5; flex: 1; }
.news-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-link { color: var(--primary); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 50px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #e2e8f0; padding: 50px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-col h4 { color: white; margin-bottom: 20px; font-size: 18px; }
.footer-col p { font-size: 14px; color: #94a3b8; line-height: 1.8; }
.footer-contact li { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; font-size: 14px; color: #94a3b8; }
.social-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 15px; }
.social-links a {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; color: white; font-size: 18px;
}
.social-links a:hover { background: var(--primary); }
.trust-badges { display: flex; gap: 15px; margin-top: 15px; }
.trust-badge { width: 80px; height: 80px; background: rgba(255,255,255,0.05); border: 1px dashed rgba(255,255,255,0.2); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 10px; text-align: center; color: #64748b; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: #64748b; }
.footer-bottom a { color: var(--accent); }

/* ---------- Utilities ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-bottom: 40px; }
.page-btn { padding: 8px 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 500; }
.page-btn.active, .page-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

@media (max-width: 768px) {
    .main-nav { display: none; } /* فعلا برای موبایل منو رو مخفی می‌کنیم مگر اینکه بخوای همبرگری بزاریم */
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero-slider { height: 250px; }
    .slider-overlay h2 { font-size: 22px; }
}