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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1; /* پر کردن فضای وسط */
}

/* خط افقی */
.box-outline {
  position: relative;
  padding: 0;
  display: flex;
  justify-content: flex-start; /* در RTL: باکس سمت راست */
}

.box-outline::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: 44px; /* فاصله دقیق از باکس */
  left: 0; /* خط تا انتهای چپ بره */
  height: 2px;
  background: #1f2328;
  z-index: -2;
}

/* خود باکس */
.box {
  position: relative;
  margin-bottom: -2px;
  padding: 0.65rem 1.3rem;
  background: #1f2328;
  clip-path: polygon(
    0 14px,
    0 100%,
    calc(100% - 14px) 100%,
    100% calc(100% - 14px),
    100% 0,
    14px 0
  );
}

/* مرز داخلی */
.box::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: #1f2328;
  clip-path: inherit;
  z-index: -1;
}

/* پس‌زمینه */
.box::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #fff;
  clip-path: inherit;
  z-index: -1;
}

.box h3 {
  font-weight: 700;
}

@media (max-width: 576px) {
  .box {
    padding: 0.5rem 1rem;
    clip-path: polygon(
      0 10px,
      0 100%,
      calc(100% - 10px) 100%,
      100% calc(100% - 10px),
      100% 0,
      10px 0
    );
  }

  .box h3 {
    font-size: 1.05rem;
  }
}

.farm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch; /* همه سلول‌ها هم‌ارتفاع */
}

/* آیتم عمومی */
.farm-item {
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* عکس‌ها */
.farm-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* متن‌ها */
.farm-text {
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.8;
  border-radius: 8px;
  text-align: right;
}

/* متن اصلی */
.farm-text.primary {
  background: #2f6151;
  color: #fff;
}

.farm-text.primary h5 {
  font-weight: 700;
  margin-bottom: 1rem;
}

/* متن کوتاه */
.farm-text.secondary {
  background: #f2f2f2;
  color: #111;
  font-weight: 600;
}

/* ریسپانسیو */
@media (max-width: 992px) {
  .farm-grid {
    grid-template-columns: 1fr;
  }

  .farm-text {
    text-align: center; /* در تبلت و موبایل همه متن‌ها وسط */
  }
}

.article-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.article-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-body {
  padding: 1rem;
}

.article-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2f6151;
  margin-bottom: 0.5rem;
}

.article-text {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.7;
}

.article-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #eee;
  text-align: left;
}

.testimonial-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.testimonial-icon {
  font-size: 2.5rem;
  color: #2f6151;
  margin-bottom: 1rem;
  line-height: 1;
}

.testimonial-text {
  font-size: 1rem;
  color: #333;
  line-height: 1.8;
  flex-grow: 1;
}

.testimonial-footer {
  border-top: 1px solid #eee;
  padding-top: 0.75rem;
  margin-top: 1rem;
}

.testimonial-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2f6151;
}

/* Hover effect */
.footer-link:hover {
  color: #adb5bd !important; /* خاکستری روشن در هاور */
  transition: color 0.2s ease-in-out;
}
