/*
Theme Name: Farzad
Author: Your Name
Description: قالب فرزاد — سبز-آبی، اسلایدر تمام‌عرض، گرید ۳ ستونی
Version: 2.3
Text Domain: farzad
*/

:root {
  --green: #1abc9c;
  --blue: #2980b9;
  --dark: #2c3e50;
  --text: #333;
  --light: #ecf0f1;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  color: var(--text);
  background: #f9f9f9;
  line-height: 1.8;
  direction: rtl;
  overflow-x: hidden;
  font-size: 16px;
}

a { color: var(--blue); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--green); }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ===== هدر ===== */
.site-header {
  background: linear-gradient(135deg, var(--green), var(--blue));
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.logo a, .logo img { color: #fff; font-size: 26px; font-weight: 700; }
.logo img { max-height: 60px; }
.main-menu ul { display: flex; list-style: none; gap: 25px; flex-wrap: wrap; }
.main-menu a {
  color: #fff;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background 0.3s;
  display: inline-block;
}
.main-menu a:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ===== متن سفید کنار منو ===== */
.header-text {
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.25);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ===== اسلایدر ===== */
.slider {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  margin: 0;
}
.slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
.slider-slide.active { opacity: 1; }
.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slider-caption {
  position: absolute;
  bottom: 0; right: 0; left: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
  padding: 60px 40px 40px;
  font-size: 28px;
  font-weight: 700;
}
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26,188,156,0.85);
  color: #fff;
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider-nav:hover { background: var(--blue); }
.slider-prev { right: 20px; }
.slider-next { left: 20px; }
.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.slider-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}
.slider-dots span.active { background: var(--green); }

/* ===== گرید مطالب ===== */
.site-main { padding: 40px 0; }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}
.post-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--light);
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card h2 {
  font-size: 17px;
  margin-bottom: 10px;
  line-height: 1.6;
  word-wrap: break-word;
}
.post-card h2 a { color: var(--dark); }
.post-card h2 a:hover { color: var(--green); }
.post-meta { font-size: 12px; color: #888; margin-bottom: 10px; }
.post-excerpt {
  font-size: 14px;
  color: #666;
  flex: 1;
  margin-bottom: 12px;
  word-wrap: break-word;
}
.read-more {
  display: inline-block;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  transition: opacity 0.3s;
  align-self: flex-start;
}
.read-more:hover { opacity: 0.85; color: #fff !important; }

/* ===== صفحه‌بندی ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--dark);
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.3s;
}
.pagination a:hover { background: var(--green); color: #fff; }
.pagination .current {
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #fff;
}

/* ===== تک‌نوشته ===== */
.single-content {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  margin: 40px 0;
}
.single-content h1 { font-size: 26px; margin-bottom: 15px; color: var(--dark); }
.single-content .post-meta { margin-bottom: 25px; font-size: 13px; }
.single-thumb { margin-bottom: 25px; border-radius: 10px; overflow: hidden; }
.single-thumb img { width: 100%; height: auto; }
.entry-content { word-wrap: break-word; }
.entry-content p { margin-bottom: 15px; }
.entry-content img { border-radius: 10px; margin: 15px 0; }

/* ===== فوتر ===== */
.site-footer {
  background: var(--dark);
  color: #bbb;
  padding: 40px 0 20px;
  margin-top: 40px;
}
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 25px;
}
.footer-widgets .widget-title,
.footer-widgets h3 {
  color: #fff;
  font-size: 16px;
  border-right: 4px solid var(--green);
  padding-right: 10px;
  margin-bottom: 15px;
}
.footer-widgets ul { list-style: none; }
.footer-widgets ul li { padding: 6px 0; font-size: 14px; }
.footer-widgets a { color: #bbb; }
.footer-widgets a:hover { color: var(--green); }
.footer-bottom {
  text-align: center;
  border-top: 1px solid #444;
  padding-top: 20px;
  font-size: 14px;
}

/* ========================================= */
/* ===== واکنش‌گرایی (Responsive) ===== */
/* ========================================= */

@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .footer-widgets { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .slider { height: 400px; }
  .slider-caption { font-size: 20px; padding: 40px 20px 25px; }
  .slider-nav { width: 42px; height: 42px; font-size: 22px; }
  .header-inner { flex-direction: column; gap: 12px; }
  .header-text { font-size: 13px; padding: 6px 12px; width: 100%; text-align: center; }
  .single-content { padding: 22px; }
  .single-content h1 { font-size: 22px; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .container { padding: 0 15px; }
  .logo a, .logo img { font-size: 22px; }
  .logo img { max-height: 45px; }
  .main-menu ul { gap: 4px; justify-content: center; }
  .main-menu a { padding: 6px 10px; font-size: 13px; }
  .slider { height: 260px; }
  .slider-caption { font-size: 15px; padding: 30px 15px 15px; }
  .slider-nav { width: 34px; height: 34px; font-size: 18px; }
  .slider-prev { right: 8px; }
  .slider-next { left: 8px; }
  .slider-dots span { width: 10px; height: 10px; }
  .posts-grid { grid-template-columns: 1fr; gap: 15px; }
  .post-card h2 { font-size: 15px; }
  .post-excerpt { font-size: 13px; }
  .footer-widgets { grid-template-columns: 1fr; gap: 15px; }
  .single-content { padding: 16px; margin: 20px 0; }
  .single-content h1 { font-size: 18px; }
  .pagination a, .pagination span { min-width: 36px; height: 36px; font-size: 13px; }
  .header-text { font-size: 12px; padding: 5px 10px; }
}

@media (max-width: 400px) {
  .slider { height: 200px; }
  .slider-caption { font-size: 13px; }
  .main-menu a { font-size: 12px; padding: 5px 7px; }
}