/* ══════════════════════════════════════════════
   conferences.css
   وابسته به متغیرهای index.css
   ══════════════════════════════════════════════ */

/* ── هیرو ────────────────────────────────────── */
.page-hero {
  background: linear-gradient(155deg, var(--navy-dark) 0%, var(--navy-mid) 65%, #0f4a7a 100%);
  padding: 52px 0 44px;
  position: relative;
  overflow: hidden;
  direction: rtl;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -60px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255,215,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.page-hero-content {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
}

.page-title {
  color: var(--white);
  font-size: 2rem;
  font-weight: bold;
  margin: 0 0 14px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

.breadcrumb a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity 0.2s;
}

.breadcrumb a:hover { opacity: 0.8; }

.breadcrumb .sep {
  color: rgba(255,255,255,0.3);
  font-size: 1rem;
}

/* ── بخش لیست ────────────────────────────────── */
.list-section {
  padding: 56px 0 80px;
  background: var(--gray-100);
  min-height: 60vh;
  direction: rtl;
}

/* ── گرید کارت‌ها ─────────────────────────────── */
.conf-grid {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}

/* ── حالت لودینگ / خطا ───────────────────────── */
.loading-wrap {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--gray-500);
  font-size: 0.95rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0,33,71,0.12);
  border-top-color: var(--navy-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.state-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 0;
  color: var(--gray-500);
  font-size: 1rem;
}

/* ══════════════════════════════════════════════
   کارت همایش
   ══════════════════════════════════════════════ */
.conf-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.conf-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ── تصویر همایش  (1280×300 → نسبت ≈ 4.27:1) ── */
.conf-card-img {
  width: 100%;
  aspect-ratio: 1280 / 300;   /* نسبت دقیق تصویر آپلودی */
  overflow: hidden;
  background: #e8edf3;
  position: relative;
  flex-shrink: 0;
}

.conf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.conf-card:hover .conf-card-img img {
  transform: scale(1.05);
}

/* overlay گرادیان روی تصویر */
.conf-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,21,46,0.55) 100%);
  pointer-events: none;
}

/* ── بج وضعیت روی تصویر ──────────────────────── */
.conf-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

.badge-open     { background: rgba(28,143,80,0.88); }
.badge-closed   { background: rgba(180,60,40,0.88); }
.badge-inactive { background: rgba(100,100,100,0.85); }

/* ── بخش بالایی کارت (عنوان) ─────────────────── */
.conf-card-top {
  padding: 18px 20px 10px;
  border-bottom: 1px solid var(--gray-300);
}

.conf-card-top h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── بدنه کارت ───────────────────────────────── */
.conf-card-body {
  padding: 14px 20px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── تاریخ شروع همایش ───────────────────────── */
.conf-start-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: #555;
  background: #f0f4f9;
  border-radius: var(--radius);
  padding: 8px 12px;
  border: 1px solid #dce6f0;
}

.conf-start-date svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--navy-mid);
  opacity: 0.8;
}

.conf-start-date strong {
  color: var(--navy);
  font-weight: 700;
}

/* ── هزینه‌ها ─────────────────────────────────── */
.conf-fee {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fee-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 20px;
  background: #eef3f9;
  color: var(--navy-mid);
  font-weight: 600;
  border: 1px solid #dce6f0;
}

.fee-badge.free {
  background: #edf7f1;
  color: #1a7a48;
  border-color: #c2e8d2;
}

.fee-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ── پاورقی کارت ─────────────────────────────── */
.conf-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-300);
  background: var(--gray-200);
}

.btn-conf {
  display: block;
  width: 100%;
  text-align: center;
  padding: 11px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
}

.btn-conf:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,33,71,0.22);
}

/* ══════════════════════════════════════════════
   ریسپانسیو
   ══════════════════════════════════════════════ */

/* تبلت: ۲ کارت */
@media (max-width: 1024px) {
  .conf-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

/* موبایل: ۲ کارت کنار هم */
@media (max-width: 640px) {
  .list-section { padding: 36px 0 56px; }

  .conf-grid {
    width: 96%;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .conf-card-top { padding: 12px 12px 8px; }
  .conf-card-top h3 { font-size: 0.82rem; -webkit-line-clamp: 3; }

  .conf-card-body { padding: 10px 12px 8px; gap: 8px; }

  /* timeline فشرده‌تر */
  .conf-tl-label { font-size: 0.68rem; }
  .conf-tl-date  { font-size: 0.72rem; }
  .conf-tl-row   { padding: 5px 10px; }
  .conf-timeline-title { font-size: 0.72rem; padding: 6px 10px; }

  .fee-badge { font-size: 0.7rem; padding: 4px 9px; }

  .conf-card-footer { padding: 10px 12px; }
  .btn-conf { font-size: 0.82rem; padding: 9px; }

  .page-title { font-size: 1.4rem; }
}

/* موبایل خیلی کوچک: ۱ کارت */
@media (max-width: 380px) {
  .conf-grid { grid-template-columns: 1fr; }
}