/*
Theme Name: JNews - Child Theme
Version: 1.0.0
Theme URI: http://themeforest.net/?ref=jegtheme
Description: A basic starter child theme for customization purpose of JNews theme.
Author: Jegtheme
Author URI: http://themeforest.net/user/jegtheme?ref=jegtheme
Template: jnews
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ------------------------------------------------------------------------- *
 *  Theme customization starts here
/* ------------------------------------------------------------------------- */

/* ============================================================
   BEFELLO — COMPLETE CSS
   Includes:
   A. Single Opportunity Page
   B. Single Essay Page
   C. JNews Module 37 — Essay Cards
   D. JNews Module 37 — Opportunity Cards

   Structure:
    1.  Design tokens                       (:root)
    2.  Page layout
    3.  About section
    4.  Opportunity card – shell & ACF resets
    5.  Opportunity card – taxonomy & nationality tags
    6.  Opportunity card – apply / website buttons
    7.  Featured image
    8.  JNews category meta
    9.  Essay topic repeater               (carousel)
   10.  Eligibility & Requirements – card
   11.  Benefits & Outcomes – card
   12.  Universal accordion
   13.  Sticky buttons                     (mobile)
   14.  Responsive overrides
   15.  Accessibility
   16.  Print
   17.  Page-level overflow fix
   18.  Host Country field
   19.  Eligible Nationalities inline toggle
   20.  Field Icons
   21.  Single Essay page
   22.  Module 37 — Essay cards
   23.  Module 37 — Opportunity cards
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */

:root {
  --opp-color-primary:              #111;
  --opp-color-text:                 #333;
  --opp-color-bg:                   #fff;
  --opp-color-border:               rgba(17, 17, 17, 0.25);
  --opp-color-border-strong:        #111;
  --opp-color-divider:              #f0f0f0;
  --opp-color-accent-yellow:        #f6d96a;
  --opp-color-accent-yellow-hover:  #f4d04a;
  --opp-color-accent-blue:          #4a75c5;
  --opp-color-accent-blue-hover:    #3a5fa5;
  --opp-color-link:                 #111;
  --opp-color-link-hover:           #5b86d6;
  --opp-color-focus:                #5b86d6;
  --opp-spacing-xs:   8px;
  --opp-spacing-sm:   12px;
  --opp-spacing-md:   16px;
  --opp-spacing-lg:   24px;
  --opp-spacing-xl:   32px;
  --opp-spacing-2xl:  56px;
  --opp-font-size-sm:          13px;
  --opp-font-size-base:        16px;
  --opp-font-size-lg:          18px;
  --opp-font-weight-normal:    450;
  --opp-font-weight-semibold:  650;
  --opp-font-weight-bold:      900;
  --opp-line-height-tight:     1.2;
  --opp-line-height-normal:    1.6;
  --opp-line-height-relaxed:   1.8;
  --opp-border-width:       2px;
  --opp-border-radius-sm:   4px;
  --opp-border-radius-md:   6px;
  --opp-transition-fast:    0.15s ease;
  --opp-transition-normal:  0.2s ease;
  --opp-transition-slow:    0.3s ease;
  --opp-z-fixed:                1000;
  --opp-content-max-width:      1400px;
  --opp-text-max-width:         70ch;
  --opp-sticky-button-height:   90px;
  --opp-featured-max-height:    400px;
}


/* ============================================================
   2. PAGE LAYOUT
   ============================================================ */

.single-opportunity .befello-opp-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--opp-spacing-lg);
  margin: 0;
  padding: 0 var(--opp-spacing-md) var(--opp-sticky-button-height);
  scroll-padding-bottom: calc(var(--opp-sticky-button-height) + var(--opp-spacing-lg));
}

.single-opportunity .befello-opp-about { order: 2; }
.single-opportunity .befello-opp-card  { order: 1; }


/* ============================================================
   3. ABOUT SECTION
   ============================================================ */

.single-opportunity .befello-opp-about-title {
  margin: 0 0 var(--opp-spacing-lg);
  font-size: clamp(32px, 5vw, 46px);
  line-height: var(--opp-line-height-tight);
  font-weight: var(--opp-font-weight-bold);
  color: var(--opp-color-primary);
  letter-spacing: -0.02em;
}

.single-opportunity .befello-opp-about-body {
  font-size: clamp(var(--opp-font-size-base), 2vw, var(--opp-font-size-lg));
  line-height: var(--opp-line-height-relaxed);
  font-weight: var(--opp-font-weight-normal);
  color: var(--opp-color-text);
  max-width: var(--opp-text-max-width);
}

.single-opportunity .befello-opp-about-body p { margin-bottom: 1.2em; }

.single-opportunity .befello-opp-about-body a {
  color: var(--opp-color-link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--opp-transition-normal);
}

.single-opportunity .befello-opp-about-body a:hover {
  text-decoration-color: var(--opp-color-link-hover);
}


/* ============================================================
   4. OPPORTUNITY CARD – SHELL & ACF RESETS
   ============================================================ */

.single-opportunity .befello-opp-card {
  position: relative;
  order: 1;
  border: var(--opp-border-width) solid var(--opp-color-border-strong);
  background: var(--opp-color-bg);
  padding: var(--opp-spacing-lg) var(--opp-spacing-md) var(--opp-spacing-md);
  box-shadow: 4px 4px 0 rgba(17, 17, 17, 0.1);
  transition: box-shadow var(--opp-transition-slow);
}

.single-opportunity .befello-opp-card:hover {
  box-shadow: 6px 6px 0 rgba(17, 17, 17, 0.15);
}

.single-opportunity .befello-opp-card-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 34px);
  line-height: var(--opp-line-height-tight);
  font-weight: var(--opp-font-weight-bold);
  color: var(--opp-color-primary);
  margin: 0 0 var(--opp-spacing-lg);
  padding-bottom: var(--opp-spacing-md);
  border-bottom: var(--opp-border-width) solid var(--opp-color-divider);
  letter-spacing: -0.01em;
}

.single-opportunity .befello-opp-card .befello-acf-auto,
.single-opportunity .befello-opp-card .befello-acf-group {
  margin: 0; padding: 0; border: 0;
  background: transparent; box-shadow: none;
}

.single-opportunity .befello-opp-card .befello-acf-group-title { display: none; }
.single-opportunity .befello-opp-card .befello-acf-group-inner { padding: 0; }

.single-opportunity .befello-opp-card .befello-acf-row {
  margin: 0 0 var(--opp-spacing-md);
  padding: 0; border: 0;
  background: transparent; box-shadow: none;
  line-height: var(--opp-line-height-normal);
}

.single-opportunity .befello-opp-card .befello-acf-row::before    { display: none; }
.single-opportunity .befello-opp-card .befello-acf-row:last-child  { margin-bottom: 0; }

