/* ==========================================================================
   Grupo API · Plantilla base
   Design System: docs/data/estilos_grupoapi.md
   Paleta real grupoapi.es: #001B44 / #E62773 / #FF408C sobre #E1EDFF
   Tipografía: DM Sans (headings) + Inter (body)
   ========================================================================== */

:root {
  /* Marca (grupoapi.es real) */
  --navy: #001b44;
  --brand: #e62773;
  --brand-hover: #cc0d59;
  --accent: #ff408c;

  /* Neutros (grupoapi.es real) */
  --bg: #e1edff;
  --bg-soft: #f5f9ff;
  --surface: #ffffff;
  --text: #464646;
  --muted: rgba(70, 70, 70, 0.68);
  --border: #b3c7e5;

  /* Divisiones (color coding web real) */
  --badge-color: var(--brand);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-btn: 8px;
  --radius-card: 12px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-menu: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --container-max: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.container {
  width: min(var(--container-max), 100% - 32px);
  margin: 0 auto;
}

/* ---------- Header / Nav ---------- */

header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: var(--navy);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: height 0.3s ease, font-size 0.3s ease;
}

nav.scrolled {
  height: 60px;
  font-size: 15px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  text-decoration: none;
  transition: font-size 0.3s ease;
}

.logo span {
  color: var(--accent);
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
  transition: height 0.3s ease;
}

nav.scrolled .logo {
  font-size: 1rem;
}

nav.scrolled .logo img {
  height: 32px;
}

.menu {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: center;
}

.menu a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.menu a:hover {
  color: var(--accent);
}

/* ---------- Hero ---------- */
/* ==========================================================================
   Grupo API · Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 760px;
  padding: 150px 0 90px;
  overflow: hidden;
  background:
    linear-gradient(
      110deg,
      #001b44 0%,
      #002653 48%,
      #00366b 100%
    );
  color: #fff;
  text-align: left;
  background-image: url('/assets/images/header_background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(
      circle at 82% 45%,
      rgba(255, 64, 140, 0.18) 0,
      rgba(255, 64, 140, 0.08) 20%,
      transparent 48%
    );
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 45%,
    black 100%
  );
}

.hero-container {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 70px;
  align-items: center;
}

/* ---------- Content ---------- */

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 680px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  color: #ff408c;
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  background: #ff408c;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 6vw, 5.6rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.055em;
}

.hero h1 span {
  color: #ff408c;
}

.hero-description {
  max-width: 590px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, .78);
  font-family: var(--font-family);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 400;
  line-height: 1.75;
}

/* ---------- Actions ---------- */

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.hero .btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 25px;
  border-radius: 7px;
  font-family: var(--font-family);
  font-size: .9rem;
  font-weight: 650;
  letter-spacing: -.01em;
}

.hero .btn ion-icon {
  font-size: 1.1rem;
  transition: transform .25s ease;
}

.hero .btn-primary:hover ion-icon {
  transform: translateX(4px);
}

/* ---------- Stats ---------- */

.hero-stats {
  display: flex;
  align-items: stretch;
  margin-top: 58px;
  padding-top: 25px;
  border-top: 1px solid rgba(255,255,255,.16);
}

.hero-stat {
  min-width: 145px;
  padding: 0 28px;
  border-left: 1px solid rgba(255, 255, 255, .16);
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

.hero-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-stat strong {
  display: block;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.hero-stat:first-child strong {
  font-size: 2rem;
}

.hero-stat span {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,.55);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ---------- Visual ---------- */

.hero-visual {
  position: relative;
  height: 510px;
}

.hero-image-wrapper {
  position: absolute;
  inset: 15px 0 15px 45px;
  overflow: hidden;
  border-radius: 4px 70px 4px 70px;
  background: #082b56;
  box-shadow:
    0 30px 70px rgba(0,0,0,.28),
    0 0 0 1px rgba(255,255,255,.08);
}

.hero-image-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(0,27,68,.15),
      rgba(0,27,68,.42)
    );
}

.hero-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(.85);
}

