/* =========================================================
   TEAM.CSS (COMPLETO)
   Compatible con:
   - HTML viejo: .team-cta .overlay > .team-cta-panel
   - HTML nuevo: .team-shell / .team-shell-inner / .team-block--cta
   ========================================================= */

/* ===========================
   BASE / SAFETY OVERRIDES
   =========================== */

/* Evita que estilos globales de <a> rompan el CTA */
a#team-cta-button,
.team-cta a.cta-button,
.team-block--cta a.cta-button {
  text-decoration: none !important;
}

/* Evita overflow horizontal (width: 100% + padding) */
nav,
.overlay,
.team-shell {
  box-sizing: border-box;
}

/* ===========================
   HERO
   =========================== */

.team-hero .overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(52px, 7vw, 96px) clamp(18px, 6vw, 64px);
}

.team-intro {
  max-width: 960px;
  margin: 0 auto;
}

.team-intro .section-title {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1.15;
}

.team-intro .intro-tagline {
  margin-top: 12px;
  color: #dfe6ff;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .team-hero .overlay {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 72px 16px 60px;
  }
  .team-intro {
    max-width: min(520px, 92vw);
    margin: 0 auto;
    padding: 0 4px;
    text-align: center;
  }
  .team-intro .section-title,
  .team-intro .intro-tagline {
    text-align: center;
  }
}


/* ===========================
   SHELL (HTML nuevo)
   =========================== */

.team-shell {
  width: 100%;
  box-sizing: border-box;
  padding: clamp(18px, 4vw, 40px) clamp(16px, 4vw, 42px);
}

/* Override legacy #equipo styles from style.css (index section) */
main#equipo.team-shell {

  background:
    radial-gradient(60% 70% at 20% 30%, rgba(0,195,255,0.18), transparent 60%),
    radial-gradient(60% 70% at 80% 35%, rgba(72, 151, 253, 0.16), transparent 62%),
    linear-gradient(135deg, #2c2f3d 0%, #07162a 45%, #163b9a 100%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 28px 70px rgba(0,0,0,0.55);
  color: #f6f8ff;
}

.team-shell-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.team-block {
  margin-top: clamp(14px, 2.5vw, 22px);
}

.team-block:first-child {
  margin-top: 0;
}

.team-block--grid {
  padding: clamp(16px, 3vw, 26px);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(0,195,255,0.14), rgba(26,126,255,0.08));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
}

.team-block--grid .why-subtitle {
  color: rgba(233,238,255,0.88);
}


/* ===========================
   TEAM GRID
   =========================== */

.team-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 1100px;
  margin: 24px auto 0;
}

.team-grid .team-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 16px;
  color: #e9ebff;
  box-shadow: 0 14px 32px rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
  text-align: left;
}

.team-grid .team-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #ffffff;
}

.team-grid .team-card p {
  margin: 0;
  color: #cfd9ff;
  line-height: 1.5;
}


/* ===========================
   CTA "HABLEMOS" – BLUE ONLY
   (funciona en HTML viejo y nuevo)
   =========================== */

/* Soporte para ambos contenedores */
.team-cta,
.team-block--cta {
  padding: clamp(18px, 3vw, 36px) 0;
}

/* Fondo / marco si existe overlay (HTML viejo) */
.team-cta .overlay {
  padding: clamp(22px, 3.5vw, 52px) clamp(18px, 4vw, 42px);
  text-align: center;

  background:
    radial-gradient(60% 70% at 20% 30%, rgba(0,195,255,0.18), transparent 60%),
    radial-gradient(60% 70% at 80% 35%, rgba(26,126,255,0.16), transparent 62%),
    linear-gradient(135deg, #070a18 0%, #07162a 45%, #061029 100%);

  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 28px 70px rgba(0,0,0,0.55);
}

/* Fondo / marco si NO hay overlay (HTML nuevo team-block--cta) */
.team-block--cta {
  text-align: center;

  background:
    radial-gradient(60% 70% at 20% 30%, rgba(0,195,255,0.18), transparent 60%),
    radial-gradient(60% 70% at 80% 35%, rgba(26,126,255,0.16), transparent 62%),
    linear-gradient(135deg, #070a18 0%, #07162a 45%, #061029 100%);

  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 28px 70px rgba(0,0,0,0.55);

  /* separa el marco del panel interior */
  padding: clamp(16px, 2.8vw, 26px);
}

/* Panel glass interno (ambos) */
.team-cta .team-cta-panel,
.team-block--cta .team-cta-panel {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px) clamp(16px, 3.5vw, 32px);
  text-align: center;

  border-radius: 18px;
  background: linear-gradient(120deg, rgba(0,195,255,0.18), rgba(26,126,255,0.14));
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 20px 45px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
}

/* Mata la rayita violeta SOLO en el CTA */
.team-cta .section-title::after,
.team-block--cta .section-title::after,
#team-cta-title.section-title::after {
  display: none !important;
}

