/* ═══════════════════════════════════════════════════════════
   SW Ingeniería — Estilos principales
   ═══════════════════════════════════════════════════════════ */

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Gabarito', sans-serif;
  color: #1e1e1e;
  background: #fff;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; }

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --blue-pill:  #b7e7ff;
  --blue-dark:  #3c5160;
  --blue-mid:   #587990;
  --footer-bg:  #bdc0c2;
  --text:       #1e1e1e;
  --muted:      #555;
  --radius:     30px;
  --max:        1440px;
  --pad:        64px;
}

/* ─── LAYOUT HELPER ──────────────────────────────────────── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}


/* ══════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════ */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
}

.navbar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 8px; }

.logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.logo-name {
  font-size: 28px;
  font-weight: 400;
  color: #1e1e1e;
  letter-spacing: 0.02em;
}

/* Nav links */
.nav-actions { display: flex; align-items: center; gap: 24px; }

.nav-link {
  font-size: 15px;
  font-weight: 400;
  color: #1e1e1e;
  transition: opacity 0.2s;
}
.nav-link:hover { opacity: 0.6; }
.nav-link.active {
  font-weight: 600;
  background: var(--blue-pill);
  border-radius: 13px;
  padding: 5px 18px;
}

.nav-btn {
  border-radius: 13px;
  padding: 5px 18px;
  font-size: 15px;
  font-weight: 400;
  color: #000;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.nav-btn.active { background: var(--blue-pill); }
.nav-btn:hover { opacity: 0.8; }

/* Selector de idioma */
.lang { font-size: 20px; color: #000; display: flex; align-items: center; gap: 2px; }
.lang .sep { color: #000; }

.lang-btn {
  font-size: 20px;
  font-family: 'Gabarito', sans-serif;
  font-weight: 400;
  color: #808080;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}
.lang-btn.active { color: #000; }
.lang-btn:hover  { color: #1e1e1e; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1e1e1e;
  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); }


/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
/* .hero usa la clase .container para max-width y padding horizontal */
.hero {
  padding-top: 36px;
  padding-bottom: 0;
}

.hero-title {
  font-size: 55px;
  font-weight: 400;
  color: #000;
  line-height: 1.05;
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 30px;
  font-weight: 400;
  color: #000;
  margin-bottom: 30px;
}

.hero-media-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 597px;
}

/* Video y fallback de imagen comparten los mismos estilos */
.hero-video,
.hero-media-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 48px 52px;
  background: linear-gradient(to top, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
}
.hero-caption p {
  font-size: 32px;
  color: #fff;
  line-height: 1.35;
  text-shadow: 0 4px 4px rgba(0,0,0,0.25);
  max-width: 1200px;
}
.hero-caption strong { font-weight: 700; }


/* ══════════════════════════════════════════════════════════
   OFRECEMOS
══════════════════════════════════════════════════════════ */
.ofrecemos { padding-top: 76px; padding-bottom: 56px; }

.section-label {
  font-size: 35px;
  font-weight: 400;
  color: #000;
  margin-bottom: 36px;
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.offer-card {
  border: 3px solid #000;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.offer-card img {
  width: 100%;
  height: 189px;
  object-fit: cover;
  flex-shrink: 0;
}

.offer-card-body { padding: 24px 22px 28px; flex: 1; }

.offer-card-body b {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  margin-bottom: 6px;
}
.offer-card-body p {
  font-size: 20px;
  font-weight: 400;
  color: #000;
  line-height: 1.4;
}


/* ══════════════════════════════════════════════════════════
   QUOTE + CERTIFICACIONES
══════════════════════════════════════════════════════════ */
.quote-certs { padding-bottom: 72px; }

.blockquote {
  font-size: 35px;
  font-weight: 400;
  color: #000;
  line-height: 1.3;
  max-width: 931px;
  margin-left: 30px;
  margin-bottom: 56px;
}

.cert-row { display: flex; gap: 28px; justify-content: flex-end; }

.cert-card {
  width: 306px;
  min-height: 337px;
  border: 3px solid #000;
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 22px 24px;
  gap: 16px;
  flex-shrink: 0;
}

.cert-card .cert-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  width: 100%;
}
.cert-card img { max-width: 100%; max-height: 130px; object-fit: contain; }

.cert-card-text { display: flex; flex-direction: column; gap: 8px; width: 100%; }

.cert-card b {
  font-size: 20px;
  font-weight: 600;
  color: #000;
  text-align: center;
}
.cert-card p {
  font-size: 20px;
  font-weight: 400;
  color: #000;
  text-align: center;
  line-height: 1.4;
}


/* ══════════════════════════════════════════════════════════
   NUESTROS SERVICIOS
══════════════════════════════════════════════════════════ */
.services { padding-bottom: 16px; }

.services-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}
.services-head .section-label { margin-bottom: 0; }

.ver-mas { font-size: 35px; font-weight: 400; color: #000; white-space: nowrap; }
.ver-mas:hover { opacity: 0.6; }

/* Carrusel */
.carousel-outer {
  overflow-x: auto;
  padding: 8px 0 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.carousel-outer:active { cursor: grabbing; }
.carousel-outer::-webkit-scrollbar { display: none; }

.carousel-track { display: flex; gap: 28px; width: max-content; }

.svc-card {
  width: 431px;
  height: 510px;
  border: 3px solid #000;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.svc-card-img { width: 100%; height: 287px; object-fit: cover; flex-shrink: 0; }
.svc-card-img.color { background: var(--blue-mid); }

.svc-card-body {
  flex: 1;
  padding: 24px 28px;
  display: flex;
  align-items: flex-end;
}
.svc-card-name { font-size: 35px; font-weight: 400; color: #000; line-height: 1.2; }

/* Indicador de scroll */
.scroll-indicator { padding: 8px 0 40px; }

.scroll-bar {
  width: 100%;
  height: 12px;
  background: #e2e2e2;
  border-radius: 14px;
  overflow: hidden;
}
.scroll-thumb {
  height: 100%;
  width: 127px;
  background: #555;
  border-radius: 14px;
  transition: transform 0.1s linear;
  will-change: transform;
}


/* ══════════════════════════════════════════════════════════
   TRABAJEMOS JUNTOS
══════════════════════════════════════════════════════════ */
.cta-section { padding-bottom: 88px; }

.cta-heading {
  font-size: 55px;
  font-weight: 400;
  color: #000;
  margin-bottom: 36px;
}

.cta-box {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 514px;
}
.cta-box > img {
  width: 100%;
  height: 100%;
  min-height: 514px;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.cta-overlay {
  position: relative;
  padding: 64px 80px 72px;
  min-height: 514px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta-pretitle { font-size: 35px; font-weight: 400; color: #fff; margin-bottom: 20px; }
.cta-body     { font-size: 35px; font-weight: 400; color: #fff; max-width: 918px; line-height: 1.3; margin-bottom: 20px; }
.cta-main     { font-size: 40px; font-weight: 600; color: #fff; max-width: 832px; margin-bottom: 48px; line-height: 1.2; }

.btn-contact {
  display: inline-flex;
  align-items: center;
  background: var(--blue-dark);
  color: #fff;
  font-family: 'Gabarito', sans-serif;
  font-size: 40px;
  font-weight: 400;
  border-radius: 48px;
  padding: 12px 44px;
  box-shadow: 0 4px 4px rgba(0,0,0,0.25);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  width: fit-content;
}
.btn-contact:hover { opacity: 0.88; }


/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--footer-bg);
  min-height: 156px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 20px var(--pad);
}

.footer-watermark {
  position: absolute;
  left: 14px;
  top: 0;
  height: 152px;
  opacity: 0.2;
  pointer-events: none;
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.footer-info span,
.footer-info a { font-size: 16px; font-weight: 400; color: var(--muted); }
.footer-info a:hover { text-decoration: underline; }


/* ══════════════════════════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════════════════════════ */
.back-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 54px;
  height: 54px;
  background: rgba(60, 81, 96, 0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 400;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.back-top.visible { opacity: 1; pointer-events: auto; }
.back-top svg { width: 22px; height: 22px; fill: #fff; }


/* ══════════════════════════════════════════════════════════
   PÁGINA DE SERVICIOS
══════════════════════════════════════════════════════════ */
.page-hero {
  padding-top: 56px;
  padding-bottom: 56px;
}

.page-hero-title {
  font-size: 55px;
  font-weight: 400;
  color: #000;
  line-height: 1.05;
  margin-bottom: 16px;
}

.page-hero-sub {
  font-size: 30px;
  font-weight: 400;
  color: var(--muted);
}

/* Grid de servicios (página servicios.html) */
.services-grid {
  padding-top: 56px;
  padding-bottom: 80px;
}

.services-grid-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.svc-detail-card {
  border: 3px solid #000;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.svc-detail-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  flex-shrink: 0;
}
.svc-detail-body {
  padding: 24px 26px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.svc-detail-name {
  font-size: 24px;
  font-weight: 600;
  color: #000;
  line-height: 1.2;
}
.svc-detail-desc {
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}

/* CTA inferior en páginas internas */
.page-cta {
  padding-bottom: 88px;
}


/* ══════════════════════════════════════════════════════════
   PÁGINA DE CONTACTO
══════════════════════════════════════════════════════════ */
.contact-info-section {
  padding-top: 64px;
  padding-bottom: 88px;
}

.contact-info-title {
  font-size: 35px;
  font-weight: 400;
  color: #000;
  margin-bottom: 36px;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.contact-info-card {
  border: 3px solid #000;
  border-radius: var(--radius);
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-info-label {
  font-size: 20px;
  font-weight: 600;
  color: #000;
}

.contact-info-value {
  font-size: 24px;
  font-weight: 400;
  color: var(--muted);
}

.contact-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 400;
  color: var(--blue-dark);
  margin-top: 40px;
  transition: opacity 0.2s;
}
.contact-back-link:hover { opacity: 0.7; }


/* ══════════════════════════════════════════════════════════
   RESPONSIVE — 1200px
══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  :root { --pad: 40px; }

  .hero-title  { font-size: 44px; }
  .hero-sub    { font-size: 24px; }
  .hero-media-wrap { height: 460px; }
  .hero-caption p { font-size: 26px; }

  .section-label { font-size: 30px; }
  .blockquote    { font-size: 28px; }

  .svc-card      { width: 360px; height: 440px; }
  .svc-card-img  { height: 230px; }
  .svc-card-name { font-size: 28px; }

  .cta-heading   { font-size: 44px; }
  .cta-pretitle  { font-size: 28px; }
  .cta-body      { font-size: 28px; }
  .cta-main      { font-size: 34px; }
  .btn-contact   { font-size: 34px; padding: 12px 38px; }
  .ver-mas       { font-size: 28px; }

  .page-hero-title { font-size: 44px; }
  .page-hero-sub   { font-size: 24px; }
  .services-grid-inner { grid-template-columns: repeat(2, 1fr); }
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVE — 900px (tablet)
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --pad: 28px; }

  .hamburger { display: flex; }

  .nav-actions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px var(--pad) 28px;
    gap: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    z-index: 100;
  }
  .nav-actions.open { display: flex; }

  .hero-title     { font-size: 36px; }
  .hero-sub       { font-size: 20px; }
  .hero-media-wrap { height: 360px; }
  .hero-caption   { padding: 28px 32px; }
  .hero-caption p { font-size: 20px; }

  .section-label { font-size: 26px; }
  .offer-card-body b,
  .offer-card-body p { font-size: 18px; }

  .cards-row { grid-template-columns: repeat(2, 1fr); }

  .blockquote   { font-size: 24px; margin-left: 0; }

  .cert-row  { justify-content: flex-start; flex-wrap: wrap; }
  .cert-card { flex: 1 1 260px; width: auto; min-height: auto; }
  .cert-card b,
  .cert-card p { font-size: 18px; }

  .svc-card      { width: 310px; height: 400px; }
  .svc-card-img  { height: 200px; }
  .svc-card-name { font-size: 24px; }
  .ver-mas       { font-size: 22px; }

  .cta-heading   { font-size: 36px; }
  .cta-box       { min-height: 460px; }
  .cta-box > img { min-height: 460px; }
  .cta-overlay   { padding: 44px 36px 48px; min-height: 460px; }
  .cta-pretitle  { font-size: 22px; }
  .cta-body      { font-size: 22px; }
  .cta-main      { font-size: 28px; margin-bottom: 32px; }
  .btn-contact   { font-size: 26px; padding: 10px 30px; }

  .back-top { bottom: 24px; right: 24px; }

  .page-hero-title { font-size: 36px; }
  .page-hero-sub   { font-size: 20px; }

  .services-grid-inner { grid-template-columns: repeat(2, 1fr); }

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


/* ══════════════════════════════════════════════════════════
   RESPONSIVE — 600px (móvil)
══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  :root { --pad: 20px; }

  .logo-name { font-size: 22px; }
  .logo-icon { width: 22px; height: 22px; }

  .hero-title    { font-size: 28px; margin-bottom: 10px; }
  .hero-sub      { font-size: 16px; margin-bottom: 20px; }
  .hero-media-wrap { height: 260px; }
  .hero-caption  { padding: 20px; }
  .hero-caption p { font-size: 16px; }

  .section-label { font-size: 24px; }
  .blockquote    { font-size: 20px; }

  .cards-row { grid-template-columns: 1fr; }

  .cert-row { flex-direction: column; }
  .cert-card {
    width: 100%;
    flex: none;
    flex-direction: row;
    align-items: flex-start;
    padding: 20px 18px;
    min-height: auto;
    gap: 16px;
  }
  .cert-card .cert-img-wrap { width: 100px; height: auto; flex-shrink: 0; }
  .cert-card img { max-height: 80px; }
  .cert-card b,
  .cert-card p { font-size: 15px; text-align: left; }

  .svc-card      { width: 260px; height: 360px; }
  .svc-card-img  { height: 170px; }
  .svc-card-name { font-size: 20px; }
  .svc-card-body { padding: 16px 20px; }

  .cta-heading { font-size: 28px; }
  .cta-box       { min-height: 380px; }
  .cta-box > img { min-height: 380px; }
  .cta-overlay   { padding: 32px 24px 36px; min-height: 380px; }
  .cta-pretitle  { font-size: 18px; margin-bottom: 14px; }
  .cta-body      { font-size: 18px; }
  .cta-main      { font-size: 22px; margin-bottom: 24px; }
  .btn-contact   { font-size: 20px; padding: 10px 24px; border-radius: 36px; }

  .site-footer   { flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 20px; }
  .footer-info   { align-items: flex-start; }
  .footer-watermark { height: 80px; top: auto; bottom: 0; opacity: 0.12; }

  .back-top { bottom: 16px; right: 16px; width: 44px; height: 44px; }
  .back-top svg { width: 18px; height: 18px; }

  .page-hero-title { font-size: 28px; }
  .page-hero-sub   { font-size: 18px; }

  .services-grid-inner { grid-template-columns: 1fr; }

  .svc-detail-card img { height: 180px; }
  .svc-detail-name     { font-size: 20px; }
  .svc-detail-desc     { font-size: 16px; }

  .contact-info-card { padding: 24px 22px; }
  .contact-info-value { font-size: 20px; }
}

/* ══════════════════════════════════════════════════════════
   SERVICIOS — SECCIÓN PRINCIPAL (layout 2 columnas)
══════════════════════════════════════════════════════════ */
.svc-main {
  padding-top: 0;
  padding-bottom: 64px;
}

.svc-section-title {
  font-size: 40px;
  font-weight: 400;
  color: #000;
  margin-bottom: 36px;
}

/* Grid 2 columnas: izquierda imágenes / derecha descripciones */
.svc-main-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Flatten column wrappers so each child becomes a direct grid item */
.svc-img-col,
.svc-text-col { display: contents; }

/* Explicit placement: each image card + its paired text card share the same row */
.svc-img-col  > .svc-img-card:nth-child(1)  { grid-column: 1; grid-row: 1; }
.svc-img-col  > .svc-img-card:nth-child(2)  { grid-column: 1; grid-row: 2; }
.svc-text-col > .svc-desc-card:nth-child(1) { grid-column: 2; grid-row: 1; }
.svc-text-col > .svc-desc-card:nth-child(2) { grid-column: 2; grid-row: 2; }

/* Tarjetas de imagen compartidas */
.svc-img-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.svc-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.svc-img-card:hover img { transform: scale(1.03); }

.svc-img-card--featured { height: 320px; }
.svc-img-card--mid      { height: 320px; }

/* Fila de 3 tarjetas pequeñas */
.svc-small-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.svc-img-card--small { height: 150px; }

.svc-small-row--full {
  margin-top: 16px;
}
.svc-small-row--full .svc-img-card--small {
  height: 200px;
}

/* Etiqueta overlay compartida */
.svc-img-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.08) 70%, transparent 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  padding: 40px 18px 16px;
}

.svc-img-card--featured .svc-img-label { font-size: 28px; padding: 56px 22px 22px; }
.svc-img-card--mid      .svc-img-label { font-size: 28px; padding: 48px 20px 18px; }

/* Tarjetas de descripción (texto) */
.svc-desc-card {
  border: 1.5px solid #d8d8d8;
  border-radius: var(--radius);
  padding: 32px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.svc-desc-title {
  font-size: 22px;
  font-weight: 600;
  color: #000;
  margin-bottom: 14px;
  line-height: 1.25;
}

.svc-desc-body {
  font-size: 17px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════════════
   SERVICIOS — SOPORTE TÉCNICO (grid 3 columnas)
══════════════════════════════════════════════════════════ */
.svc-support-section {
  padding-top: 16px;
  padding-bottom: 72px;
  border-top: 1px solid #e0e0e0;
}

.svc-support-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Row 1: NPI ocupa la mitad, los otros dos cuartos cada uno */
.svc-overlay-card:nth-child(1) { grid-column: span 2; }
/* Cards 2 y 3 ya ocupan 1 col cada una por defecto */

/* Filas 2, 3 y 4: cada tarjeta ocupa la mitad del contenedor */
.svc-overlay-card:nth-child(n+4) { grid-column: span 2; }

.svc-overlay-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.svc-overlay-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 300px;
  flex-shrink: 0;
}

/* Tarjetas pequeñas de la fila 1 (Prototipos y Acompañamiento) */
.svc-overlay-card:nth-child(2) .svc-overlay-img-wrap,
.svc-overlay-card:nth-child(3) .svc-overlay-img-wrap {
  height: 300px;
}

.svc-overlay-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.svc-overlay-card:hover .svc-overlay-img-wrap img { transform: scale(1.03); }

.svc-overlay-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  padding: 56px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.svc-overlay-label {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.svc-overlay-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}


/* ══════════════════════════════════════════════════════════
   CONTACTO — PÁGINA FORMULARIO
══════════════════════════════════════════════════════════ */
.contact-page-hero {
  padding-top: 56px;
  padding-bottom: 48px;
}

.contact-page-title {
  font-size: 55px;
  font-weight: 400;
  color: #000;
  line-height: 1.05;
  margin-bottom: 14px;
}

.contact-page-sub {
  font-size: 30px;
  font-weight: 400;
  color: #000;
  margin-bottom: 10px;
}

.contact-page-tagline {
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}

.contact-form-section {
  padding-bottom: 100px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Floating-label fields */
.form-field {
  position: relative;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1.5px solid #c8c8c8;
  border-radius: 12px;
  padding: 22px 18px 10px;
  font-family: 'Gabarito', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #1e1e1e;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--blue-dark);
}

.form-field.is-error input,
.form-field.is-error textarea {
  border-color: #d94f4f;
}

.form-error-msg {
  display: none;
  font-size: 12px;
  color: #d94f4f;
  margin-top: 5px;
  padding-left: 4px;
}

.form-field.is-error .form-error-msg,
.form-file-row.is-error .form-error-msg {
  display: block;
}

.form-file-row.is-error .file-upload-label {
  border-color: #d94f4f;
  color: #d94f4f;
}

.form-field label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #888;
  pointer-events: none;
  transition: top 0.18s, font-size 0.18s, color 0.18s;
}

.form-field--textarea label {
  top: 22px;
  transform: none;
}

/* Float label up when input has value or is focused */
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label {
  top: 10px;
  transform: none;
  font-size: 12px;
  color: var(--blue-dark);
}

.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  top: 8px;
  font-size: 12px;
  color: var(--blue-dark);
}

/* Project type group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group-label {
  font-size: 18px;
  font-weight: 400;
  color: #888;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-check {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}

.tag-check input[type="checkbox"] {
  display: none;
}

.tag-check span {
  display: inline-block;
  border: 1.5px solid #c8c8c8;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 15px;
  font-weight: 400;
  color: #555;
  background: #fff;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
  line-height: 1.4;
}

.tag-check input:checked + span {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

.tag-check:hover span {
  border-color: var(--blue-dark);
  color: var(--blue-dark);
}

.tag-check input:checked + span:hover {
  background: var(--blue-dark);
  color: #fff;
}

/* File upload */
.form-file-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid #c8c8c8;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 400;
  color: #555;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.file-upload-label:hover {
  border-color: var(--blue-dark);
  color: var(--blue-dark);
}

.file-upload-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.file-input {
  display: none;
}

.file-name {
  font-size: 15px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Submit button */
.btn-submit {
  align-self: flex-start;
  background: #1e1e1e;
  color: #fff;
  font-family: 'Gabarito', sans-serif;
  font-size: 22px;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  padding: 16px 64px;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.btn-submit:hover { opacity: 0.82; }

.captcha-note {
  font-size: 13px;
  color: #aaa;
  margin-top: -4px;
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVE — 1200px (servicios + contacto)
══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .svc-section-title { font-size: 34px; }
  .svc-main-cols { grid-template-columns: 1fr 1fr; }
  .svc-support-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-overlay-card:nth-child(1),
  .svc-overlay-card:nth-child(n+4) { grid-column: span 1; }
  .svc-img-card--featured { height: 280px; }
  .contact-page-title { font-size: 44px; }
  .contact-page-sub { font-size: 24px; }
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVE — 900px (servicios + contacto)
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .svc-main-cols { grid-template-columns: 1fr; }

  /* Reset explicit placement so todos los items fluyen en la columna única */
  .svc-img-col  > .svc-img-card:nth-child(1),
  .svc-img-col  > .svc-img-card:nth-child(2),
  .svc-text-col > .svc-desc-card:nth-child(1),
  .svc-text-col > .svc-desc-card:nth-child(2) {
    grid-column: 1;
    grid-row: auto;
  }
  .svc-img-card--featured { height: 260px; }
  .svc-img-card--mid      { height: 180px; }
  .svc-img-card--small    { height: 130px; }
  .svc-support-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .svc-overlay-img-wrap { height: 200px; }
  .contact-page-title { font-size: 36px; }
  .contact-page-sub { font-size: 20px; }
  .contact-page-tagline { font-size: 17px; }
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVE — 600px (servicios + contacto)
══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .svc-section-title { font-size: 26px; }
  .svc-small-row { grid-template-columns: repeat(2, 1fr); }
  .svc-img-card--small { height: 140px; }
  .svc-support-grid { grid-template-columns: 1fr; }
  .svc-overlay-img-wrap { height: 200px; }
  .contact-page-title { font-size: 28px; }
  .contact-page-sub { font-size: 18px; }
  .contact-page-tagline { font-size: 15px; }
  .form-file-row { flex-direction: column; align-items: flex-start; }
  .btn-submit { width: 100%; text-align: center; }
}


/* ══════════════════════════════════════════════════════════
   POPUP DE CONFIRMACIÓN
══════════════════════════════════════════════════════════ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 40, 50, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.confirm-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.confirm-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px 44px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-overlay.visible .confirm-card {
  transform: translateY(0) scale(1);
}

.confirm-icon {
  width: 60px;
  height: 60px;
  background: var(--blue-pill);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.confirm-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--blue-dark);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm-title {
  font-family: 'Gabarito', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-dark);
  margin: 0 0 12px;
  line-height: 1.2;
}

.confirm-msg {
  font-size: 15px;
  color: #637585;
  line-height: 1.65;
  margin: 0 0 32px;
}

.confirm-close {
  background: var(--blue-dark);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 36px;
  font-family: 'Gabarito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.confirm-close:hover { opacity: 0.82; }
