/* =========================================================
   Pyrsa Laboratorios — estilos
   ========================================================= */
:root {
  --blue: #284684;
  --teal: #4dc0be;
  --text: #000;
  --white: #fff;
  --grad: linear-gradient(121deg, #4bbaba 0%, #3a87a3 50%, #294a86 100%);
  --container: 1040px;
  --gutter: 20px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.title {
  color: var(--teal);
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
  text-align: center;
}
.title--left { text-align: left; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  border-radius: 999px;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--blue {
  background: var(--blue);
  color: var(--white);
  font-size: 18px;
  padding: 14px 20px;
}
.btn--blue:hover { box-shadow: 0 8px 20px rgba(40, 70, 132, .3); }
.btn--ghost {
  background: rgba(255, 255, 255, .25);
  color: var(--white);
  font-size: 20px;
  padding: 12px 22px 12px 20px;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .35); }

/* ---------- Navegación ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blue);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 106px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.nav__menu { display: flex; gap: clamp(18px, 2.6vw, 38px); }
.nav__menu a {
  color: var(--white);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: .01em;
  position: relative;
  padding: 6px 0;
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav__menu a:hover::after { transform: scaleX(1); }
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  padding: 10px;
  cursor: pointer;
  margin-right: auto;
}
.nav__toggle span {
  display: block;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform .25s ease, opacity .25s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 565px;
  overflow: hidden;
  background: linear-gradient(90deg, #4bbaba 0%, #44a5b0 45%, #3e8fa6 68%, #294a86 100%);
}
.hero__photo {
  position: absolute;
  top: 0; left: 0;
  width: 60.5%;
  height: 96%;
  background: url("../img/hero-equipo.jpg") center top / cover no-repeat;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(75, 186, 186, .62) 0%,
    rgba(71, 174, 181, .68) 30%,
    rgba(68, 165, 176, .85) 50%,
    rgba(66, 156, 172, 1) 62%,
    rgba(62, 143, 166, 1) 68%,
    rgba(41, 74, 134, 1) 100%);
}
.hero__content {
  position: absolute;
  top: 0; bottom: 0;
  left: 60%; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 70px;
  color: var(--white);
  text-align: center;
}
.hero__tagline {
  font-weight: 600;
  font-size: clamp(18px, 1.85vw, 23.5px);
  line-height: 1.2;
  margin-top: 28px;
}
.hero__curve {
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%;
  height: 130px;
}

/* Insignia 40+ años */
.badge40 {
  position: relative;
  width: 260px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.badge40__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge40__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  font-weight: 800;
  line-height: .95;
}
.badge40__text strong { font-size: 70px; font-weight: 800; }
.badge40__text span { font-size: 40px; }

/* ---------- Nosotros ---------- */
.about {
  padding: 30px var(--gutter) 0;
  text-align: center;
}
.about__text {
  max-width: 760px;
  margin: 28px auto 30px;
  font-size: 18.6px;
  line-height: 1.2;
}

/* ---------- Galerías (promociones / vacantes) ---------- */
.gallery {
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 72px var(--gutter) 0;
}
.gallery .title { margin-bottom: 30px; }
.masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}
.masonry__col { display: flex; flex-direction: column; gap: 27px; }
.masonry img {
  width: 100%;
  transition: transform .25s ease, box-shadow .25s ease;
}
.zoom { display: block; cursor: zoom-in; }
.zoom:hover img { transform: scale(1.02); box-shadow: 0 12px 28px rgba(0, 0, 0, .18); }

/* ---------- CTA WhatsApp ---------- */
.cta {
  position: relative;
  z-index: 2;
  background: var(--blue);
  margin-top: 70px;
  color: var(--white);
}
.cta__inner {
  position: relative;
  height: 278px;
  display: flex;
  align-items: center;
}
.cta__text h2 {
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
  margin-bottom: 24px;
}

/* Maqueta de teléfono */
.phone {
  position: absolute;
  top: 66px;
  left: 61.5%;
  width: 203px;
}
.phone__screen {
  position: relative;
  height: 416px;
  border-radius: 30px;
  background: #1d1d1b;
  border: 2px solid #6f6e6e;
  outline: 1px solid #5e465d;
  padding: 7px;
  overflow: hidden;
}
.phone__screen::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 23px;
  background: var(--white);
}
.phone__notch {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 42px; height: 12px;
  border-radius: 8px;
  background: #1d1d1b;
  z-index: 3;
}
.phone__wave {
  position: absolute;
  inset: 7px;
  border-radius: 23px;
  background: linear-gradient(160deg, #4bbaba 0%, #3e8fa6 55%, #2f5f93 100%);
  clip-path: path("M0 142 Q 80 100 186 82 L 186 400 L 0 400 Z");
  z-index: 1;
}
.phone__body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 132px;
  color: var(--white);
}
.badge40--sm { width: 100px; }
.badge40--sm .badge40__text strong { font-size: 28px; }
.badge40--sm .badge40__text span { font-size: 16px; }
.phone__btn {
  margin-top: 20px;
  background: var(--teal);
  border-radius: 5px;
  font-weight: 700;
  font-size: 11.5px;
  padding: 5px 13px;
}
.phone__line {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  font-size: 12px;
  margin-top: 13px;
}
.phone__line--sm { font-size: 11.5px; margin-top: 8px; }
.phone__shadow {
  height: 12px;
  margin: 12px -10px 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .35), transparent);
}

