/* ==========================================================================
 * Opportunities Block – Full Stylesheet
 * Version: 1.3.1-r3
 *  - Image height sync to text; layouts 2 & 3 columns
 *  - Cleaned duplicate responsive rules
 *  - Added vertical spacing between consecutive blocks
 * ========================================================================== */

/* 0. Spacing between consecutive blocks */
.et-opportunities-block + .et-opportunities-block {
  margin-top: clamp(42px,5.2vw,88px);
}

/* 1. Root & Variables */
.et-opportunities-block {
  --et-opt-gap:28px;
  --et-opt-border-radius:16px;
  --et-opt-faq-item-gap:14px;
  --et-opt-image-min-height:380px;
  position:relative;
  width:100%;
  display:block;
  padding:0;
  box-sizing:border-box;
  font-family:'Onest', Arial, sans-serif;
  overflow:visible;
}
.et-opportunities-block.has-inner-padding {
  padding:clamp(6px,0.8vw,12px);
}

/* 2. Decorative Shape */
.et-opportunities-block .et-opt-shape {
  position:absolute;
  top:-160px;
  right:-60px;
  width:230px;
  aspect-ratio:1/1;
  background:url('../img/line_square.png') no-repeat center / contain;
  transform:scaleX(-1) rotate(6deg);
  pointer-events:none;
  z-index:5;
}
.et-opportunities-block.shape-off .et-opt-shape { display:none; }

/* 3. Grid Templates (desktop / large) */
.et-opportunities-block .et-opt-grid {
  display:grid;
  gap:var(--et-opt-gap);
  align-items:flex-start;
  grid-template-columns:1.05fr 0.62fr 1.05fr;
}
.et-opportunities-block.has-preset-faq-image-text .et-opt-grid { grid-template-columns:1.05fr 0.62fr 1.05fr; }
.et-opportunities-block.has-preset-faq-text-image  .et-opt-grid { grid-template-columns:1.05fr 1.05fr 0.62fr; }
.et-opportunities-block.has-preset-image-text-faq  .et-opt-grid { grid-template-columns:0.62fr 1.05fr 1.05fr; }
.et-opportunities-block.has-preset-text-faq-image  .et-opt-grid { grid-template-columns:1.05fr 1.05fr 0.62fr; }
.et-opportunities-block.has-preset-image-faq-text  .et-opt-grid { grid-template-columns:0.62fr 1.05fr 1.05fr; }

/* 2-col presets */
.et-opportunities-block.has-preset-text-image .et-opt-grid { grid-template-columns:1.05fr 0.95fr; }
.et-opportunities-block.has-preset-image-text .et-opt-grid { grid-template-columns:0.95fr 1.05fr; }

/* 4. Column Base */
.et-opportunities-block .et-opt-col {
  position:relative;
  background:#fff;
  border:1px solid transparent;
  border-radius:var(--et-opt-border-radius);
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  padding:clamp(18px,1.5vw,30px) clamp(18px,1.5vw,30px) clamp(22px,2vw,36px);
}
.et-opportunities-block .et-opt-col.has-border { /* color inline */ }

/* 5. Text Column */
.et-opportunities-block .et-opt-text {
  font-size:16px;
  color:#4B4F55;
  line-height:1.55;
}
.et-opportunities-block .et-opt-title {
  margin:0 0 18px;
  font-size:clamp(28px,2.4vw,40px);
  line-height:1.08;
  font-weight:600;
  color:#3C3C3C;
  letter-spacing:-0.3px;
}
.et-opportunities-block .et-opt-body p { margin:0 0 16px; }
.et-opportunities-block .et-opt-body p:last-child { margin-bottom:0; }