/* Quita la rayita debajo de "Nuestro equipo" */
#team-heading.section-title::after {
  display: none !important;
}

/* Título CTA */
.team-cta .team-cta-panel .section-title,
.team-block--cta .team-cta-panel .section-title,
#team-cta-title.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #f6f8ff;
}

/* Subtítulo CTA (evita que quede oscuro por estilos globales) */
.team-cta .why-subtitle,
.team-block--cta .why-subtitle,
#team-cta-text {
  color: rgba(233,238,255,0.88) !important;
  max-width: 820px;
  margin: 0 auto 16px;
  line-height: 1.55;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
}

/* Botón CTA (evita link azul) */
.team-cta a.cta-button,
.team-block--cta a.cta-button,
a#team-cta-button.cta-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0;

  margin-top: 12px;
  padding: 14px clamp(32px, 8vw, 60px);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);

  background: linear-gradient(120deg, #00d1ff 0%, #7b2ff7 100%) !important;
  color: #0b0620 !important;

  font-weight: 800;
  letter-spacing: 0.2px;
  text-decoration: none !important;

  box-shadow: 0 16px 36px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.12);

  transition: transform 150ms ease, box-shadow 180ms ease, filter 180ms ease, background-position 220ms ease;
  background-size: 200% 200%;
  background-position: 0% 50%;
  position: relative;
}

/* Cuadradito del botón */
.team-cta a.cta-button::after,
.team-block--cta a.cta-button::after,
a#team-cta-button.cta-button::after {
  content: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(6, 16, 34, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28);
  display: inline-block;
  flex: 0 0 14px;
}

.team-cta a.cta-button:hover,
.team-block--cta a.cta-button:hover,
a#team-cta-button.cta-button:hover {
  filter: saturate(1.05);
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(0,0,0,0.45), 0 0 0 1px rgba(123,191,255,0.45);
  background: linear-gradient(120deg, #7b2ff7 0%, #00d1ff 100%) !important;
}

.team-cta a.cta-button:active,
.team-block--cta a.cta-button:active,
a#team-cta-button.cta-button:active {
  transform: translateY(-1px);
}


/* ===========================
   CTA "TRABAJÁ CON NOSOTROS"
   =========================== */

.team-credibility-card {
  margin: clamp(14px, 2.5vw, 22px) auto 0;
  max-width: 1100px;

  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;

  padding: clamp(14px, 2.8vw, 22px);
  border-radius: 18px;

  text-align: left;
  color: #f6f8ff;
  background: linear-gradient(120deg, rgba(0,195,255,0.16), rgba(26,126,255,0.10));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);

  transition: box-shadow 150ms ease, transform 150ms ease, border-color 150ms ease;
}

.team-credibility-card:hover {
  box-shadow: 0 26px 60px rgba(0,0,0,0.52);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.team-credibility-card .cred-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
}

.team-credibility-card .cred-icon svg rect,
.team-credibility-card .cred-icon svg path {
  stroke: rgba(246,248,255,0.88);
}

.team-credibility-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #ffffff;
}

.team-credibility-card p {
  margin: 0 0 10px;
  color: rgba(233,238,255,0.88);
  line-height: 1.6;
}

.team-credibility-card .cred-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #00d1ff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}

.team-credibility-card .cred-email:hover {
  color: #7b2ff7;
  border-color: rgba(123,47,247,0.5);
}


/* ===========================
   BACK BUTTON
   =========================== */

.back-btn {
  position: fixed;
  top: calc(var(--header-height, 72px) + 8px);
  left: 12px;
  z-index: 80;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: 999px;

  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.2);
  color: #f4f6ff;

  text-decoration: none;
  font-weight: 700;

  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);

  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.45);
  border-color: rgba(0,195,255,0.7);
}


/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 720px) {
  .team-credibility-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .team-credibility-card .cred-icon {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 640px) {
  .back-btn {
    top: calc(var(--header-height, 110px) + 6px);
    left: 10px;
    padding: 9px 12px;
  }

  .team-shell {
    padding: clamp(16px, 5vw, 28px) clamp(14px, 5vw, 22px);
  }
}
