/* =========================================================
   مجالات الجائزة — editorial fields section
   ========================================================= */

.jz-fields.jz-section {
  position: relative;
  overflow: hidden;
  background: #f7faf8 !important;
  padding: 96px 0 88px !important;
}

.jz-fields__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(0, 220, 128, 0.1), transparent 55%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(0, 102, 78, 0.08), transparent 50%),
    linear-gradient(180deg, #f7faf8 0%, #eef5f1 48%, #f7faf8 100%);
}

.jz-fields__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(0, 102, 78, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 78, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.jz-fields .container {
  position: relative;
  z-index: 1;
}

.jz-fields__head {
  max-width: 640px;
  margin: 0 auto 56px !important;
}

.jz-fields__head h2 {
  font-size: clamp(30px, 4.2vw, 44px) !important;
  font-weight: 800 !important;
  color: var(--jz-ink, #0f1f1c) !important;
  margin: 0 0 14px !important;
  letter-spacing: -0.02em;
}

.jz-fields__lead {
  margin: 0 auto;
  max-width: 34em;
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--jz-muted, #5a6b66);
}

.jz-fields__list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* —— Field panel —— */
.jz-field-item {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.jz-field-item + .jz-field-item {
  padding-top: 0 !important;
  border-top: 0 !important;
}

.jz-field__panel {
  background: #fff;
  border: 1px solid rgba(0, 102, 78, 0.08);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(9, 28, 26, 0.02),
    0 22px 56px rgba(9, 28, 26, 0.07);
  transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jz-field__panel:hover {
  box-shadow:
    0 8px 16px rgba(9, 28, 26, 0.04),
    0 28px 64px rgba(0, 102, 78, 0.12);
  transform: translateY(-4px);
}

.jz-field__row {
  min-height: 0;
}

.jz-fields .jz-field,
section.jz-field,
.jz-field:nth-child(even),
.jz-field-item:nth-child(even) {
  background: transparent !important;
  padding: 0 !important;
}

/* —— Media —— */
.jz-field__media {
  position: relative;
  height: 100%;
  min-height: 320px;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
  background: #0b1a17;
}

.jz-field__media-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.jz-field__media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 220, 128, 0.18) 0%, transparent 42%),
    linear-gradient(to top, rgba(9, 28, 26, 0.45) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}

.jz-field__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px !important;
  max-height: none !important;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jz-field__panel:hover .jz-field__media img {
  transform: scale(1.05);
}

.jz-field__index {
  position: absolute;
  bottom: 20px;
  right: 22px;
  z-index: 2;
  font-family: var(--jz-font, "Tajawal", sans-serif);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.16);
  pointer-events: none;
  user-select: none;
}

.jz-field-item--reverse .jz-field__index {
  right: auto;
  left: 22px;
}

/* —— Content —— */
.jz-field__content {
  padding: clamp(28px, 4vw, 48px) clamp(24px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.jz-field__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #008a58;
}

.jz-field__label::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #4dff8f, #008a58);
}

.jz-field__title {
  margin: 0 0 14px !important;
  font-size: clamp(24px, 3vw, 32px) !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  color: var(--jz-ink, #0f1f1c) !important;
  letter-spacing: -0.01em;
}

.jz-field__text {
  margin: 0 0 28px !important;
  font-size: 16px;
  line-height: 1.9;
  color: var(--jz-muted, #5a6b66);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jz-field__cta {
  margin-top: 4px;
}

/* —— Branches (interactive rows) —— */
.jz-field__branches {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jz-branch {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f4f8f6;
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.jz-branch:hover {
  background: #fff;
  border-color: rgba(0, 138, 88, 0.18);
  transform: translateX(-4px);
}

.jz-branch__thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: #e8f2ed;
  flex-shrink: 0;
}

.jz-branch__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jz-branch__thumb--empty {
  background:
    linear-gradient(135deg, rgba(0, 220, 128, 0.2), rgba(0, 102, 78, 0.15));
}

.jz-branch__body h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--jz-ink, #0f1f1c);
  line-height: 1.4;
}

.jz-branch__body p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--jz-muted, #5a6b66);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jz-branch .jz-link {
  font-size: 14px;
  font-weight: 700;
  color: #008a58 !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.jz-branch .jz-link__arrow {
  display: inline-block;
  transition: transform 0.25s ease;
  font-size: 15px;
  line-height: 1;
}

.jz-branch:hover .jz-link__arrow {
  transform: translateX(-4px);
}

.jz-branch .jz-link--muted {
  color: #8a9a94 !important;
  font-weight: 600;
}

/* —— Motion entrance —— */
@keyframes jzFieldRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.jz-field-item {
  animation: jzFieldRise 0.7s ease both;
}

.jz-field-item:nth-child(2) { animation-delay: 0.12s; }
.jz-field-item:nth-child(3) { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .jz-field-item,
  .jz-field__panel,
  .jz-field__media img,
  .jz-branch {
    animation: none !important;
    transition: none !important;
  }

  .jz-field__panel:hover,
  .jz-field__panel:hover .jz-field__media img,
  .jz-branch:hover {
    transform: none !important;
  }
}

/* —— Responsive —— */
@media (max-width: 991.98px) {
  .jz-fields.jz-section {
    padding: 72px 0 64px !important;
  }

  .jz-fields__list {
    gap: 28px;
  }

  .jz-field__panel {
    border-radius: 22px;
  }

  .jz-field__media {
    min-height: 240px;
  }

  .jz-field__media img {
    min-height: 240px !important;
  }

  .jz-field__content {
    padding: 28px 22px 32px;
  }

  .jz-field__index {
    font-size: 56px;
    bottom: 14px;
    right: 16px;
  }

  .jz-field-item--reverse .jz-field__index {
    left: 16px;
  }
}

@media (max-width: 575.98px) {
  .jz-fields__head {
    margin-bottom: 36px !important;
  }

  .jz-field__media {
    min-height: 200px;
  }

  .jz-field__media img {
    min-height: 200px !important;
  }

  .jz-branch {
    grid-template-columns: 56px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .jz-branch__thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  .jz-field__text {
    -webkit-line-clamp: 6;
  }
}