/* ---------- Servicios ---------- */
.services {
  background: var(--grad);
  color: var(--white);
  padding: 76px 0 76px;
}
.services h2 {
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
}
.services ul {
  padding-left: 20px;
  font-size: 18.6px;
  line-height: 1.2;
}
.services li { margin-bottom: 15px; }
.services li::marker { font-size: .8em; }
.services__list { max-width: 530px; }
.services__list h2 { margin-bottom: 42px; }
.services__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  margin-top: 62px;
}
.services__iso { display: flex; justify-content: center; padding-right: 40px; }
.services__iso img { width: 182px; }
.services__extra { padding-top: 12px; padding-left: 8px; }
.services__extra h2 { margin-bottom: 36px; }
.services__extra ul { font-size: 18.6px; max-width: 445px; }
.services__extra li { margin-bottom: 15px; font-size: 18.6px; }

/* ---------- Certificaciones ---------- */
.certs {
  background: var(--teal);
  padding: 54px var(--gutter) 78px;
  text-align: center;
}
.certs__text {
  color: var(--white);
  font-weight: 600;
  font-size: clamp(16px, 1.65vw, 21px);
  line-height: 1.58;
}
.certs__box {
  max-width: 898px;
  margin: 40px auto 0;
  background: var(--white);
  border-radius: 0 60px 0 60px;
  padding: 26px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(30px, 6vw, 70px);
}
.certs__box img:nth-child(1) { width: 186px; }
.certs__box img:nth-child(2) { width: 258px; }
.certs__box img:nth-child(3) { width: 172px; }

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
}
.contact__map { position: relative; min-height: 300px; }
.contact__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.contact__info {
  padding: 96px 40px 60px;
}
.contact__info .title { margin-bottom: 32px; }
.contact__info ul { list-style: none; padding: 0; }
.contact__info li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.7px;
  margin-bottom: 13px;
}
.contact__info svg { width: 20px; height: 20px; color: var(--blue); flex: none; }
.contact__info a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--blue); color: var(--white); }
.footer__inner {
  max-width: 1040px;
  margin: 0 auto;
  min-height: 103px;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  text-align: center;
  font-size: 14.7px;
  line-height: 1.05;
}
.footer a:hover { text-decoration: underline; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Visor de imágenes ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 20, 40, .9);
  display: grid;
  place-items: center;
  padding: 40px 16px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(100%, 900px);
  max-height: 100%;
  width: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.lightbox__close {
  position: absolute;
  top: 10px; right: 16px;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
}

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1100px) {
  .phone { left: auto; right: var(--gutter); }
}

@media (max-width: 900px) {
  .nav__inner { height: 68px; }
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--blue);
    padding: 8px 0 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .2);
    display: none;
  }
  .nav.is-open .nav__menu { display: flex; }
  .nav__menu a { padding: 14px 24px; }
  .nav__menu a::after { display: none; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .hero { height: auto; min-height: 560px; }
  .hero__photo { width: 100%; height: 100%; background-position: 30% top; }
  .hero__overlay {
    background: linear-gradient(180deg, rgba(75, 186, 186, .35) 0%, rgba(62, 143, 166, .75) 55%, rgba(41, 74, 134, .95) 100%);
  }
  .hero__content { position: relative; left: 0; min-height: 560px; padding: 40px 20px 110px; justify-content: flex-end; }
  .badge40 { width: 200px; }
  .badge40__text strong { font-size: 54px; }
  .badge40__text span { font-size: 31px; }
  .hero__curve { height: 70px; }

  .cta__inner { height: auto; flex-direction: column; align-items: flex-start; padding-top: 50px; padding-bottom: 50px; }
  .phone { position: relative; top: auto; left: auto; right: auto; margin: 40px auto -120px; }
  .services { padding-top: 170px; }

  .services__row { grid-template-columns: 1fr; gap: 40px; }
  .services__iso { padding-right: 0; order: 2; }
  .services__extra { padding: 0; }

  .contact { grid-template-columns: 1fr; }
  .contact__map { min-height: 320px; order: 2; }
  .contact__info { padding: 50px var(--gutter); }

  .footer__inner { flex-wrap: wrap; justify-content: center; gap: 18px 32px; padding: 28px var(--gutter); }
}

@media (max-width: 700px) {
  .masonry { grid-template-columns: 1fr 1fr; gap: 14px; }
  .masonry__col { gap: 14px; }
  .masonry__col:nth-child(3) { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .gallery { padding-top: 56px; }
  .about__text { font-size: 16.5px; }
  .about__text br { display: none; }
  .services ul, .services__extra li { font-size: 16.5px; }
  .certs__text br { display: none; }
  .certs__box { flex-direction: column; gap: 24px; border-radius: 0 40px 0 40px; padding: 28px 24px; }
}

@media (max-width: 420px) {
  .masonry { grid-template-columns: 1fr; }
  .masonry__col:nth-child(3) { grid-column: auto; display: flex; }
  .footer__inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