.single-opportunity .befello-opp-card .befello-acf-label {
  display: inline; margin: 0;
  font-size: var(--opp-font-size-base);
  font-weight: var(--opp-font-weight-bold);
  color: var(--opp-color-primary);
  letter-spacing: 0.01em;
}

.single-opportunity .befello-opp-card .befello-acf-label::after { content: ": "; }

.single-opportunity .befello-opp-card .befello-acf-value {
  display: inline; margin: 0;
  font-size: var(--opp-font-size-base);
  font-weight: var(--opp-font-weight-normal);
  color: var(--opp-color-text);
}


/* ============================================================
   5. OPPORTUNITY CARD – TAXONOMY & NATIONALITY TAGS
   ============================================================ */

.single-opportunity .befello-opp-card .type-taxonomy .befello-acf-value {
  display: flex; flex-wrap: wrap;
  gap: var(--opp-spacing-xs);
  margin: var(--opp-spacing-xs) 0 0 var(--opp-spacing-xs);
}

.single-opportunity .befello-opp-card .field-pub_eligible_nationalities .befello-acf-value {
  display: inline !important; margin: 0 !important; vertical-align: middle;
}

.single-opportunity .befello-opp-card .select2-container,
.single-opportunity .befello-opp-card .select2-selection--multiple,
.single-opportunity .befello-opp-card .select2-selection__rendered {
  border: none !important; background: transparent !important;
  padding: 0 !important; display: flex !important;
  flex-wrap: wrap !important; gap: var(--opp-spacing-xs) !important;
}

.single-opportunity .befello-opp-card .select2-selection__choice,
.single-opportunity .befello-opp-card li.select2-selection__choice {
  display: inline-block !important;
  padding: 0.5rem 1rem !important;
  border: 2px solid #000 !important;
  border-radius: 5px !important;
  background: transparent !important;
  font-size: clamp(0.875rem, 2vw, 1rem) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  color: #000 !important;
  margin: 0 !important;
  list-style: none !important;
}

.single-opportunity .befello-opp-card .select2-selection__choice__remove { display: none !important; }
.single-opportunity .befello-opp-card .select2-selection__choice span { color: #000 !important; font-size: inherit !important; }

.single-opportunity .befello-opp-card .type-taxonomy .befello-acf-value a {
  display: inline-flex; align-items: center;
  padding: 6px var(--opp-spacing-sm);
  border: 1px solid var(--opp-color-border);
  border-radius: var(--opp-border-radius-md);
  background: rgba(247, 247, 247, 0.95);
  color: var(--opp-color-primary);
  font-size: var(--opp-font-size-sm);
  font-weight: var(--opp-font-weight-semibold);
  line-height: var(--opp-line-height-tight);
  text-decoration: none;
  transition: all var(--opp-transition-normal);
  user-select: none;
}

.single-opportunity .befello-opp-card .type-taxonomy .befello-acf-value a:hover {
  border-color: rgba(17, 17, 17, 0.5);
  background: #f7f7f7;
  transform: translateY(-1px);
}

.single-opportunity .befello-opp-card .type-taxonomy .befello-acf-value a:active {
  transform: translateY(0);
}


/* ============================================================
   6. OPPORTUNITY CARD – APPLY / WEBSITE BUTTONS
   ============================================================ */

.single-opportunity .befello-opp-card .field-pub_apply_button .befello-acf-label,
.single-opportunity .befello-opp-card .field-pub_official_website .befello-acf-label {
  display: none;
}


/* ============================================================
   7. FEATURED IMAGE
   ============================================================ */

.single-opportunity .befello-featured {
  margin: 0 0 var(--opp-spacing-lg);
  padding: 0;
}

.single-opportunity .befello-featured__img {
  width: 100%; height: auto;
  max-height: var(--opp-featured-max-height);
  display: block;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: var(--opp-color-bg);
  object-fit: contain;
  object-position: center;
  vertical-align: middle;
}

.single-opportunity .befello-featured--opportunity { position: relative; }

.single-opportunity .befello-featured--opportunity::after {
  content: ""; display: block;
  height: 1px; margin-top: var(--opp-spacing-lg);
  background: linear-gradient(to right, rgba(17,17,17,0), rgba(17,17,17,0.18), rgba(17,17,17,0));
}


/* ============================================================
   8. JNEWS CATEGORY META
   ============================================================ */

.single-opportunity .jeg_meta_category a,
.single-opportunity .jeg-meta-category a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px; margin-right: 8px;
  border: 1px solid #2b2b2b; border-radius: 5px;
  background: #fff; color: #2563eb;
  font-size: 12px; font-weight: 600; line-height: 1;
  text-decoration: none; transition: all 0.2s ease;
}

.single-opportunity .jeg_meta_category a:last-child,
.single-opportunity .jeg-meta-category a:last-child { margin-right: 0; }

.single-opportunity .jeg_meta_category a:hover,
.single-opportunity .jeg-meta-category a:hover { background: #3b82f6; color: #fff; border-color: #3b82f6; }

.single-opportunity .jeg_meta_category a:active,
.single-opportunity .jeg-meta-category a:active { transform: translateY(1px); }

.single-opportunity .jeg_meta_category .meta_text,
.single-opportunity .jeg_meta_category .category-separator { display: none; }


/* ============================================================
   9. ESSAY TOPIC REPEATER – HORIZONTAL CAROUSEL
   ============================================================ */

.befello-acf-repeater.field-pub_essay_topic {
  margin: clamp(2rem, 4vw, 3rem) 0;
  padding: 0;
}

.befello-acf-repeater.field-pub_essay_topic > .befello-acf-label {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600; color: #2b2b2b;
  margin: 0 0 clamp(1rem, 2vw, 1.5rem);
  line-height: 1.3; letter-spacing: -0.01em;
}

.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(min(280px, 85vw), 380px);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  width: 100%; box-sizing: border-box;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 clamp(1rem, 4vw, 2rem);
  padding: 0.25rem clamp(1rem, 4vw, 2rem) 1.5rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}

.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-track::-webkit-scrollbar { height: 6px; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-track::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 3px; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-track::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; transition: background 0.2s ease; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-track::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row {
  position: relative; display: flex; flex-direction: column;
  gap: 0.75rem; min-height: 180px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid #e5e7eb; border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  scroll-snap-align: start; scroll-snap-stop: always;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow-wrap: anywhere; word-break: break-word;
}

.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%; background: #ffde59;
  opacity: 0; transition: opacity 0.2s ease;
}

