/* Uniball BCN — Our Team page
   ----------------------------------
   Bold typography, balanced spacing,
   stable Jotform embed, & 50px gap between avatar and text.
*/

/* ===== Base section headers ===== */
.fb-head h2 {
  position: relative;
  margin: 0 0 8px;
  font: 900 1.45rem/1.15 system-ui, Segoe UI, Inter, Arial;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #0e2a3d;
}
.fb-head h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #119DB8, #0e2a3d);
}
.fb-head p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-weight: 600;
}

/* ===== Hero emphasis ===== */
.fb-hero .fb-hero__overlay h1 {
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.fb-hero .fb-hero__overlay p {
  font-weight: 700;
  text-shadow: 0 1px 12px rgba(0,0,0,.28);
}
@media (min-width: 900px) {
  .fb-hero .fb-hero__overlay h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
  .fb-hero .fb-hero__overlay p { font-size: clamp(1rem, 1.6vw, 1.25rem); }
}

/* ===== Decorative Orbs Background ===== */
.has-orbs { position: relative; }
.has-orbs .wrap { position: relative; z-index: 1; }
.has-orbs .bg-orbs {
  position: absolute;
  inset: -80px 0 auto 0;
  height: 420px;
  pointer-events: none;
  z-index: 0;
  filter: blur(18px);
  opacity: .55;
  mix-blend-mode: screen;
  background:
    radial-gradient(180px 180px at 12% 40%, rgba(17,157,184,.28), transparent 60%),
    radial-gradient(220px 220px at 84% 28%, rgba(8,28,52,.28), transparent 62%),
    radial-gradient(160px 160px at 52% 70%, rgba(17,157,184,.20), transparent 58%);
  animation: orbs-float 14s ease-in-out infinite alternate;
}
.fb-hero.has-orbs .bg-orbs {
  inset: 0;
  height: 100%;
  opacity: .4;
  filter: blur(22px);
}
@keyframes orbs-float {
  0% { transform: translateY(0) translateX(0) scale(1); }
  100% { transform: translateY(-16px) translateX(6px) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .has-orbs .bg-orbs { animation: none; }
}

/* ===== Founders card ===== */
.founders .founders-card {
  width: min(100%, 980px);
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  transform: translateY(8px);
  opacity: 0;
  transition: transform .5s ease, opacity .5s ease;
}
.founders .founders-card.in { transform: none; opacity: 1; }
.founders .founders-card p {
  margin: 0;
  color: #21465b;
  font-weight: 650;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ===== Team grid (2-per-row layout) ===== */
.team-grid { gap: 26px; }

/* Container grid: 2 cards per row, responsive to 1 on smaller screens */
.fb-grid.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  align-items: stretch;
}

/* Cards */
.team-card {
  display: grid;
  grid-template-columns: 160px 1fr; /* bigger avatar column */
  align-items: start;
  gap: 50px; /* ✅ 50px space between avatar & text */
  padding: 22px 24px 20px;
  transform: translateY(8px);
  opacity: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
  transition: transform .5s ease, opacity .5s ease, box-shadow .25s ease, translate .25s ease;
  height: 100%;
}
.team-card.in { transform: none; opacity: 1; }
.team-card:hover {
  box-shadow: 0 20px 42px rgba(0,0,0,.12);
  translate: 0 -3px;
}

/* Avatar */
.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2px solid rgba(17,157,184,.35);
  background: linear-gradient(135deg, #eaf7fb, #ffffff);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #0e2a3d;
  flex-shrink: 0;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar.fallback::after {
  content: attr(data-initials);
  font: 900 1.2rem/1 system-ui, Segoe UI, Inter;
}

/* Copy blocks */
.team-card .fb-card__body { padding: 6px 4px 8px; }
.team-card h3 {
  margin: 0 0 6px;
  font: 1000 1.25rem/1.25 system-ui, Segoe UI, Inter;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #0e2a3d;
}
.team-card .role {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .25px;
  color: #0e2a3d;
  background: linear-gradient(180deg, rgba(17,157,184,.16), rgba(17,157,184,.08));
  border: 1px solid rgba(17,157,184,.35);
}
.team-card .bio {
  margin: 0 0 18px;
  color: #274f66;
  font-weight: 600;
  line-height: 1.55;
}
.team-card .links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.team-card .btn,
.team-card .btn-outline {
  font-weight: 800;
  letter-spacing: .25px;
  padding: 10px 14px;
  border-radius: 10px;
  min-height: 42px;
}

/* ===== Work with us (Form Card) ===== */
.form-card {
  width: min(100%, 1000px);
  margin: 40px auto 0;
  border-radius: var(--radius);
  background: var(--paper);
  position: relative;
  overflow: visible;
  box-shadow: 0 10px 34px rgba(0,0,0,.10);
  border: 1px solid var(--line);
  transform: translateY(10px);
  opacity: 0;
  transition: transform .6s ease, opacity .6s ease, box-shadow .25s ease;
  isolation: isolate;
}
.form-card.in { transform: translateY(0); opacity: 1; }
.form-card:hover { box-shadow: 0 16px 42px rgba(0,0,0,.14); }

.form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, rgba(17,157,184,.28), rgba(8,28,52,.28), rgba(17,157,184,.28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: border-pan 6s linear infinite;
}
@keyframes border-pan { to { background-position: 200% 0; } }

.form-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fcff, #fff);
}
.form-card__head .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan, #119DB8);
  box-shadow: 0 0 0 0 rgba(17,157,184,.5);
  animation: ping 2.2s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(17,157,184,.45); }
  70% { box-shadow: 0 0 0 10px rgba(17,157,184,0); }
  100% { box-shadow: 0 0 0 0 rgba(17,157,184,0); }
}
.form-card__head h3 {
  margin: 0;
  font: 900 1.05rem/1.1 system-ui, Segoe UI, Inter;
  text-transform: uppercase;
}
.form-card__head p { margin: 2px 0 0; color: var(--ink-2); }
.form-card__body { padding: 12px 12px 0; overflow: visible; }
.form-card__body iframe {
  display: block;
  width: 100% !important;
  border: 0;
  min-height: 820px; /* ensures form always visible */
}
.form-card__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

