/* ============================================================
   Challenge cards for the track pages (health / agriculture /
   service / sustainability / logistics …).
   block6.png = glowing frame, white logo top, dark body,
   gradient border wrapping the whole card. Shared to keep every
   track page identical. Include AFTER the page's own <style>.
   ============================================================ */

/* ===== track hero (was removed from styles.css → rebuilt here, matching logistics) ===== */
body.track-page main{ padding-top: 88px; }

.track-hero{ padding: 54px 0 68px; }
.track-hero__grid{
  display:grid;
  grid-template-columns: 440px 1fr;
  gap: 64px;
  align-items:center;
}
.track-hero__media{
  position:relative;
  width:100%;
  max-width:440px;
  aspect-ratio:3 / 4;
  margin:0 auto;
  background:url("../assets/block4.png") center/contain no-repeat;
  display:flex;
  align-items:center;
  justify-content:center;
}
.track-hero__media img{
  width:82%;
  height:auto;
  object-fit:contain;
  animation: trackFloat 5.4s ease-in-out infinite;
}
@keyframes trackFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-10px); } }
.track-hero__copy{ text-align:right; }
.track-hero__title{
  margin:0 0 22px;
  font-weight:800;
  font-size:clamp(36px, 4.8vw, 64px);
  line-height:1.32;
  text-align:right;
  color:#fff;
}
.track-hero__title span{ display:block; color:#37e393; }
.track-hero__lead{
  margin:0;
  color:#e2eaff;
  font-size:clamp(15px, 1.5vw, 19px);
  line-height:2.05;
  text-align:right;
  max-width:560px;
}
@media (max-width: 900px){
  .track-hero__grid{ grid-template-columns:1fr; gap:32px; }
  .track-hero__media{ order:-1; max-width:300px; }
  .track-hero__title, .track-hero__lead{ text-align:center; }
  .track-hero__lead{ margin-inline:auto; }
}

/* ===== challenges section title (identical to logistics px-ch) ===== */
.challenges-section{ padding: 16px 0 90px; }
.px-ch__title-wrap{
  display:flex; align-items:center; justify-content:center;
  gap:24px; margin:0 0 10px; padding:0 10px; width:100%; box-sizing:border-box;
}
.px-ch__title-wrap::before,
.px-ch__title-wrap::after{
  content:""; flex:0 0 auto; width:160px; height:1.5px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.26), transparent);
}
.px-ch__title{
  text-align:center; color:#fff;
  font-size:clamp(42px, 5.8vw, 76px); font-weight:400; letter-spacing:0;
  padding:12px; margin:0; white-space:nowrap; display:inline-block; line-height:1.1;
}
.px-ch__sub{
  text-align:center; color:#fff;
  font-size:clamp(14px, 1.7vw, 19px); margin:0 0 40px;
}
@media (max-width:900px){
  .px-ch__title-wrap{ gap:14px; padding:0; }
  .px-ch__title-wrap::before,
  .px-ch__title-wrap::after{ width:80px; }
  .px-ch__title{ font-size:clamp(28px, 7vw, 44px); padding:6px 8px; }
}
@media (max-width:520px){
  .px-ch__title-wrap{ gap:8px; }
  .px-ch__title-wrap::before,
  .px-ch__title-wrap::after{ display:none; }
}

.challenges-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 300px));
  justify-content:center;
  gap:24px;
  max-width:1320px;
  margin:40px auto 0;
  padding-inline:16px;
  box-sizing:border-box;
}

/* ---- card ---- */
.challenge-card{
  position:relative;
  cursor:pointer;
  transition:transform .35s ease;
  /* block6.png glow shows only around the DARK body (sides + bottom) */
  background:url("../assets/block6.png") center/100% 100% no-repeat;
  padding:6px 6px 8px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  border-radius:22px;
}
.challenge-card:hover{ transform:translateY(-6px); }

/* ---- white logo top ---- : bleeds over block6 (top + sides) so there is NO frame around the white */
.challenge-logo{
  flex:0 0 auto;
  height:130px;
  margin:-6px -6px 14px;
  background:#ffffff;
  border-radius:22px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px 20px;
  box-sizing:border-box;
}
.challenge-logo img{
  max-height:92px;
  max-width:88%;
  width:auto;
  height:auto;
  object-fit:contain;
}

