/* ======================================
   Achievements Page — Vertical Timeline
   Hero reuses .ht-hero from main.css ·
   Stats strip · Timeline with DB images
   RTL · No CTA
====================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Tajawal', sans-serif;
}

html { scroll-behavior: smooth; }

/* ===========================
   HERO — uses .ht-hero from main.css
   Only additions/overrides needed here
=========================== */

/* Wrapper that provides the page-edge-to-edge dark background */
.achievements-hero-wrap {
  background: #062141;
  padding: 90px 20px 0;       /* top clears fixed header; bottom 0 so .ht-hero sits flush */
}

/* inside the wrap we place the standard .ht-hero card */
.achievements-hero-wrap .ht-hero {
  margin-top: 0;              /* override main.css margin-top: 57px */
  margin-bottom: 0;
  border-radius: 0 0 24px 24px;
  box-shadow: none;
}

/* ===========================
   STATS STRIP — below hero
=========================== */
.stats-strip {
  background: #f7f9f8;
  border-bottom: 1px solid #e4edea;
  padding: 0;
}

.stats-strip-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  direction: rtl;
}

.stat-cell {
  padding: 26px 32px;
  text-align: center;
  border-left: 1px solid #e4edea;
  transition: background 0.2s;
}

.stat-cell:last-child { border-left: none; }
.stat-cell:hover { background: #eef5f3; }

.stat-cell-icon {
  width: 46px;
  height: 46px;
  background: #e1f5ee;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  transition: transform 0.25s ease;
}

.stat-cell:hover .stat-cell-icon { transform: scale(1.08) rotate(4deg); }
.stat-cell-icon i { font-size: 21px; color: #085041; }

.stat-cell-number {
  font-size: 34px;
  font-weight: 800;
  color: #062141;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-cell-label {
  font-size: 13px;
  color: #7a9898;
  font-weight: 600;
}

/* ===========================
   TIMELINE SECTION
=========================== */
.timeline-section {
  background: #fff;
  padding: 60px 40px 80px;
}

.timeline-container {
  max-width: 820px;
  margin: 0 auto;
}

/* Section heading */
.timeline-heading {
  direction: rtl;
  text-align: right;
  margin-bottom: 44px;
  position: relative;
  padding-right: 18px;
}

.timeline-heading::before {
  content: '';
  position: absolute;
  right: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: linear-gradient(180deg, #062141, #0a4d4d);
  border-radius: 2px;
}

.timeline-heading h2 {
  font-size: 26px;
  font-weight: 800;
  color: #062141;
  margin-bottom: 5px;
}

.timeline-heading p {
  font-size: 14px;
  color: #7a9898;
  line-height: 1.65;
}

/* ===========================
   TIMELINE TRACK
=========================== */
.timeline-track {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* vertical connecting line — centred on the 46px dot */
.timeline-track::before {
  content: '';
  position: absolute;
  right: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #e4edea 0%, #b0c8c7 50%, #e4edea 100%);
  z-index: 0;
}

/* ===========================
   SINGLE TIMELINE ENTRY
=========================== */
.tl-entry {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding-bottom: 28px;
  position: relative;
  direction: rtl;
}

.tl-entry:last-child { padding-bottom: 0; }

/* dot column */
.tl-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.tl-dot {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #e4edea;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tl-entry:hover .tl-dot {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px #a8cec8;
}

.tl-dot i { font-size: 19px; color: #fff; }

.tl-dot.partnership   { background: #10b981; }
.tl-dot.conference    { background: #3b82f6; }
.tl-dot.grant         { background: #f59e0b; }
.tl-dot.event         { background: #8b5cf6; }
.tl-dot.workshop      { background: #0a4d4d; }
.tl-dot.participation { background: #ec4899; }

/* ===========================
   ACHIEVEMENT CARD
=========================== */
.ach-card {
  background: #fff;
  border: 1.5px solid #e4edea;
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  animation: cardIn 0.5s ease both;
}

.tl-entry:hover .ach-card {
  border-color: #a8cec8;
  box-shadow: 0 8px 28px rgba(6,33,65,0.1);
  transform: translateY(-3px);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tl-entry:nth-child(1)   .ach-card { animation-delay: 0.05s; }
.tl-entry:nth-child(2)   .ach-card { animation-delay: 0.12s; }
.tl-entry:nth-child(3)   .ach-card { animation-delay: 0.19s; }
.tl-entry:nth-child(4)   .ach-card { animation-delay: 0.26s; }
.tl-entry:nth-child(5)   .ach-card { animation-delay: 0.33s; }
.tl-entry:nth-child(6)   .ach-card { animation-delay: 0.40s; }
.tl-entry:nth-child(n+7) .ach-card { animation-delay: 0.44s; }

/* ─────────────────────────────
   IMAGE
   object-fit: cover — fills the
   frame cleanly, no empty space.
   Height is proportional so the
   card stays compact on screen.
───────────────────────────── */
.ach-card-img {
  width: 100%;
  height: 200px;          /* compact — photo fills it, text below */
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid #e4edea;
  background: #e8f0ee;
}

.ach-card-img img {
  width: 100%;
  height: 110%;
  object-fit: cover;      /* fills frame — no white gaps */
  object-position: center top; /* keeps faces/logos at top of frame */
  display: block;
  transition: transform 0.45s ease;
}

.tl-entry:hover .ach-card-img img {
  transform: scale(1.05);
}

/* ─────────────────────────────
   CARD BODY
───────────────────────────── */
.ach-card-body {
  padding: 18px 20px 20px;
  direction: rtl;
}

.ach-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cat-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  color: #fff;
  flex-shrink: 0;
}

.cat-badge.partnership   { background: #10b981; }
.cat-badge.conference    { background: #3b82f6; }
.cat-badge.grant         { background: #f59e0b; color: #92400e; }
.cat-badge.event         { background: #8b5cf6; }
.cat-badge.workshop      { background: #0a4d4d; }
.cat-badge.participation { background: #ec4899; }

.ach-date {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #8aabaa;
  font-weight: 600;
}

.ach-date i { font-size: 12px; color: #0a4d4d; }

.ach-card-body h3 {
  font-size: 17px;
  font-weight: 800;
  color: #062141;
  line-height: 1.45;
  margin-bottom: 8px;
  text-align: right;
  direction: rtl;
  transition: color 0.2s;
}

.tl-entry:hover .ach-card-body h3 { color: #0a4d4d; }

.ach-card-body p {
  font-size: 13px;
  color: #5a7070;
  line-height: 1.8;
  text-align: right;
  direction: rtl;
}

/* ===========================
   NO ACHIEVEMENTS
=========================== */
.no-achievements {
  text-align: center;
  padding: 80px 20px;
  direction: rtl;
}

.no-achievements i {
  font-size: 52px;
  color: #c5d9d6;
  margin-bottom: 16px;
  display: block;
}

.no-achievements p {
  font-size: 16px;
  font-weight: 600;
  color: #7a9898;
}

/* ===========================
   RESPONSIVE — 900px
=========================== */
@media (max-width: 900px) {
  .achievements-hero-wrap { padding-top: 80px; }
  .timeline-section { padding: 44px 24px 60px; }
  .ach-card-img { height: 180px; }
  .ach-card-body h3 { font-size: 16px; }
}

/* ===========================
   RESPONSIVE — 640px (mobile)
=========================== */
@media (max-width: 640px) {
  .achievements-hero-wrap { padding-top: 70px; }

  /* stats strip: stay 3-col but tighter */
  .stat-cell { padding: 16px 8px; }
  .stat-cell-icon { width: 36px; height: 36px; border-radius: 9px; margin-bottom: 7px; }
  .stat-cell-icon i { font-size: 16px; }
  .stat-cell-number { font-size: 22px; }
  .stat-cell-label { font-size: 10px; }

  .timeline-section { padding: 32px 12px 50px; }
  .timeline-heading { margin-bottom: 28px; }
  .timeline-heading h2 { font-size: 20px; }
  .timeline-heading p { font-size: 12px; }

  /* shift line to match smaller dot */
  .timeline-track::before { right: 17px; }

  .tl-entry { grid-template-columns: 36px 1fr; gap: 10px; padding-bottom: 20px; }

  .tl-dot { width: 36px; height: 36px; border-radius: 9px; border-width: 2px; }
  .tl-dot i { font-size: 15px; }

  /* image stays generous enough to see the photo clearly */
  .ach-card-img { height: 170px; }

  .ach-card-body { padding: 12px 14px 14px; }
  .ach-card-top { margin-bottom: 8px; gap: 5px; }
  .cat-badge { font-size: 10px; padding: 3px 9px; }
  .ach-date { font-size: 11px; }
  .ach-card-body h3 { font-size: 14px; margin-bottom: 6px; }
  .ach-card-body p { font-size: 12px; line-height: 1.7; }
}

/* ===========================
   RESPONSIVE — 400px
=========================== */
@media (max-width: 400px) {
  /* stats stack vertically */
  .stats-strip-inner { grid-template-columns: 1fr; }
  .stat-cell { border-left: none; border-bottom: 1px solid #e4edea; padding: 14px 16px; }
  .stat-cell:last-child { border-bottom: none; }

  .tl-entry { grid-template-columns: 32px 1fr; gap: 8px; }
  .timeline-track::before { right: 15px; }
  .tl-dot { width: 32px; height: 32px; border-radius: 8px; }
  .tl-dot i { font-size: 13px; }

  .ach-card-img { height: 150px; }
  .ach-card-body { padding: 10px 12px 12px; }
  .ach-card-body h3 { font-size: 13px; }
  .ach-card-body p { font-size: 11px; }
}