/* ===== FAQ ===== */
.faq-grid { display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transform: translateY(8px);
  opacity: 0;
  transition: transform .5s ease, opacity .5s ease;
}
.faq-item.in { transform: none; opacity: 1; }
.faq-item > summary {
  cursor: pointer;
  font-weight: 1000;
  text-transform: uppercase;
  color: #0e2a3d;
  list-style: none;
  letter-spacing: .2px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > p { color: #274f66; margin: 10px 0 0; font-weight: 600; }

.map-embed {
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-embed iframe { width: 100%; height: 360px; display: block; }
.form-note { margin: 6px 0 0; color: var(--muted); }

/* ===== Documents CTA ===== */
.documents-cta .doc-cta { display: flex; justify-content: center; }
.documents-cta .doc-cta .btn { min-width: 220px; font-weight: 900; }

/* ===============================
   Global layout spacing fixes
   =============================== */

/* Side padding so content isn't glued to edges */
.fb-events .wrap,
.fb-hero__overlay {
  padding-left: clamp(16px, 4vw, 36px);
  padding-right: clamp(16px, 4vw, 36px);
}

/* Section spacing between blocks */
.fb-events {
  padding-top: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 56px);
}

/* Ensure FAQ has breathing room above footer */
.fb-events.faq {
  padding-bottom: clamp(60px, 6vw, 110px);
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  .founders .founders-card,
  .team-card,
  .form-card,
  .faq-item {
    transition: none;
    transform: none !important;
  }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .fb-grid.team-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .team-card {
    grid-template-columns: 100px 1fr;
    gap: 28px;
    padding: 16px;
  }
  .avatar {
    width: 100px;
    height: 100px;
  }
}

/* ======================================
   Unified section background (Founders + Our Team)
   ====================================== */

/* Founders & Our Team full-section background */
.fb-events.founders,
.fb-events.team-section {
  position: relative;
  padding-top: clamp(56px, 6vw, 90px);
  padding-bottom: clamp(56px, 6vw, 90px);
  background:
    linear-gradient(
      180deg,
      rgba(17,157,184,0.08) 0%,
      rgba(17,157,184,0.05) 45%,
      rgba(255,255,255,0) 100%
    );
}

/* Soft separators */
.fb-events.founders::before,
.fb-events.team-section::before,
.fb-events.founders::after,
.fb-events.team-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
}

.fb-events.founders::before,
.fb-events.team-section::before {
  top: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(14,42,61,.18),
    transparent
  );
}

.fb-events.founders::after,
.fb-events.team-section::after {
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(14,42,61,.10),
    transparent
  );
}

/* Header spacing inside tinted sections */
.fb-events.founders .fb-head,
.fb-events.team-section .fb-head {
  margin-bottom: 36px;
}

/* Ensure cards sit cleanly on tinted background */
.fb-events.founders .founders-card,
.fb-events.team-section .team-card {
  background: #fff;
}

/* Slight visual emphasis for headers in these sections */
.fb-events.founders .fb-head h2,
.fb-events.team-section .fb-head h2 {
  letter-spacing: 0.6px;
}