.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row:active { transform: scale(0.98); border-color: #3d7cff; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row:focus-within { outline: 2px solid #3d7cff; outline-offset: 2px; border-color: #3d7cff; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row:focus-within::before { opacity: 1; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-label { display: none; }

.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-value {
  font-size: clamp(0.9375rem, 2vw, 1rem);
  line-height: 1.65; color: #2b2b2b;
  overflow-wrap: anywhere; word-break: break-word; hyphens: auto;
}

.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-value p { margin: 0 0 0.75em; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-value p:last-child { margin-bottom: 0; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-value ul,
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-value ol { margin: 0 0 0.75em 1.25em; padding: 0; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-value li { margin-bottom: 0.375em; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-value strong { font-weight: 600; color: #2b2b2b; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-value a { color: #3d7cff; text-decoration: underline; text-decoration-color: rgba(61,124,255,0.3); text-underline-offset: 2px; transition: text-decoration-color 0.2s ease; }
.befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row .befello-acf-value a:hover { text-decoration-color: rgba(61,124,255,1); }


/* ============================================================
   10. ELIGIBILITY & REQUIREMENTS – CARD
   ============================================================ */

.befello-acf-row.field-pub_eligibility_requirements {
  position: relative; margin: 18px 0;
  padding: 20px 22px 18px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 18px; background: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.04);
  overflow: hidden;
}

.befello-acf-row.field-pub_eligibility_requirements::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 8px; height: 100%;
  background: rgba(250, 204, 21, 0.95);
}

.befello-acf-row.field-pub_eligibility_requirements .befello-acf-label {
  margin: 0 0 12px; padding: 0;
  font-size: 1.75rem; font-weight: 800;
  line-height: 1.2; letter-spacing: 0.1px; color: #111;
}

.befello-acf-row.field-pub_eligibility_requirements .befello-acf-value {
  font-size: 1.1rem; line-height: 1.7;
  color: rgba(17, 24, 39, 0.90);
  overflow-wrap: anywhere; word-break: normal;
}

.befello-acf-row.field-pub_eligibility_requirements .befello-acf-value p { margin: 0.55em 0; }
.befello-acf-row.field-pub_eligibility_requirements .befello-acf-value ul { margin: 0.5em 0 0.2em; padding-left: 1.2em; list-style: disc; }
.befello-acf-row.field-pub_eligibility_requirements .befello-acf-value ul li::marker { color: rgba(59,130,246,0.65); }
.befello-acf-row.field-pub_eligibility_requirements .befello-acf-value li { margin: 0.55em 0; }
.befello-acf-row.field-pub_eligibility_requirements .befello-acf-value li:empty { display: none; }
.befello-acf-row.field-pub_eligibility_requirements .befello-acf-value ul ul { margin-top: 0.45em; padding-left: 1.15em; list-style: circle; }
.befello-acf-row.field-pub_eligibility_requirements .befello-acf-value ul ul li::marker { color: rgba(59,130,246,0.45); }


/* ============================================================
   11. BENEFITS & OUTCOMES – CARD
   ============================================================ */

.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg {
  position: relative; margin: 18px 0;
  padding: 20px 22px 18px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 18px; background: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.04);
  overflow: hidden;
}

.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 8px; height: 100%;
  background: rgba(250, 204, 21, 0.95);
}

.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-label {
  margin: 0 0 12px; padding: 0;
  font-size: 1.75rem; font-weight: 800;
  line-height: 1.2; letter-spacing: 0.1px; color: #111;
}

.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value {
  font-size: 1.1rem; line-height: 1.7;
  color: rgba(17, 24, 39, 0.90);
  overflow-wrap: anywhere; word-break: normal;
}

.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value p { margin: 0.55em 0; }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value a { color: #2563eb; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color 0.2s ease, text-decoration-color 0.2s ease; }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value a:hover { color: #1d4ed8; text-decoration-color: rgba(29,78,216,0.9); }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value ul { margin: 0.5em 0 0.2em; padding-left: 1.2em; list-style: disc; }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value ul li::marker { color: rgba(59,130,246,0.65); }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value li { margin: 0.55em 0; }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value li:empty { display: none; }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value ul ul { margin-top: 0.45em; padding-left: 1.15em; list-style: circle; }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value ul ul li::marker { color: rgba(59,130,246,0.45); }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value ol { margin: 0.5em 0 0.2em; padding-left: 1.3em; }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value ol li::marker { color: rgba(59,130,246,0.75); font-weight: 700; }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value strong { font-weight: 700; color: #111; }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value blockquote { margin: 0.9em 0; padding: 0.9em 1em; border-left: 4px solid rgba(59,130,246,0.35); background: rgba(59,130,246,0.06); border-radius: 10px; color: rgba(17,24,39,0.92); }
.befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value a:focus-visible { outline: 2px solid rgba(37,99,235,0.35); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 640px) {
  .befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg { padding: 16px 16px 14px; border-radius: 16px; }
  .befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg::before { width: 5px; }
  .befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-label { font-size: 1.06rem; }
  .befello-acf-row.field-pub_benefits_outcomes.type-wysiwyg .befello-acf-value { font-size: 0.98rem; }
}


/* ============================================================
   12. UNIVERSAL ACCORDION
   ============================================================ */

.befello-acf-row.field-pub_eligibility_requirements { --preview-max: 240; }
.befello-acf-row.field-pub_benefits_outcomes        { --preview-max: 240; }

.befello-accordion .befello-acf-value {
  position: relative; overflow: visible !important; display: block !important;
}

.befello-accordion .befello-accordion__content {
  position: relative; max-height: 240px;
  overflow: hidden;
  transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.befello-accordion.is-open .befello-accordion__content { max-height: 9999px; }

.befello-accordion .befello-accordion__content::after {
  content: ""; position: absolute; inset: auto 0 0 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 35%, rgba(255,255,255,0.85) 65%, rgba(255,255,255,1) 100%);
  pointer-events: none; opacity: 1; transition: opacity 240ms ease;
}

.befello-accordion.is-open .befello-accordion__content::after { opacity: 0; }

.befello-accordion .befello-accordion__toggle {
  display: block; width: auto; margin: 18px auto 6px;
  padding: 12px 6px; appearance: none;
  background: transparent; border: none; box-shadow: none;
  font-size: 1.05rem; font-weight: 800; line-height: 1.2;
  letter-spacing: 0.2px; color: #2563eb;
  text-align: center; text-decoration: none !important;
  white-space: nowrap; cursor: pointer;
  transition: color 160ms ease, transform 120ms ease;
}

.befello-accordion .befello-accordion__toggle:hover  { color: #1d4ed8; }
.befello-accordion .befello-accordion__toggle:active { transform: translateY(1px); }
.befello-accordion .befello-accordion__toggle:focus  { outline: none; }
.befello-accordion .befello-accordion__toggle:focus-visible { outline: 2px solid rgba(37,99,235,0.35); outline-offset: 4px; border-radius: 6px; }

.befello-accordion.befello-accordion--no-toggle .befello-accordion__toggle         { display: none; }
.befello-accordion.befello-accordion--no-toggle .befello-accordion__content        { max-height: none; overflow: visible; }
.befello-accordion.befello-accordion--no-toggle .befello-accordion__content::after { display: none; }


/* ============================================================
   13. STICKY BUTTONS (mobile)
   ============================================================ */

@media (max-width: 900px) {
  .single-opportunity .befello-opp-card-sticky-buttons {
    transition: transform 220ms ease, opacity 220ms ease;
    will-change: transform, opacity;
  }

  .single-opportunity .befello-opp-card-sticky-buttons.is-hidden {
    transform: translateY(110%); opacity: 0; pointer-events: none;
  }
}


/* ============================================================
   14. RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 360px) {
  .single-opportunity .befello-opp-about-title { font-size: 28px; }
  .single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn { font-size: 12px; padding: 14px var(--opp-spacing-xs); letter-spacing: 0.02em; }
}

@media (max-width: 640px) {
  .befello-acf-row.field-pub_eligibility_requirements { padding: 16px 16px 14px; border-radius: 16px; }
  .befello-acf-row.field-pub_eligibility_requirements::before { width: 5px; }
  .befello-acf-row.field-pub_eligibility_requirements .befello-acf-label { font-size: 1.06rem; }
  .befello-acf-row.field-pub_eligibility_requirements .befello-acf-value { font-size: 0.98rem; }
  .befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-track { grid-auto-columns: minmax(280px, 90vw); scroll-padding: 0 1rem; }
  .befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row { min-height: 160px; }
}

@media (max-width: 900px) {
  .single-opportunity .befello-opp-card .field-pub_apply_button,
  .single-opportunity .befello-opp-card .field-pub_official_website { display: none; }

  .single-opportunity .befello-opp-card-sticky-buttons {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: var(--opp-z-fixed); display: flex; gap: 10px;
    padding: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: var(--opp-color-bg);
    border-top: var(--opp-border-width) solid var(--opp-color-border-strong);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
  }

  .single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    margin: 0; padding: var(--opp-spacing-md) var(--opp-spacing-sm);
    border: var(--opp-border-width) solid var(--opp-color-border-strong);
    border-radius: var(--opp-border-radius-sm);
    box-shadow: 2px 2px 0 rgba(17,17,17,0.15);
    font-size: 14px; font-weight: var(--opp-font-weight-bold);
    text-transform: uppercase; letter-spacing: 0.05em;
    text-decoration: none; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer; transition: all var(--opp-transition-fast);
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }

  .single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn:first-child       { background: var(--opp-color-accent-yellow); color: var(--opp-color-primary); }
  .single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn:first-child:hover  { background: var(--opp-color-accent-yellow-hover); }
  .single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn:last-child         { background: var(--opp-color-accent-blue); color: var(--opp-color-bg); }
  .single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn:last-child:hover   { background: var(--opp-color-accent-blue-hover); }
  .single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn:active             { transform: translateY(2px); box-shadow: 1px 1px 0 rgba(17,17,17,0.15); }

  .single-opportunity .jeg_meta_category { display: inline-flex !important; visibility: visible !important; opacity: 1 !important; }
  .single-opportunity .jeg_meta_container,
  .single-opportunity .jeg_post_meta,
  .single-opportunity .jeg_post_meta_2 { display: block !important; visibility: visible !important; }
}

@media (min-width: 600px) and (max-width: 900px) {
  .single-opportunity .befello-opp-layout { padding: 0 var(--opp-spacing-xl) var(--opp-sticky-button-height); gap: var(--opp-spacing-xl); }
  .single-opportunity .befello-opp-card { max-width: 500px; margin: 0 auto; }
  .single-opportunity .befello-opp-card-sticky-buttons { padding: var(--opp-spacing-sm) var(--opp-spacing-xl); gap: 14px; }
  .single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn { font-size: 15px; padding: 18px var(--opp-spacing-md); }
}

@media (min-width: 901px) {
  .single-opportunity .befello-opp-layout {
    grid-template-columns: 1.3fr 0.9fr;
    gap: var(--opp-spacing-2xl); align-items: start;
    margin: var(--opp-spacing-xl) auto 40px;
    padding: 0 40px 40px; max-width: var(--opp-content-max-width);
  }

  .single-opportunity .befello-opp-about { order: 1; }
  .single-opportunity .befello-opp-card  { order: 2; }

  .single-opportunity .befello-opp-card {
    position: sticky; top: var(--opp-spacing-lg);
    max-height: calc(100vh - 48px);
    overflow-y: auto; overflow-x: hidden;
    scroll-behavior: smooth; scrollbar-width: thin;
    scrollbar-color: #ccc var(--opp-color-divider);
  }

  .single-opportunity .befello-opp-about-title { margin-bottom: var(--opp-spacing-lg); }
  .single-opportunity .befello-opp-card-title  { font-size: 34px; }

  .single-opportunity .befello-opp-card .field-pub_apply_button,
  .single-opportunity .befello-opp-card .field-pub_official_website { display: block; }

  .single-opportunity .befello-opp-card .befello-acf-btn {
    display: block; width: 100%;
    margin-top: var(--opp-spacing-md);
    padding: var(--opp-spacing-md) var(--opp-spacing-lg);
    border: var(--opp-border-width) solid var(--opp-color-border-strong);
    border-radius: var(--opp-border-radius-sm);
    box-shadow: 3px 3px 0 rgba(17,17,17,0.15);
    font-size: 15px; font-weight: var(--opp-font-weight-bold);
    text-transform: uppercase; letter-spacing: 0.05em;
    text-decoration: none; text-align: center;
    cursor: pointer; transition: all var(--opp-transition-normal);
  }

  .single-opportunity .befello-opp-card .befello-acf-btn:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 rgba(17,17,17,0.2); }
  .single-opportunity .befello-opp-card .befello-acf-btn:active { transform: translateY(0); box-shadow: 2px 2px 0 rgba(17,17,17,0.15); }

  .single-opportunity .befello-opp-card .field-pub_apply_button .befello-acf-btn         { background: var(--opp-color-accent-yellow); color: var(--opp-color-primary); margin-top: var(--opp-spacing-lg); }
  .single-opportunity .befello-opp-card .field-pub_apply_button .befello-acf-btn:hover   { background: var(--opp-color-accent-yellow-hover); }
  .single-opportunity .befello-opp-card .field-pub_official_website .befello-acf-btn       { background: var(--opp-color-accent-blue); color: var(--opp-color-bg); margin-top: var(--opp-spacing-sm); }
  .single-opportunity .befello-opp-card .field-pub_official_website .befello-acf-btn:hover { background: var(--opp-color-accent-blue-hover); }

  .single-opportunity .befello-opp-card-sticky-buttons { display: none; }

  .single-opportunity .befello-opp-card::-webkit-scrollbar       { width: 8px; }
  .single-opportunity .befello-opp-card::-webkit-scrollbar-track  { background: var(--opp-color-divider); border-radius: var(--opp-border-radius-sm); }
  .single-opportunity .befello-opp-card::-webkit-scrollbar-thumb  { background: #ccc; border-radius: var(--opp-border-radius-sm); transition: background var(--opp-transition-normal); }
  .single-opportunity .befello-opp-card::-webkit-scrollbar-thumb:hover { background: #aaa; }
}

@media (min-width: 768px) { .befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-track { grid-auto-columns: minmax(340px, 420px); } }
@media (min-width: 1024px) { .befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-track { grid-auto-columns: minmax(360px, 440px); } }

@media (min-width: 1400px) {
  .single-opportunity .befello-opp-layout { gap: 72px; padding: 0 0 40px; }
  .single-opportunity .befello-opp-card   { padding: 28px var(--opp-spacing-lg) var(--opp-spacing-lg); }
}

@media (hover: hover) and (pointer: fine) {
  .befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row:hover { border-color: #d1d5db; box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04); transform: translateY(-2px); }
  .befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row:hover::before { opacity: 1; }
}


/* ============================================================
   15. ACCESSIBILITY
   ============================================================ */

.single-opportunity .befello-opp-card .befello-acf-btn:focus-visible,
.single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn:focus-visible {
  outline: 3px solid var(--opp-color-focus); outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(91,134,214,0.2), 4px 4px 0 rgba(17,17,17,0.1);
}

.single-opportunity .befello-opp-about-body a:focus-visible,
.single-opportunity .befello-opp-card .type-taxonomy a:focus-visible,
.single-opportunity .befello-opp-card .field-pub_eligible_nationalities .befello-acf-value a:focus-visible {
  outline: 2px solid var(--opp-color-focus); outline-offset: 2px;
  border-radius: 2px; background: rgba(91,134,214,0.1);
}

.single-opportunity .jeg_meta_category a:focus-visible,
.single-opportunity .jeg-meta-category a:focus-visible { outline: 2px solid var(--opp-color-focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .single-opportunity .befello-opp-card:hover,
  .single-opportunity .befello-opp-card .befello-acf-btn:hover,
  .single-opportunity .befello-opp-card-sticky-buttons .befello-acf-btn:active,
  .single-opportunity .befello-opp-about-body a,
  .single-opportunity .befello-opp-card .type-taxonomy a:hover,
  .single-opportunity .befello-opp-card .field-pub_eligible_nationalities .befello-acf-value a:hover,
  .befello-acf-repeater.field-pub_essay_topic .befello-acf-repeater-row:hover { transform: none; }
}


/* ============================================================
   16. PRINT
   ============================================================ */

@media print {
  .single-opportunity .befello-opp-layout { display: block; padding: 0; margin: 0; }
  .single-opportunity .befello-opp-card { position: static; box-shadow: none; border: 1px solid #000; page-break-inside: avoid; }
  .single-opportunity .befello-opp-card .field-pub_apply_button,
  .single-opportunity .befello-opp-card .field-pub_official_website { display: block; page-break-inside: avoid; }
  .single-opportunity .befello-opp-card-sticky-buttons { display: none; }
  .befello-accordion .befello-accordion__content        { max-height: none !important; overflow: visible !important; }
  .befello-accordion .befello-accordion__content::after { display: none !important; }
  .befello-accordion .befello-accordion__toggle         { display: none !important; }
}


/* ============================================================
   17. PAGE-LEVEL OVERFLOW FIX
   ============================================================ */

.single-opportunity,
.single-opportunity body { overflow-x: hidden; }


/* ============================================================
   18. HOST COUNTRY — inline pattern
   ============================================================ */

.single-opportunity .befello-opp-card .befello-acf-row.field-pub_host_country.type-taxonomy {
  display: block; margin: 0 0 var(--opp-spacing-md);
  padding: 0 0 0 36px; border: 0; background: transparent;
}

.single-opportunity .befello-opp-card .befello-acf-row.field-pub_host_country .befello-acf-label {
  display: inline; margin: 0;
  font-size: var(--opp-font-size-base);
  font-weight: var(--opp-font-weight-bold);
  color: var(--opp-color-primary);
}

.single-opportunity .befello-opp-card .befello-acf-row.field-pub_host_country .befello-acf-value {
  display: inline !important; margin: 0 !important; padding: 0 !important;
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  font-size: var(--opp-font-size-base);
  font-weight: var(--opp-font-weight-normal);
  color: var(--opp-color-text);
}

.single-opportunity .befello-opp-card .befello-acf-row.field-pub_host_country .befello-acf-value a {
  display: inline !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; background: transparent !important;
  border-radius: 0 !important; box-shadow: none !important;
  font-size: inherit !important; font-weight: inherit !important;
  color: var(--opp-color-text) !important;
  text-decoration: none !important; transform: none !important;
}

.single-opportunity .befello-opp-card .befello-acf-row.field-pub_host_country .befello-acf-value a:hover {
  text-decoration: underline; text-underline-offset: 3px;
}


/* ============================================================
   19. ELIGIBLE NATIONALITIES — Inline Toggle
   ============================================================ */

.befello-acf-row.field-pub_eligible_nationalities {
  display: block; margin: 0 0 var(--opp-spacing-md, 16px); line-height: 1.6;
}

.befello-acf-row.field-pub_eligible_nationalities .befello-acf-label {
  display: inline; margin: 0;
  font-size: var(--opp-font-size-base, 16px);
  font-weight: var(--opp-font-weight-bold, 700);
  color: var(--opp-color-primary, #2b2b2b);
  vertical-align: middle;
}

.befello-acf-row.field-pub_eligible_nationalities .befello-acf-label::after { content: ": "; }

.befello-acf-row.field-pub_eligible_nationalities .befello-acf-value {
  display: inline !important; margin: 0 !important; vertical-align: middle;
}

.befello-nationalities-inline,
.befello-nationalities-hidden { display: inline; }

.single-opportunity .befello-opp-card .field-pub_eligible_nationalities .befello-acf-value a,
.befello-nationality-pill {
  display: inline-block; padding: 4px 12px; margin: 0 4px 4px 0;
  background: #ffffff; border: 1px solid #e5e5e5; border-radius: 20px;
  font-size: clamp(0.85rem, 0.8rem + 0.25vw, 0.9rem);
  color: #2b2b2b; text-decoration: none; white-space: nowrap;
  vertical-align: middle; transition: border-color 160ms ease, background 160ms ease;
}

.single-opportunity .befello-opp-card .field-pub_eligible_nationalities .befello-acf-value a:hover,
.befello-nationality-pill:hover { border-color: #3d7cff; background: rgba(61,124,255,0.03); }

.befello-nationalities-toggle {
  display: inline-block; padding: 5px 11px; margin: 0 0 4px 2px;
  background: rgba(255,222,89,0.15); border: 1px solid rgba(255,222,89,0.5);
  border-radius: 20px; font-size: clamp(0.8rem, 0.75rem + 0.25vw, 0.85rem);
  font-weight: 600; color: #494e4a; cursor: pointer; white-space: nowrap;
  vertical-align: middle; line-height: 1.2; transition: all 180ms ease;
}

.befello-nationalities-toggle:hover { background: rgba(255,222,89,0.3); border-color: rgba(255,222,89,0.7); color: #2b2b2b; }
.befello-nationalities-toggle:focus { outline: 2px solid #ffde59; outline-offset: 2px; }
.befello-nationalities-toggle:active { transform: translateY(1px); background: rgba(255,222,89,0.4); }


/* ============================================================
   20. FIELD ICONS
   ============================================================ */

.single-opportunity .befello-opp-card .befello-acf-row {
  position: relative; padding-left: 36px;
}

.single-opportunity .befello-opp-card .befello-acf-row::before {
  content: ''; display: block; position: absolute;
  left: 0; top: 0; width: 24px; height: 24px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0.75; transition: opacity 160ms ease; transform: translateY(2px);
}

.single-opportunity .befello-opp-card .befello-acf-row:hover::before { opacity: 1; }

.single-opportunity .befello-opp-card .field-pub_eligible_nationalities::before { background-image: url('https://www.befello.com/wp-content/uploads/2026/02/pub_eligible_nationalities.png'); transform: translateY(0); top: 6px; }
.single-opportunity .befello-opp-card .field-pub_age::before               { background-image: url('https://www.befello.com/wp-content/uploads/2026/02/pub_age.png'); }
.single-opportunity .befello-opp-card .field-pub_deadline::before           { background-image: url('https://www.befello.com/wp-content/uploads/2026/02/pub_deadline.png'); }
.single-opportunity .befello-opp-card .field-pub_fund_type::before          { background-image: url('https://www.befello.com/wp-content/uploads/2026/02/Pub_Fund_type.png'); }
.single-opportunity .befello-opp-card .field-pub_format::before             { background-image: url('https://www.befello.com/wp-content/uploads/2026/02/pub_format.png'); }
.single-opportunity .befello-opp-card .field-pub_opportunity_type::before   { background-image: url('https://www.befello.com/wp-content/uploads/2026/02/pub_opportunity_type.png'); }
.single-opportunity .befello-opp-card .field-pub_host_country::before       { background-image: url('https://www.befello.com/wp-content/uploads/2026/02/pub_host_country.png'); }

@media (max-width: 640px) {
  .single-opportunity .befello-opp-card .befello-acf-row { padding-left: 32px; }
  .single-opportunity .befello-opp-card .befello-acf-row::before { width: 20px; height: 20px; transform: translateY(1px); }
  .single-opportunity .befello-opp-card .field-pub_eligible_nationalities::before { top: 3px; transform: translateY(0); }
}

@media (min-width: 641px) and (max-width: 900px) {
  .single-opportunity .befello-opp-card .befello-acf-row { padding-left: 38px; }
  .single-opportunity .befello-opp-card .befello-acf-row::before { width: 26px; height: 26px; }
}


/* ============================================================
   21. SINGLE ESSAY PAGE
   ============================================================ */

.single-essay .befello-acf-auto {
  max-width: 760px; margin: 0 auto; padding: 3rem 2rem;
}

@media (max-width: 768px) {
  .single-essay .befello-acf-auto { padding: 2rem 1.25rem; }
}

.single-essay .entry-header .field-pub_worked_with_orgs {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.single-essay .field-pub_worked_with_orgs::before {
  content: ''; width: 20px; height: 20px;
  background-image: url('https://www.befello.com/wp-content/uploads/2026/02/pub_worked_with.png');
  background-size: contain; background-repeat: no-repeat; opacity: 0.6;
}

.single-essay .field-pub_worked_with_orgs .befello-acf-label {
  font-size: 0.8125rem; font-weight: 500; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.05em; margin: 0;
}

.single-essay .field-pub_worked_with_orgs .befello-acf-value { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.single-essay .field-pub_worked_with_orgs .befello-acf-value a {
  display: inline-flex; align-items: center;
  padding: 0.35rem 0.85rem; background: #fff; color: #0f1112;
  font-size: 0.8125rem; font-weight: 600;
  border: 1px solid #0f1112; border-radius: 6px;
  text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.single-essay .field-pub_prompt_question {
  position: relative; background: #ffffff;
  border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 2rem 2.5rem; margin: 2rem 0 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.single-essay .field-pub_prompt_question::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 5px; background: #3d7cff; border-radius: 12px 0 0 12px;
}

.single-essay .field-pub_prompt_question .befello-acf-label {
  font-size: 0.75rem; font-weight: 700; color: #3d7cff;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.2rem;
}

.single-essay .field-pub_prompt_question > .befello-acf-value {
  font-size: 18px; line-height: 1.7; color: #0f1112; font-weight: 500;
}

@media (max-width: 768px) {
  .single-essay .field-pub_prompt_question { padding: 0.9rem 1.25rem; }
}

.single-essay .field-pub_word_limit {
  position: absolute; top: 1.5rem; right: 2rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; background: #fff;
  border: 1.5px solid #3d7cff; border-radius: 20px;
  box-shadow: 0 1px 3px rgba(61,124,255,0.1); z-index: 10;
}

.single-essay .field-pub_word_limit .befello-acf-label {
  font-size: 0.875rem; font-weight: 600; color: #3d7cff;
  text-transform: uppercase; letter-spacing: 0.05em; margin: 0; line-height: 1;
}

.single-essay .field-pub_word_limit .befello-acf-label::after {
  content: '•'; display: inline-block; color: #3d7cff;
  margin-left: 0.5rem; font-weight: 400; font-size: 0.875rem;
}

.single-essay .field-pub_word_limit .befello-acf-value {
  font-size: 0.875rem; font-weight: 600; color: #3d7cff; line-height: 1; margin: 0;
}

@media (max-width: 768px) {
  .single-essay .field-pub_word_limit { position: static; display: inline-flex; margin-top: 1rem; }
}

.single-essay .field-pub_essay_answer { position: relative; margin: 1.5rem 0 3rem; }

.single-essay .field-pub_essay_answer .befello-acf-label {
  font-size: 0.75rem; font-weight: 700; color: #3d7cff;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 1.5rem; padding-bottom: 0.75rem;
  border-bottom: 2px solid #e0ebff;
}

.single-essay .field-pub_essay_answer .befello-acf-value {
  font-size: 14px; line-height: 1.9; color: #334155;
  text-align: justify;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.single-essay .field-pub_essay_answer .befello-acf-value p { margin-bottom: 1.5rem; text-align: justify; }

.single-essay .field-pub_essay_answer .befello-acf-value p:first-child::first-letter {
  font-size: 3.5rem; font-weight: 700; line-height: 1; color: #3d7cff;
  float: left; margin: 0.1rem 0.5rem 0 0;
}

.single-essay .field-pub_essay_answer .befello-acf-value p:last-child { margin-bottom: 0; }

.single-essay .field-pub_advice_similar_prompts { margin: clamp(2rem, 4vw, 4rem) 0; padding: 0; }

.single-essay .field-pub_advice_similar_prompts > .befello-acf-label {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 600; color: #2b2b2b;
  margin: 0 0 clamp(1rem, 2vw, 1.5rem); line-height: 1.3; letter-spacing: -0.01em;
}

.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(min(300px, 85vw), 400px);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  width: 100%; box-sizing: border-box;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-padding: 0;
  padding: 0.25rem 0 1.5rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; touch-action: pan-x pan-y;
}

.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-track::-webkit-scrollbar { height: 6px; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-track::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 3px; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-track::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-track::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row {
  position: relative; display: flex; flex-direction: column;
  gap: 0.875rem; min-height: 200px;
  padding: clamp(1.5rem, 3.5vw, 2rem); padding-top: 3.5rem;
  border: 1px solid #e5e7eb; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  scroll-snap-align: start; scroll-snap-stop: always;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow-wrap: anywhere; word-break: break-word;
}

.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row::before {
  content: ""; position: absolute; top: 1.5rem; left: 1.5rem;
  width: 1.75rem; height: 1.75rem;
  background-image: url('https://www.befello.com/wp-content/uploads/2026/02/idea.png');
  background-size: contain; background-repeat: no-repeat; background-position: center;
}

.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row:active { transform: scale(0.98); border-color: #3d7cff; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row:focus-within { outline: 2px solid #3d7cff; outline-offset: 2px; border-color: #3d7cff; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row > .befello-acf-row { padding-left: 0; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row > .befello-acf-row:first-child { padding-left: 0; margin-top: 0; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row > .befello-acf-row:first-child .befello-acf-label { display: none; }

.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-label {
  font-size: 0.875rem; font-weight: 700; color: #2b2b2b; margin-bottom: 0.5rem; line-height: 1.4;
}

.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value,
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value p,
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value ul,
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value ol,
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value li,
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value strong,
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value a {
  font-size: 16.5px; font-weight: 450; color: #0f1112; line-height: 1.65;
}

.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value { overflow-wrap: break-word; word-break: normal; hyphens: none; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value p { margin: 0 0 0.75em; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value p:last-child { margin-bottom: 0; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value ul,
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value ol { margin: 0 0 0.75em 1.25em; padding: 0; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value li { margin-bottom: 0.375em; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value strong { font-weight: 600; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value a { color: #3d7cff; text-decoration: underline; text-decoration-color: rgba(61,124,255,0.3); text-underline-offset: 2px; transition: text-decoration-color 0.2s ease; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row .befello-acf-value a:hover { text-decoration-color: rgba(61,124,255,1); }

.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row > .befello-acf-row:last-child { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; padding-left: 0; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row > .befello-acf-row:last-child .befello-acf-label { font-size: 0.75rem; color: #10b981; text-transform: uppercase; letter-spacing: 0.05em; }
.single-essay .field-pub_advice_similar_prompts .befello-acf-repeater-row > .befello-acf-row:last-child .befello-acf-value { color: #64748b; }

.single-essay .jeg_meta_category .meta_text { display: none; }

.single-essay .field-pub_prompt_question .field-pub_essay_type { margin: 0 0 1.5rem 0; }
.single-essay .field-pub_prompt_question .field-pub_essay_type .befello-acf-label { display: none; }
.single-essay .field-pub_prompt_question .field-pub_essay_type .befello-acf-value { display: flex; flex-wrap: wrap; gap: 8px; }

.single-essay .field-pub_prompt_question .field-pub_essay_type .befello-acf-value a {
  display: inline-flex; align-items: center; padding: 5px 12px;
  border: 1px solid #2b2b2b; border-radius: 5px; background: #fff; color: #2563eb;
  font-size: 11px; font-weight: 600; line-height: 1.2; text-decoration: none;
  transition: all 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.single-essay .field-pub_prompt_question .field-pub_essay_type .befello-acf-value a:hover { background: #3b82f6; color: #fff; border-color: #3b82f6; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(59,130,246,0.2); }
.single-essay .field-pub_prompt_question .field-pub_essay_type .befello-acf-value a:active { transform: translateY(0); }

.type-essay .jeg_post_title a:hover,
.type-essay h3.jeg_post_title a:hover { color: #3d7cff !important; }

.befello-essay-types { display: flex !important; gap: 0.625rem !important; flex-wrap: wrap !important; margin: 0 0 1rem 0 !important; padding: 0 !important; }


/* ============================================================
   22. MODULE 37 — ESSAY CARDS
   ============================================================ */

.befello-m37-card .box_wrap {
  border: 1px solid rgba(17,17,17,0.12);
  border-radius: 16px; overflow: hidden; background: #fff;
}

.befello-m37-card .befello-m37-thumb { position: relative; }

.befello-m37-card .befello-m37-badges {
  position: absolute; top: 14px; left: 14px;
  display: flex; gap: 8px; flex-wrap: wrap; z-index: 2;
}

.befello-m37-card .befello-badge {
  display: inline-flex; align-items: center;
  padding: 6px 10px; border-radius: 6px;
  font-size: 12px; line-height: 1; font-weight: 500;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,17,17,0.12);
  color: #111; backdrop-filter: blur(6px);
}

/* Thumbnail ratios — Essays: 35%, Opportunities: 56.25% */
.befello-m37-card {
  --befello-thumb-ratio: 35%;
}

.befello-m37-card.befello-m37-card-opportunity {
  --befello-thumb-ratio: 56.25%;
}

.befello-m37-card .jeg_thumb .thumbnail-container,
.befello-m37-card .jeg_thumb .thumbnail-container.custom-size {
  padding-bottom: var(--befello-thumb-ratio) !important;
}

.befello-m37-card .jeg_thumb .thumbnail-container img,
.befello-m37-card .jeg_thumb .thumbnail-container.custom-size img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 35%;
}

.befello-m37-card .befello-m37-meta { padding: 12px 18px 6px; }

.befello-m37-card .befello-m37-workedwith {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; line-height: 1.25;
  color: rgba(17,17,17,0.70); max-width: 100%;
  flex-wrap: wrap; row-gap: 8px;
}

.befello-m37-card .befello-m37-workedwith::before {
  content: ""; width: 18px; height: 18px; flex: 0 0 18px;
  background-image: url("https://www.befello.com/wp-content/uploads/2026/02/pub_worked_with.png");
  background-size: contain; background-repeat: no-repeat; background-position: center; opacity: 0.85;
}

.befello-m37-card .befello-m37-workedwith-label { font-weight: 500; white-space: nowrap; }

.befello-m37-card .befello-m37-workedwith-name {
  min-width: 0; max-width: 100%;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid rgba(17,17,17,0.12);
  background: rgba(16,164,115,0.10); color: #0b6f50;
  font-weight: 800; font-size: 14px; line-height: 1.15;
  white-space: normal; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.befello-m37-card .befello-m37-content { padding: 6px 18px 18px; }

.befello-m37-card .befello-m37-title,
.befello-m37-card .befello-m37-title a {
  margin: 0; font-size: 18px; line-height: 1.25;
  font-weight: 800; letter-spacing: -0.2px;
  color: rgba(17,17,17,0.78) !important;
  text-decoration: none; text-align: left;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

.befello-m37-card .befello-m37-title a:hover { text-decoration: none; }

.befello-m37-card .befello-m37-footer { margin-top: 12px; }

.befello-m37-card .befello-m37-source {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 12px; border-radius: 12px;
  border: 1px solid rgba(17,17,17,0.12); background: #fff;
  color: #111; font-weight: 700; font-size: 12px; line-height: 1; text-decoration: none;
}

@media (max-width: 520px) {
  .befello-m37-card .befello-m37-meta    { padding: 10px 14px 6px; }
  .befello-m37-card .befello-m37-content { padding: 6px 14px 16px; }
  .befello-m37-card .befello-m37-title,
  .befello-m37-card .befello-m37-title a { font-size: 16px; }
  .befello-m37-card .befello-m37-workedwith { font-size: 14px; }
}


/* ============================================================
   23. MODULE 37 — OPPORTUNITY CARDS
   ============================================================ */

.befello-m37-card.befello-m37-card-opportunity .box_wrap {
  border: 1px solid rgba(17,17,17,0.12);
  border-radius: 16px; overflow: hidden; background: #fff;
}

.befello-m37-card-opportunity .befello-m37-thumb { position: relative; }

/* Category pills — TOP-LEFT, max 2, no overflow */
.befello-m37-card-opportunity .befello-m37-opp-cats {
  position: absolute; top: 14px; left: 14px;
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: flex-start;
  max-width: calc(100% - 28px); z-index: 3;
}

.befello-m37-card-opportunity .befello-m37-opp-cat {
  display: inline-flex; align-items: center;
  padding: 6px 10px; border-radius: 6px;
  font-size: 12px; line-height: 1; font-weight: 600;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,17,17,0.12);
  color: #2563eb; backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  user-select: none; white-space: nowrap;
}

/* Hide 3rd+ categories via CSS fallback */
.befello-m37-card-opportunity .befello-m37-opp-cat:nth-child(n+3) { display: none; }

/* Hide overflow indicator */
.befello-m37-card-opportunity .befello-m37-opp-cat-more { display: none; }

.befello-m37-card-opportunity .befello-m37-content { padding: 10px 18px 18px; }

/* Deadline line */
.befello-m37-card-opportunity .befello-m37-opp-deadline {
  position: relative; display: flex; align-items: center;
  gap: 8px; margin: 6px 0 10px; padding-left: 28px;
  font-size: 14px; line-height: 1.4;
}

.befello-m37-card-opportunity .befello-m37-opp-deadline-label { font-weight: 900; color: #0f1112; line-height: 1.4; }
.befello-m37-card-opportunity .befello-m37-opp-deadline-value { font-weight: 500; color: rgba(17,17,17,0.75); line-height: 1.4; }

.befello-m37-card-opportunity .field-pub_deadline::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 22px; height: 22px; transform: translateY(-50%);
  background-image: url('https://www.befello.com/wp-content/uploads/2026/02/pub_deadline.png');
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0.85; flex-shrink: 0;
}

/* Title */
.befello-m37-card-opportunity .befello-m37-title,
.befello-m37-card-opportunity .befello-m37-title a {
  margin: 0; font-size: 18px; line-height: 1.25;
  font-weight: 800; letter-spacing: -0.2px;
  color: rgba(17,17,17,0.78) !important;
  text-decoration: none; text-align: left;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Bottom row */
.befello-m37-card-opportunity .befello-m37-opp-row {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 16px; margin-top: 14px; min-height: 22px;
}

/* Fund block — no label */
.befello-m37-card-opportunity .befello-m37-opp-fund {
  position: relative; display: flex; align-items: center;
  padding-left: 28px; min-width: 0; flex: 1 1 50%; min-height: 22px;
}

.befello-m37-card-opportunity .befello-m37-opp-fund-label { display: none; }

.befello-m37-card-opportunity .befello-m37-opp-fund-value {
  font-weight: 500; color: rgba(17,17,17,0.75);
  font-size: 13px; line-height: 1.4;
  word-break: break-word; overflow-wrap: break-word;
}

.befello-m37-card-opportunity .field-pub_fund_type::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 22px; height: 22px; transform: translateY(-50%);
  background-image: url('https://www.befello.com/wp-content/uploads/2026/02/Pub_Fund_type.png');
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0.85; flex-shrink: 0;
}

/* Host block — no label */
.befello-m37-card-opportunity .befello-m37-opp-host {
  position: relative; display: flex; align-items: center;
  justify-content: flex-end; padding-left: 28px;
  min-width: 0; flex: 0 1 auto; max-width: 50%; min-height: 22px;
}

.befello-m37-card-opportunity .befello-m37-opp-host-value {
  font-weight: 500; color: rgba(17,17,17,0.75);
  font-size: 13px; line-height: 1.4;
  text-align: right; word-break: break-word; overflow-wrap: break-word;
}

.befello-m37-card-opportunity .field-pub_host_country::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 22px; height: 22px; transform: translateY(-50%);
  background-image: url('https://www.befello.com/wp-content/uploads/2026/02/pub_host_country.png');
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0.85; flex-shrink: 0;
}

/* Mobile — Opportunity cards */
@media (max-width: 520px) {
  .befello-m37-card-opportunity .befello-m37-content { padding: 10px 14px 16px; }

  .befello-m37-card-opportunity .befello-m37-title,
  .befello-m37-card-opportunity .befello-m37-title a { font-size: 16px; }

  .befello-m37-card-opportunity .befello-m37-opp-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .befello-m37-card-opportunity .befello-m37-opp-host { justify-content: flex-start; max-width: 100%; }
  .befello-m37-card-opportunity .befello-m37-opp-host-value { text-align: left; }
}