.hero-accent {
  position: absolute;
  z-index: -1;
  background: #e62773;
}

.hero-accent-top {
  top: -5px;
  right: -12px;
  width: 105px;
  height: 105px;
  border-radius: 0 0 0 35px;
}

.hero-accent-bottom {
  bottom: -5px;
  left: 10px;
  width: 85px;
  height: 85px;
  border-radius: 0 35px 0 0;
}

/* ---------- Floating cards ---------- */

.hero-floating-card {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 19px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 40px rgba(0,0,0,.2);
  color: var(--navy);
  backdrop-filter: blur(12px);
}

.hero-floating-card ion-icon {
  flex: 0 0 auto;
  padding: 9px;
  border-radius: 8px;
  background: rgba(230,39,115,.1);
  color: var(--brand);
  font-size: 1.3rem;
}

.hero-floating-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-floating-card span {
  display: block;
  margin-top: 3px;
  color: #687384;
  font-size: .7rem;
  line-height: 1.3;
}

.hero-card-top {
  top: 55px;
  left: 0;
}

.hero-card-bottom {
  right: -25px;
  bottom: 55px;
}

/* ---------- Scroll ---------- */

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.5);
  font-family: var(--font-family);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: color .2s ease;
}

.hero-scroll ion-icon {
  font-size: 1rem;
  animation: hero-scroll 1.8s ease-in-out infinite;
}

.hero-scroll:hover {
  color: #fff;
}

@keyframes hero-scroll {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(5px);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .hero {
    min-height: auto;
    padding: 135px 0 80px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .hero-content {
    max-width: 760px;
  }

  .hero-visual {
    width: min(100%, 650px);
    height: 430px;
    margin: 0 auto;
  }

  .hero-image-wrapper {
    inset: 10px 35px 10px 35px;
  }

  .hero-card-top {
    left: 0;
  }

  .hero-card-bottom {
    right: 0;
  }

  .hero-scroll {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 115px 0 55px;
  }

  .hero-container {
    gap: 45px;
  }

  .hero-kicker {
    margin-bottom: 19px;
    font-size: .7rem;
  }

  .hero-kicker::before {
    width: 28px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
    line-height: 1;
  }

  .hero-description {
    margin-top: 22px;
    font-size: .96rem;
    line-height: 1.65;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 28px;
  }

  .hero .btn {
    width: 100%;
  }

  .hero-stats {
    margin-top: 42px;
  }

  .hero-stat {
    min-width: 0;
    flex: 1;
    padding: 0 12px;
  }

  .hero-stat:first-child {
    padding-left: 0;
  }

  .hero-stat strong {
    font-size: .9rem;
  }

  .hero-stat:first-child strong {
    font-size: 1.6rem;
  }

  .hero-stat span {
    font-size: .65rem;
  }

  .hero-visual {
    height: 330px;
  }

  .hero-image-wrapper {
    inset: 5px 20px 5px 20px;
    border-radius: 3px 45px 3px 45px;
  }

  .hero-floating-card {
    padding: 10px 12px;
    gap: 8px;
  }

  .hero-floating-card ion-icon {
    padding: 7px;
    font-size: 1rem;
  }

  .hero-floating-card strong {
    font-size: .68rem;
  }

  .hero-floating-card span {
    font-size: .58rem;
  }

  .hero-card-top {
    top: 25px;
    left: 0;
  }

  .hero-card-bottom {
    right: 0;
    bottom: 25px;
  }

  .hero-accent-top {
    width: 65px;
    height: 65px;
  }

  .hero-accent-bottom {
    width: 55px;
    height: 55px;
  }
}

/* ---------- Secciones ---------- */

section {
  padding: 80px 0;
  scroll-margin-top: 70px;
}

section:not(.hero) + section:not(.hero) {
  border-top: 1px solid var(--border);
}

/* Alternancia de fondos claros: surface (blanco) ↔ bg-soft.
   Hero y footer son oscuros y quedan fuera de la alternancia. */
#servicios { background: var(--surface); }
#proyectos { background: var(--bg-soft); }
#sectores { background: var(--surface); }
#equipo { background: var(--bg-soft); }
#sobre-api { background: var(--surface); }
#contacto { background: var(--bg-soft); }

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: clamp(1.75rem, 4vw, 2rem);
  font-weight: 700;
}