/* 6. Image Column + Sync Height */
.et-opportunities-block .et-opt-image {
  padding:0;
  background:transparent;
  border:none;
  display:flex;
  align-self:flex-start;
}
.et-opportunities-block .et-opt-image-frame {
  position:relative;
  width:100%;
  min-height:var(--et-opt-image-min-height);
  border-radius:var(--et-opt-border-radius);
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:height .25s ease;
}
.et-opportunities-block .et-opt-image-frame--sync { /* marker for JS */ }
.et-opportunities-block .et-opt-image-tag,
.et-opportunities-block .et-opt-image-placeholder {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:inherit;
  background:linear-gradient(135deg,#eef1f5,#d9dee5);
}

/* Badge (desktop only) */
.et-opportunities-block .et-opt-badge {
  position:absolute;
  left:0;
  bottom:0;
  z-index:6;
  background:#FFFFFF;
  border-radius:0 12px 0 0;
  padding:8px 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 20px -6px rgba(0,0,0,.18),0 2px 6px rgba(0,0,0,.08);
}
.et-opportunities-block .et-opt-badge-inner {
  background:#fff;
  border:1px solid #154ADC;
  border-radius:12px;
  padding:14px 34px 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}
.et-opportunities-block .et-opt-badge-img {
  max-width:150px;
  height:auto;
  display:block;
}
@media (max-width:768px){
  .et-opportunities-block .et-opt-badge { display:none; }
}

/* 7. FAQ Column */
.et-opportunities-block .et-opt-faq { display:flex; flex-direction:column; }
.et-opportunities-block .et-opt-faq-inner {
  display:flex;
  flex-direction:column;
  gap:var(--et-opt-faq-item-gap);
  flex:1 1 auto;
}
.et-opportunities-block .et-opt-faq-title {
  margin:0 0 6px;
  font-size:clamp(22px,1.8vw,32px);
  line-height:1.12;
  font-weight:600;
  color:#154ADC;
  letter-spacing:-0.3px;
}
.et-opportunities-block .et-opt-faq-list {
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:var(--et-opt-faq-item-gap);
}
.et-opportunities-block .et-opt-faq-item {
  border-radius:12px;
  background:linear-gradient(135deg,#2F53DB 0%, #1A41C8 100%);
  color:#fff;
  overflow:hidden;
  position:relative;
}
.et-opportunities-block .et-opt-faq-question { margin:0; }
.et-opportunities-block .et-opt-faq-toggle {
  all:unset;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:14px 18px;
  font-size:15px;
  font-weight:500;
  line-height:1.35;
  color:#fff;
  position:relative;
}
.et-opportunities-block .et-opt-faq-toggle:focus-visible {
  outline:2px solid #fff;
  outline-offset:2px;
  border-radius:8px;
}
.et-opportunities-block .et-opt-faq-icon {
  width:22px; height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  color:#fff;
}
.et-opportunities-block .et-opt-faq-arrow {
  margin-left:auto;
  width:14px;
  height:14px;
  position:relative;
  color:#fff;
}
.et-opportunities-block .et-opt-faq-arrow::before,
.et-opportunities-block .et-opt-faq-arrow::after {
  content:"";
  position:absolute;
  inset:0;
  background:currentColor;
  mask:linear-gradient(#000,#000);
  -webkit-mask:linear-gradient(#000,#000);
  clip-path:polygon(0 40%,100% 40%,100% 60%,0 60%);
  transform-origin:center;
  transition:transform .25s;
}
.et-opportunities-block .et-opt-faq-toggle[aria-expanded="true"] .et-opt-faq-arrow::before {
  transform:rotate(90deg);
}
.et-opportunities-block .et-opt-faq-toggle[aria-expanded="true"] .et-opt-faq-arrow::after {
  transform:rotate(180deg);
  opacity:0;
}
.et-opportunities-block .et-opt-faq-answer {
  background:#1A3FAB;
  color:#DCE6FF;
  font-size:14px;
  line-height:1.5;
  padding:14px 18px 16px;
  overflow:hidden;
  opacity:0;
  height:0;
  will-change:height,opacity;
  transition:none;
}
.et-opportunities-block .et-opt-faq-answer.is-open {
  opacity:1;
  height:auto;
}
.et-opportunities-block .et-opt-faq-answer.is-opening,
.et-opportunities-block .et-opt-faq-answer.is-closing {
  transition:
    height .34s cubic-bezier(.4,0,.2,1),
    opacity .28s ease;
}
.et-opportunities-block .et-opt-faq-answer-inner p { margin:0 0 12px; }
.et-opportunities-block .et-opt-faq-answer-inner p:last-child { margin-bottom:0; }
.et-opportunities-block .et-opt-faq-empty {
  font-size:14px;
  margin:0;
  color:#555;
}

/* 8. Responsive (single, consolidated) */
@media (max-width:1100px){
  /* Stacking for all presets (reinforced) */
  .et-opportunities-block .et-opt-grid {
    grid-template-columns:1fr !important;
  }
  .et-opportunities-block .et-opt-col {
    padding:clamp(16px,2.6vw,32px);
    width:100%;
    max-width:100%;
  }
  .et-opportunities-block .et-opt-text,
  .et-opportunities-block .et-opt-image,
  .et-opportunities-block .et-opt-faq {
    min-width:0;
  }
  .et-opportunities-block .et-opt-shape {
    top:-120px;
    right:-20px;
    width:180px;
    transform:scaleX(-1) rotate(5deg);
  }
  .et-opportunities-block .et-opt-image-frame {
    min-height:clamp(300px, 60vw, 520px);
  }
}

/* Fallback manual (dacă vrei forțare explicită) */
.et-opportunities-block.et-opt-force-stack .et-opt-grid {
  grid-template-columns:1fr !important;
}

/* 9. Reduced Motion */
@media (prefers-reduced-motion:reduce){
  .et-opportunities-block .et-opt-faq-answer {
    transition:none !important;
    height:auto !important;
    opacity:1 !important;
  }
  .et-opportunities-block .et-opt-faq-arrow::before,
  .et-opportunities-block .et-opt-faq-arrow::after {
    transition:none !important;
  }
}