/* ===== Variables ===== */
:root {
  --color-primary: #1f5f8b;
  --color-primary-dark: #164766;
  --color-accent: #f2a541;
  --color-accent-dark: #a65b0a;   /* acento legible sobre fondo blanco */
  --color-accent-light: #ffd28a;  /* acento legible sobre fondo azul */
  --color-text: #2b2d42;
  --color-muted: #5c6378;
  --color-bg: #ffffff;
  --color-bg-alt: #f3f7fa;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(31, 95, 139, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

/* Evita que el encabezado fijo tape el título al saltar a una sección */
section,
#equipo {
  scroll-margin-top: 80px;
}

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Contorno visible al navegar con teclado */
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-primary-dark);
  outline-offset: 3px;
}

.hero a:focus-visible,
.contact a:focus-visible,
.footer a:focus-visible {
  outline-color: #fff;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Botones ===== */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #1d1d1d;
  font-weight: 700;
  border: 2px solid var(--color-accent);
  transition: transform 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--small {
  padding: 8px 18px;
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

/* ===== Encabezado ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 600;
}

.nav a:not(.btn):hover {
  color: var(--color-primary);
}

/* ===== Portada ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 90px 0 150px;
}

/* Círculos decorativos de fondo */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 520px;
  height: 520px;
  top: -220px;
  right: -160px;
  background: rgba(255, 255, 255, 0.06);
}

.hero::after {
  width: 260px;
  height: 260px;
  bottom: 40px;
  left: -120px;
  border: 40px solid rgba(242, 165, 65, 0.12);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

/* Imagen con un marco de color desplazado detrás */
.hero__media {
  position: relative;
}

.hero__media::before {
  content: "";
  position: absolute;
  inset: 24px -18px -18px 24px;
  border-radius: 20px;
  background: var(--color-accent);
  opacity: 0.9;
}

.hero__img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.hero__wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 90px;
  fill: var(--color-bg);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-accent-light);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 20px;
}

.hero__text {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== Secciones ===== */
.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__title {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section__intro {
  color: var(--color-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

/* ===== Tarjetas de servicios ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(31, 95, 139, 0.1);
  color: var(--color-primary);
  margin-bottom: 18px;
}

.card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--color-muted);
}

/* ===== Nosotros ===== */
.about {
  max-width: 820px;
  margin: 0 auto 56px;
}

.about p {
  margin-bottom: 16px;
  color: var(--color-muted);
  font-size: 1.05rem;
}

/* ===== Equipo de profesionales ===== */

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

.subtitle {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 28px;
}

.equipo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;   /* centra las tarjetas */
  gap: 32px;
}

.miembro {
  text-align: center;
  background: #fff;
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  padding: 36px 28px 32px;
  box-shadow: var(--shadow);
}

/* Todas las fotos con el mismo tamaño, forma y anillo de color */
.miembro__foto {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border-radius: 50%;        /* foto circular */
  object-fit: cover;         /* recorta bien la imagen */
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px var(--color-accent);
}

/* Mientras no haya foto: círculo con iniciales */
.miembro__foto--iniciales {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-size: 2.4rem;
  font-weight: 800;
}

.miembro h4 {
  font-size: 1.25rem;
}

.miembro__cargo {
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 4px 0 12px;
}

.miembro__bio {
  color: var(--color-muted);
}


/* ===== Pasos ===== */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.steps li {
  padding: 8px 4px;
}

.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  font-weight: 800;
  margin-bottom: 12px;
}

.steps h3 {
  margin-bottom: 6px;
}

.steps p {
  color: var(--color-muted);
}

/* ===== Preguntas frecuentes ===== */
.faq {
  max-width: 820px;
}

.faq details {
  background: #fff;
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
}

.faq details[open] summary {
  color: var(--color-primary);
}

.faq details p {
  padding: 0 20px 18px;
  color: var(--color-muted);
}

/* ===== Contacto ===== */
.contact {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
}

.contact .section__title {
  color: #fff;
}

.contact .section__intro {
  color: rgba(255, 255, 255, 0.85);
}

.contact__options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== Pie de página ===== */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 28px 0;
  font-size: 0.9rem;
}

.footer__inner {
  display: grid;
  gap: 6px;
}

.footer__brand {
  color: #fff;
  font-weight: 700;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
  /* En celulares el encabezado no queda fijo, para no ocupar media pantalla */
  .header {
    position: static;
  }

  section,
  #equipo {
    scroll-margin-top: 0;
  }

  .header__inner {
    justify-content: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.95rem;
  }

  .hero {
    padding: 60px 0 110px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__media::before {
    inset: 16px -10px -10px 16px;
  }

  .hero__wave {
    height: 50px;
  }

  .section {
    padding: 60px 0;
  }
}

/* ===== Menos movimiento para quien lo tenga desactivado en su equipo ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}
