:root {
    --primary: #762000;
    --background: #fdfdfd;
    --background2: #f9f6f2;
    --text: #333;
    --border: #e0e0e0;
}

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

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Nav */
.main-header {
    background: #fff;
    border-block-end: 1px solid var(--border);
    padding: 1rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}
.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 1rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-block-end: 3rem;
    padding: 6rem 1rem;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/banner.png');
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 400;
}
.hero-title strong {
    font-size: 4rem;
    display: block;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Projects List */
.projects-section {
    margin-block: 3rem;
    text-align: center;
}
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-block-start: 1rem;
}
.project-card {
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    width: 300px;
    gap: 10px;    
    background: var(--background2);
}
.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.project-card img{
    display:block;
    width: 70px;
    border-radius: 10px;
}

/* Latest Posts Grid */
.latest-posts-section{
    margin-block: 5rem;
}
.latest-posts-section h2{
    text-align: center;
    margin-top: 2rem;    
}
.posts-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-block-start: 1rem;
}

.post-card {
    width: 350px;
    background: var(--background2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}
.post-card img {
    height: 200px;
    border: 1px solid var(--border);
    border-top-right-radius: 8px;
    border-top-left-radius: 8px;
    object-fit: cover;
    margin: 10px;
}
.post-content {
    padding: 1rem;
}
.post-type {
    text-align: start;
    color: #fff;
    background-color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-block-end: 0.5rem;
    padding: 5px;
    border-radius: 5px;
    width: fit-content;
}
.post-title {
    font-size: 1.5rem;
    margin-block-end: 0.5rem;
    color: var(--primary)
}
.post-date {
    font-size: 0.85rem;
    color: #777;
}

/* Form Styles */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.form-group {
    margin-block-end: 1.5rem;
}
.form-group label {
    display: block;
    margin-block-end: 0.5rem;
    font-weight: 500;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
}
button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover {
    background: #1e3c66;
}

.btn-delete {
    color: #cc0000;
    text-decoration: none;
    font-weight: 500;
}
.btn-delete:hover {
    text-decoration: underline;
}

/* Footer */
.main-footer {
    background: #fff;
    border-block-start: 1px solid var(--border);
    text-align: center;
    padding: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-block: 3rem;
}
.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}
.pagination a:hover {
    background: #f0f0f0;
    border-color: #ccc;
}
.pagination .active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.pagination .disabled {
    color: #ccc;
    pointer-events: none;
}

.section-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
    font-size: 2rem;
}
.section-link:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
}