@font-face {
  font-family: 'IranSans';
  src: url('fonts/iransans.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}


/* Apply font globally */
body {
    font-family: 'IranSans', sans-serif;
    background-color: #ffffff;
    background-image: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    background-size: cover;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    direction: rtl;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.logo img {
    max-width: 150px;
    height: auto;
}

.menu ul {
    list-style: none;
    margin: 15px 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.menu li {
    margin-right: 20px;
}

.menu a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
}

.menu a:hover {
    color: #4CAF50;
}

.category-title {
    text-align: center;
    padding: 20px 0;
    font-size: 28px;
    color: #333;
    position: relative;
    margin-bottom: 20px;
}

.category-title::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, #4CAF50, #388E3C);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.posts-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.post {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.post:hover {
    transform: scale(1.05);
}

.post img {
    width: 300px;
    height: 300px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.post-description {
    position: absolute;
    bottom: -100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    font-size: 14px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    transition: bottom 0.3s ease;
}

.post:hover .post-description {
    bottom: 0;
}

.after-posts-text p {
    font-size: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    padding: 20px 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.pagination-container {
    text-align: center;
    padding: 20px 0;
}

.pagination a, .pagination .current {
    display: inline-block;
    padding: 10px 15px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    margin: 0 5px;
}

.pagination a:hover, .pagination .current {
    background: #4CAF50;
    color: #fff;
}

.show-more-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(to right, #4CAF50, #388E3C);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    margin: 0 10px;
}

.show-more-btn:hover {
    transform: scale(1.1);
}

.footer {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    padding: 40px 20px;
    color: #333;
    border-top: 4px solid #4CAF50;
    margin-top: 50px;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin: 20px;
}

.footer-section h3 {
    font-size: 22px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #dee2e6;
}

.post-single img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.post-single p {
    font-size: 16px;
    line-height: 1.8;
}

.btn {
    padding: 10px 20px;
    border-radius: 20px;
}

.btn-primary {
    background: #4CAF50;
    border: none;
}

.btn-primary:hover {
    background: #388E3C;
}

.btn-warning {
    background: #FFC107;
    border: none;
}

.btn-danger {
    background: #DC3545;
    border: none;
}

@media (max-width: 1024px) {
    .posts-container { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .posts-container { grid-template-columns: repeat(2, 1fr); }
    .menu ul { flex-direction: column; }
    .menu li { margin: 10px 0; }
}

@media (max-width: 480px) {
    .posts-container { grid-template-columns: 1fr; }
    .post img { height: 250px; }
}