.section-title p {
  color: var(--muted);
  margin-top: 0.5rem;
}

.section-title p::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* ---------- Servicios: divisiones (anillo) + catálogo ---------- */

#servicios .div-layout {
  margin-bottom: 8px;
}

.div-head {
  text-align: left;
  margin-bottom: 40px;
}

.div-head h2 {
  color: #0b2a4a;
  font-size: clamp(1.75rem, 3.5vw, 2rem);
  font-weight: 700;
}

.div-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "tech ring soft"
    "media ring arch";
  gap: 32px 40px;
  align-items: center;
}

.div-ring {
  grid-area: ring;
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  flex-shrink: 0;
}

.div-ring svg {
  width: 100%;
  height: 100%;
  display: block;
}

.div-node {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.div-node ion-icon {
  font-size: 1.15rem;
}

.div-node--tl { left: 20%; top: 20%; border-color: #3cb878; color: #3cb878; }
.div-node--tr { left: 80%; top: 20%; border-color: #ec1e79; color: #ec1e79; }
.div-node--br { left: 80%; top: 80%; border-color: #f5a623; color: #f5a623; }
.div-node--bl { left: 20%; top: 80%; border-color: #4a9fe0; color: #4a9fe0; }

.div-block h3 {
  color: #0b2a4a;
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.div-block p {
  color: #5a6472;
  font-size: 0.875rem;
  line-height: 1.5;
}

.div-block--tech { grid-area: tech; text-align: right; }
.div-block--soft { grid-area: soft; text-align: left; }
.div-block--media { grid-area: media; text-align: right; }
.div-block--arch { grid-area: arch; text-align: left; }

@media (max-width: 768px) {
  .div-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "ring"
      "tech"
      "soft"
      "media"
      "arch";
    gap: 28px;
  }

  .div-ring {
    width: 140px;
    height: 140px;
  }

  .div-node {
    width: 32px;
    height: 32px;
  }

  .div-node ion-icon {
    font-size: 1rem;
  }

  .div-block {
    text-align: center;
  }
}

/* ---------- Cards / Flex (las filas incompletas quedan centradas) ---------- */

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.grid.cards > * {
  flex: 1 1 300px;
  max-width: 380px;
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 12px 0 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.card-icon {
  font-size: 1.75rem;
  color: var(--badge-color, var(--brand));
  display: block;
  margin-bottom: 12px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 4px;
}

ion-icon {
  vertical-align: middle;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--badge-color);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease-in-out;
}

.btn-primary {
  background-color: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 39, 115, 0.25);
}

.btn-outline {
  background-color: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline:hover {
  background-color: var(--brand);
  color: #fff;
}

.hero .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.hero .btn-outline:hover {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}

/* ---------- Divisiones / Sectores / Proyectos ---------- */

.about-grid > * {
  flex: 1 1 320px;
  max-width: 560px;
  min-width: 0;
}

.check-list {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text);
}

.check-list ion-icon {
  color: var(--brand);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.service-list {
  list-style: disc;
  padding-left: 1.2rem;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
  font-size: 0.95rem;
}

.example {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.disclaimer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.admin-strip {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.admin-pill {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  background: rgba(230, 39, 115, 0.08);
  border: 1px solid rgba(230, 39, 115, 0.2);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
}

.grid.projects > * {
  flex: 1 1 260px;
  max-width: 360px;
  min-width: 0;
}

.card.project img{
  margin-bottom: 1.5rem;
}

.card.project h3 {
  font-size: 1.05rem;
}

/* ---------- Contacto (sin formulario; fondo oscuro según alternancia, ver arriba) ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: stretch;
}

.contact-card h3 {
  margin-bottom: 1rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text);
}

.contact-list ion-icon {
  font-size: 1.3rem;
  color: var(--brand);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-list a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-list a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.contact-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.map-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  min-height: 350px;
  background: var(--bg);
}

.map-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Página legal ---------- */

.legal-page {
  padding-top: 160px;
  background: var(--bg);
}

.legal {
  max-width: 820px;
}

.legal .card {
  padding: 32px;
}

.legal h2 {
  font-size: 1.15rem;
  margin: 1.8rem 0 0.6rem;
}

.legal .card > h2:first-of-type {
  margin-top: 0;
}

.legal p,
.legal li {
  font-size: 0.95rem;
  color: var(--text);
}

.legal p {
  margin-bottom: 0.8rem;
}

.legal ul {
  padding-left: 1.2rem;
  margin-bottom: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal h3 {
  font-size: 1rem;
  margin: 1.2rem 0 0.4rem;
}

.legal-data {
  list-style: none;
  padding-left: 0;
}

.legal-data a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.legal-data a:hover {
  text-decoration: underline;
}

.legal address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.legal address a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.legal address a:hover {
  text-decoration: underline;
}

/* ---------- Footer ---------- */

footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 50px 0;
  text-align: center;
}

footer .footer-tech {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

footer .footer-tech ion-icon {
  color: var(--accent);
  font-size: 1.1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  text-align: left;
  align-items: start;
  margin-bottom: 24px;
}

.footer-brand .logo {
  margin-bottom: 8px;
}

.footer-brand .logo img {
  height: 44px;
}

.footer-legal {
  margin-top: 4px;
  font-size: 0.85rem;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.footer-contact ion-icon {
  color: var(--accent);
}

.footer-contact a,
.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-contact a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
}

/* ---------- Hamburguesa / móvil ---------- */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   EQUIPO
   ========================================================= */

.team-section {
  padding: 110px 0;
  background: var(--surface, #ffffff);
}

.team-header {
  max-width: 760px;
  margin-bottom: 55px;
}

.team-header .section-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--brand, #e62773);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-header h2 {
  margin: 0;
  color: var(--navy, #001b44);
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.team-header .section-description {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--text-muted, #68758a);
  font-size: 1.05rem;
  line-height: 1.7;
}


/* ---------------------------------------------------------
   Layout principal
   --------------------------------------------------------- */

.team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 70px;
  align-items: center;
}


/* ---------------------------------------------------------
   Imagen
   --------------------------------------------------------- */

.team-image {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--navy, #001b44);
}

.team-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      transparent 45%,
      rgba(0, 27, 68, 0.82) 100%
    );
  pointer-events: none;
}

.team-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.team-image-caption {
  position: absolute;
  z-index: 2;
  right: 30px;
  bottom: 28px;
  left: 30px;

  display: flex;
  flex-direction: column;
  gap: 5px;
}

.team-image-caption-label {
  color: var(--accent, #ff408c);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.team-image-caption-text {
  color: #ffffff;
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 1.15rem;
  font-weight: 600;
}


/* ---------------------------------------------------------
   Contenido
   --------------------------------------------------------- */

.team-content {
  max-width: 560px;
}

.team-intro {
  margin-bottom: 38px;
}

.team-intro h3 {
  margin: 0 0 15px;
  color: var(--navy, #001b44);
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.team-intro p {
  margin: 0;
  color: var(--text, #464646);
  font-size: 1rem;
  line-height: 1.75;
}


/* ---------------------------------------------------------
   Áreas del equipo
   --------------------------------------------------------- */

.team-areas {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.team-area {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border, #b3c7e5);
}

.team-area:last-child {
  border-bottom: 1px solid var(--border, #b3c7e5);
}

.team-area-icon {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 3px;
}

.team-area-icon span {
  color: var(--brand, #e62773);
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.team-area-content h4 {
  margin: 0 0 6px;
  color: var(--navy, #001b44);
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.team-area-content p {
  margin: 0;
  color: var(--text-muted, #68758a);
  font-size: 0.92rem;
  line-height: 1.6;
}


/* ---------------------------------------------------------
   Métricas
   --------------------------------------------------------- */

.team-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 80px;
  padding-top: 45px;
  border-top: 1px solid var(--border, #b3c7e5);
}

.team-stat {
  position: relative;
  padding: 0 35px;
}

.team-stat:first-child {
  padding-left: 0;
}

.team-stat:last-child {
  padding-right: 0;
}

.team-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  width: 1px;
  height: 55px;
  background: var(--border, #b3c7e5);
}

.team-stat strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy, #001b44);
  font-family: var(--font-heading, 'DM Sans', sans-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.team-stat span {
  display: block;
  color: var(--text-muted, #68758a);
  font-size: 0.85rem;
  line-height: 1.4;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1000px) {

  .team-section {
    padding: 85px 0;
  }

  .team-layout {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .team-image {
    min-height: 450px;
  }

  .team-image img {
    min-height: 450px;
  }

  .team-content {
    max-width: 700px;
  }

  .team-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 35px 0;
  }

  .team-stat:nth-child(2)::after {
    display: none;
  }

  .team-stat:nth-child(3) {
    padding-left: 0;
  }
}


@media (max-width: 600px) {

  .team-section {
    padding: 70px 0;
  }

  .team-header {
    margin-bottom: 40px;
  }

  .team-header h2 {
    font-size: 2.15rem;
  }

  .team-layout {
    gap: 35px;
  }

  .team-image {
    min-height: 350px;
    border-radius: 18px;
  }

  .team-image img {
    min-height: 350px;
  }

  .team-image-caption {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }

  .team-stats {
    grid-template-columns: 1fr 1fr;
    margin-top: 55px;
    padding-top: 35px;
  }

  .team-stat {
    padding: 0 15px;
  }

  .team-stat:nth-child(odd) {
    padding-left: 0;
  }

  .team-stat:nth-child(even) {
    padding-right: 0;
  }

  .team-stat:not(:last-child)::after {
    display: none;
  }

  .team-stat strong {
    font-size: 2rem;
  }

  .team-stat span {
    font-size: 0.8rem;
  }
}
/* ---------- Lazy loading ---------- */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}

/* ---------- Selector de idiomas ---------- */

.lang-switch {
  display: none;
}

.lang-switch.is-supported {
  display: block;
  position: relative;
}

.lang-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.lang-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-menu);
  z-index: 100;
}

.lang-switch.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown .lang-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 10px 20px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  width: 100%;
}

.lang-dropdown .lang-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.lang-dropdown .lang-btn.active {
  color: var(--brand);
  font-weight: 600;
  background: rgba(230, 39, 115, 0.08);
  border-left: 3px solid var(--brand);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }

  .menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    z-index: 150;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
  }

  nav#main-menu.scrolled .menu {
    top: 60px;
  }

  .menu.open {
    display: flex;
    max-height: 500px;
    padding: 20px 0;
  }

  .menu a {
    width: 100%;
    text-align: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .menu.open a {
    opacity: 1;
    transform: translateY(0);
  }

  .menu a:nth-child(1) { transition-delay: 0.05s; }
  .menu a:nth-child(2) { transition-delay: 0.10s; }
  .menu a:nth-child(3) { transition-delay: 0.15s; }
  .menu a:nth-child(4) { transition-delay: 0.20s; }
  .menu a:nth-child(5) { transition-delay: 0.25s; }
  .menu a:nth-child(6) { transition-delay: 0.30s; }
  .menu a:nth-child(7) { transition-delay: 0.35s; }

  .menu a:last-child {
    border-bottom: none;
  }

  .lang-switch.is-supported {
    margin: 15px auto;
    display: flex;
    justify-content: center;
  }

  .lang-dropdown {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }

  .lang-switch.open .lang-dropdown {
    transform: translateX(-50%) translateY(0);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .map-wrapper {
    min-height: 320px;
    aspect-ratio: 16 / 9;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-contact p {
    justify-content: center;
  }

  .footer-links {
    align-items: center;
  }
}
