/* --- Reset & Variables --- */
:root {
    /* Colors */
    --primary: #1e3a8a;       /* آبی سرمه‌ای عمیق */
    --primary-light: #3b82f6; /* آبی روشن‌تر برای دکمه‌ها */
    --accent: #f59e0b;        /* زرد/نارنجی برای جلب توجه */
    --dark: #0f172a;          /* رنگ متن اصلی */
    --gray: #64748b;          /* رنگ متن فرعی */
    --light-bg: #f1f5f9;      /* پس‌زمینه سایت */
    --white: #ffffff;
    
    /* Font */
    --font-main: 'Vazirmatn', sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1300px;
    --border-radius: 12px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Top Bar --- */
.top-bar {
    background-color: var(--dark);
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a {
    margin-right: 20px;
    color: #cbd5e1;
    font-weight: 300;
}

.top-links a:hover {
    color: var(--white);
}

/* --- Header --- */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.logo h1 span {
    color: var(--accent);
}

.tagline {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 4px;
}

.nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    font-weight: 500;
    color: var(--dark);
    font-size: 1rem;
    position: relative;
}

.nav a:not(.btn-highlight):hover {
    color: var(--primary);
}

/* دکمه ویژه کاشان روان در منو */
.btn-highlight {
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

.btn-highlight:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.mobile-menu-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Layout Grid --- */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px; /* ستون اصلی و سایدبار */
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 60px;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary), #1e293b);
    color: var(--white);
    border-radius: 20px;
    padding: 4rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.category-badge {
    background: var(--accent);
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.hero p {
    color: #e2e8f0;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 25px;
    border-radius: 50px;
    transition: var(--transition);
}

.read-more-btn:hover {
    background: var(--white);
    color: var(--primary);
}

/* --- News Grid --- */
.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.section-title h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    white-space: nowrap;
}

.section-title .line {
    width: 100%;
    height: 2px;
    background: #e2e8f0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #f1f5f9;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .card-image img {
    transform: scale(1.05);
}

.card-image .category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--white);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 1.5rem;
}

.meta {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
}

.meta i {
    margin-left: 5px;
}

.news-card h3 a {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    display: block;
    margin-bottom: 10px;
}

.news-card h3 a:hover {
    color: var(--primary);
}

.news-card p {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.6;
}

/* --- Sidebar --- */
.sidebar {
    position: sticky;
    top: 100px; /* برای جلوگیری از رفتن زیر هدر */
    height: fit-content;
}

.widget {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
}

.widget-header h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
    border-right: 4px solid var(--accent);
    padding-right: 10px;
}

/* Kashan Widget Style */
.widget.kashan-pro {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
}

.check-list li {
    position: relative;
    padding-right: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 500;
}

.check-list li::before {
    content: '✔';
    position: absolute;
    right: 0;
    color: var(--primary);
    font-weight: bold;
}

.btn-full {
    display: block;
    text-align: center;
    background: var(--primary);
    color: var(--white);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 700;
}

.btn-full:hover {
    background: var(--primary-light);
}

/* Categories List */
.cat-list li {
    border-bottom: 1px solid #f1f5f9;
}

.cat-list li:last-child {
    border-bottom: none;
}

.cat-list a {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 0.95rem;
    color: var(--gray);
}

.cat-list a:hover {
    color: var(--primary);
    padding-right: 5px;
}

.cat-list span {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Mini Posts */
.mini-post {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.mini-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mini-post a {
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.mini-post .date {
    font-size: 0.75rem;
    color: var(--gray);
}

/* --- Footer --- */
.footer {
    background: var(--dark);
    color: #cbd5e1;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-col h3 span {
    color: var(--accent);
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--accent);
    padding-right: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr; /* سایدبار پایین می‌رود */
    }
    
    .sidebar {
        position: relative;
        top: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none; /* منو در موبایل مخفی شود - نیاز به JS برای باز شدن دارد */
    }
    
    .mobile-menu-icon {
        display: block;
    }

    .hero {
        padding: 2rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        display: none;
    }
}