.rae-grid,
.rae-single,
.rae-template-wrap {
  direction: rtl;
  font-family: inherit;
}

.rae-grid {
  display: grid;
  gap: 18px;
}
.rae-cols-1 { grid-template-columns: 1fr; }
.rae-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rae-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rae-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rae-card {
  background: #edf7f5;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.rae-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.rae-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.rae-badge-due,
.rae-badge-expired {
  background: #ffe6e6;
  color: #ef625f;
}
.rae-badge-updated,
.rae-badge-no_due {
  background: #e1f3f0;
  color: #2e9da0;
}
.rae-card-date,
.rae-reference,
.rae-meta-line,
.rae-pill,
.rae-single-breadcrumb {
  color: #2e9da0;
}
.rae-card-date {
  font-size: 14px;
  font-weight: 700;
}
.rae-reference {
  font-size: 14px;
  text-align: center;
  margin-bottom: 16px;
}
.rae-title {
  font-size: 24px;
  line-height: 1.6;
  margin: 0 0 12px;
  text-align: center;
}
.rae-title a {
  color: #1c1c1c;
  text-decoration: none;
}
.rae-excerpt {
  color: #222;
  line-height: 1.9;
  text-align: center;
  margin-bottom: 16px;
}
.rae-meta-stack {
  margin-top: auto;
  color: #3b3b3b;
}
.rae-meta-line {
  font-size: 14px;
  margin-bottom: 6px;
  text-align: center;
}
.rae-card-footer {
  margin-top: 18px;
  text-align: left;
}
.rae-view-btn,
.rae-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  color: #2e9da0;
  text-decoration: none;
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 700;
  transition: .2s ease;
}
.rae-view-btn:hover,
.rae-download-btn:hover {
  transform: translateY(-1px);
}

.rae-template-wrap {
  padding: 24px 16px;
}
.rae-template-inner,
.rae-single {
  max-width: 1100px;
  margin: 0 auto;
}
.rae-single-header {
  background: linear-gradient(180deg, #dff4ef 0%, #eefaf7 100%);
  border-radius: 0 0 32px 32px;
  padding: 28px 20px 34px;
  margin-bottom: 24px;
  text-align: center;
}
.rae-single-title {
  font-size: 42px;
  line-height: 1.4;
  margin: 8px 0 16px;
  color: #1b1b1b;
}
.rae-pill-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.rae-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(132, 209, 202, .15);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
}
.rae-pill-status {
  background: #ffe6e6;
  color: #ef625f;
}
.rae-countdown-box {
  display: inline-block;
  background: rgba(255,255,255,.75);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.rae-countdown-label {
  font-weight: 700;
  margin-bottom: 8px;
}
.rae-countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  direction: ltr;
}
.rae-time {
  min-width: 48px;
  background: #edf7f5;
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 22px;
  font-weight: 700;
  color: #1b1b1b;
}
.rae-sep {
  font-size: 22px;
  font-weight: 700;
}
.rae-single-content {
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  line-height: 2;
  font-size: 18px;
}
.rae-pdf-section {
  margin-top: 26px;
  background: #fff;
  border-radius: 24px;
  padding: 20px;
}
.rae-pdf-title {
  margin-top: 0;
  margin-bottom: 16px;
}
.rae-pdf-embed-wrap {
  border-radius: 18px;
  overflow: hidden;
  background: #f4f4f4;
}
.rae-pdf-iframe {
  width: 100%;
  min-height: 720px;
  border: 0;
}
.rae-pdf-actions {
  margin-top: 14px;
}
.rae-empty {
  padding: 24px;
  background: #edf7f5;
  border-radius: 18px;
}

@media (max-width: 1024px) {
  .rae-cols-4,
  .rae-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rae-single-title { font-size: 34px; }
}
@media (max-width: 767px) {
  .rae-cols-4,
  .rae-cols-3,
  .rae-cols-2 { grid-template-columns: 1fr; }
  .rae-single-title { font-size: 28px; }
  .rae-card { min-height: auto; }
  .rae-pdf-iframe { min-height: 480px; }
}