/* ---- dark body ---- */
.challenge-body{
  position:relative;
  flex:1 1 auto;
  /* deep navy with a soft green (left) + blue (right) glow rising from the bottom */
  background:
    radial-gradient(95% 65% at 18% 100%, rgba(55,227,147,.20), transparent 72%),
    radial-gradient(95% 65% at 100% 100%, rgba(77,150,255,.14), transparent 72%),
    linear-gradient(180deg, #0b1a3d 0%, #081228 58%, #050d20 100%);
  border-radius:16px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:20px;
  padding:22px 18px 26px;
  text-align:center;
  box-sizing:border-box;
}
/* green glowing line at the bottom */
.challenge-body::after{
  content:"";
  position:absolute;
  left:10%; right:10%; bottom:0;
  height:2.4px;
  background:linear-gradient(90deg, transparent, #37e393 25%, #37e393 75%, transparent);
  box-shadow:0 0 12px rgba(55,227,147,.9), 0 0 26px rgba(55,227,147,.5);
  pointer-events:none;
}

.challenge-title{
  margin:0;
  color:#dfe7ff;
  font-size:17.5px;
  font-weight:700;
  line-height:1.55;
  letter-spacing:.15px;
  min-height:64px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:center;
}
.challenge-title span{ display:block; }

/* registration status pill */
.challenge-status-label-wrap{ display:flex; justify-content:center; }
.challenge-status-label{
  display:inline-block;
  padding:6px 18px;
  border-radius:999px;
  font-size:13.5px;
  font-weight:800;
  background:rgba(250,204,21,.14);
  color:#facc15;
  border:1px solid rgba(250,204,21,.4);
}

/* discover button */
.btn-challenge{
  margin-top:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 34px;
  border-radius:999px;
  background:transparent;
  border:1.5px solid #37e393;
  color:#37e393;
  font-weight:800;
  font-size:16px;
  white-space:nowrap;
  cursor:pointer;
  font-family:inherit;
  transition:.25s;
}
.btn-challenge:hover{
  background:rgba(55,227,147,.12);
  color:#fff;
  border-color:#5af0aa;
  box-shadow:0 0 20px rgba(55,227,147,.35);
}
.challenge-card.active .btn-challenge,
.btn-challenge.active{
  background:linear-gradient(90deg,#37e393,#2bd18a);
  color:#04231a;
  border-color:#37e393;
}

/* ============================================================
   Challenge details panel (opens on "اكتشف التحدي") — styled to
   match the logistics px-details look. Hidden until .show.
   ============================================================ */
.challenge-details-wrapper{ display:none; }
.challenge-details-wrapper.show{ display:block; }
.challenge-details-expanded{
  margin-top:44px;
  border-radius:20px;
  background:#051235;
  border:1px solid rgba(55,227,147,.35);
  overflow:hidden;
  box-shadow:0 20px 50px rgba(0,0,0,.45);
  animation:detIn .45s ease-out;
}
@keyframes detIn{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:none; } }

.progress-bar-container{ height:4px; background:rgba(255,255,255,.06); }
.progress-bar{ height:100%; width:100%; background:linear-gradient(90deg,#37e393,#4d96ff); }

.challenge-header{
  display:flex; gap:24px; align-items:center;
  padding:26px 30px;
  border-bottom:1px solid rgba(120,150,210,.14);
  background:linear-gradient(90deg, rgba(55,227,147,.08), rgba(43,127,255,.06));
}
.challenge-header-logo{
  width:120px; height:92px; flex:none;
  background:#fff; border-radius:14px;
  display:flex; align-items:center; justify-content:center; padding:12px;
  box-sizing:border-box;
}
.challenge-header-logo img{ max-width:100%; max-height:100%; object-fit:contain; }
.challenge-header-title{
  color:#fff; font-size:clamp(20px,2.5vw,28px);
  font-weight:800; line-height:1.5; flex:1; margin:0; text-align:right;
}

.details-content{ padding:30px 32px 36px; }
.details-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; }
@media (max-width:960px){
  .details-grid{ grid-template-columns:1fr; }
  .challenge-header{ flex-wrap:wrap; }
}
.column-header{ display:flex; align-items:center; gap:10px; margin:0 0 14px; }
.column-icon{ display:none; }
.column-title{
  color:#37e393; font-size:17px; font-weight:800;
  margin:0; display:flex; align-items:center; gap:10px;
}
.column-title i{ color:#4d96ff; }
.column-content p,
.overview-text,
.challenge-description{
  color:#c9d4ee; line-height:2; font-size:15px;
  text-align:justify; text-align-last:right; margin:0 0 10px;
}
.feature-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:12px; }
.feature-list li{
  color:#c9d4ee; line-height:1.85; font-size:15px;
  display:flex; align-items:flex-start; gap:12px;
}
/* each item carries its own meaningful icon (camera, chart, lightbulb, …) —
   one icon per line, not a generic bullet stacked on top of it */
.feature-list li > i{
  color:#37e393; font-size:15px; margin-top:4px;
  flex:0 0 auto; width:18px; text-align:center;
}

/* "share/participate in challenge" button at the end of the details panel */
.details-actions{ display:flex; justify-content:center; margin:8px 24px 0; padding:20px 0 30px; border-top:1px solid rgba(255,255,255,.08); }
.details-share-btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:14px 42px; border-radius:999px;
  background:linear-gradient(90deg, #36d98a, #54e89c);
  color:#04231a; font-weight:800; font-size:16px; text-decoration:none; white-space:nowrap;
  box-shadow:0 10px 30px rgba(54,217,138,.4); transition:transform .25s, box-shadow .25s;
}
.details-share-btn:hover{ transform:translateY(-2px); box-shadow:0 14px 36px rgba(54,217,138,.55); color:#04231a; }
