.servicios-pagina {
  --azul: #102f91;
  --texto: #576579;
  min-height: calc(100vh - var(--header-alto));
  box-sizing: border-box;
  padding: clamp(34px, 5vw, 64px) clamp(18px, 4vw, 64px) clamp(54px, 7vw, 90px);
  background: radial-gradient(circle at 50% -30%, #fff 0, #f7faff 42%, #edf3fa 100%);
  color: #15233a;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.servicios-intro { max-width: 760px; margin: 0 auto clamp(30px, 4vw, 52px); text-align: center; }
.servicios-etiqueta { margin: 0 0 10px; color: #ef8500; font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.servicios-intro h1 { margin: 0 0 10px; color: #092d54; font-size: clamp(2.1rem, 4vw, 3.6rem); line-height: 1; }
.servicios-intro > p:last-child { margin: 0; color: var(--texto); font-size: clamp(.94rem, 1.5vw, 1.08rem); line-height: 1.65; }

.servicios-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(20px, 2.2vw, 32px); width: min(100%, 1480px); margin: 0 auto; }
.servicio-card {
  grid-column: span 2;
  position: relative;
  min-width: 0;
  min-height: 340px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(25, 54, 89, .13);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  transition: transform .3s ease, box-shadow .3s ease;
}
.servicio-card:nth-child(4) { grid-column: 2 / span 2; }
.servicio-card:nth-child(5) { grid-column: 4 / span 2; }
.servicio-card::after { content: ""; position: absolute; inset: auto auto 0 0; width: 14px; height: 48%; border-radius: 0 14px 0 0; background: var(--acento); z-index: 2; }
.servicio-card:hover, .servicio-card:focus-visible { transform: translateY(-7px); box-shadow: 0 24px 50px rgba(25, 54, 89, .2); }
.servicio-card:focus-visible { outline: 4px solid color-mix(in srgb, var(--acento) 35%, white); outline-offset: 4px; }

.servicio-foto { display: block; height: 205px; overflow: hidden; background: #dce6f2; }
.servicio-foto img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.01); transition: transform .45s ease; }
.servicio-card:nth-child(1) .servicio-foto img { object-position: center 45%; }
.servicio-card:nth-child(2) .servicio-foto img { object-position: center 32%; }
.servicio-card:nth-child(3) .servicio-foto img { object-position: center 42%; }
.servicio-card:nth-child(4) .servicio-foto img { object-position: center 38%; }
.servicio-card:nth-child(5) .servicio-foto img { object-position: center 55%; }
.servicio-card:hover .servicio-foto img { transform: scale(1.06); }

.servicio-resumen {
  position: relative;
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 150px;
  margin-top: -16px;
  padding: 24px 20px 20px;
  box-sizing: border-box;
  border-radius: 0 22px 0 0;
  background: #fff;
  z-index: 1;
}
.servicio-icono { align-self: start; justify-self: center; display: grid; place-items: center; width: 76px; height: 76px; margin-top: -56px; border: 3px solid #fff; border-radius: 50%; background: var(--acento); color: #fff; box-shadow: 0 10px 24px rgba(20, 45, 84, .17); font-size: 1.9rem; }
.servicio-texto { display: flex; flex-direction: column; gap: 9px; }
.servicio-texto strong { color: var(--azul); font-size: clamp(1rem, 1.45vw, 1.35rem); font-weight: 800; line-height: 1.14; text-transform: uppercase; }
.servicio-texto small { color: var(--texto); font-size: .89rem; line-height: 1.5; }
.servicio-flecha { display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--acento); border-radius: 50%; color: var(--acento); transition: background .25s ease, color .25s ease; }
.servicio-card:hover .servicio-flecha { background: var(--acento); color: #fff; }

.flyer-vista {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: auto;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: clamp(10px, 1.6vw, 20px) clamp(10px, 3vw, 44px);
  box-sizing: border-box;
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(4, 22, 41, .97);
  backdrop-filter: blur(14px);
  animation: flyerEntrada .35s ease both;
}
.flyer-vista[hidden], .servicios-grid[hidden], .servicios-intro[hidden] { display: none; }
.flyer-barra { position: relative; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) 46px; align-items: center; gap: 18px; margin-bottom: 12px; padding: 12px; border: 1px solid #dce6f1; border-radius: 16px; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 28px rgba(22, 51, 86, .12); }
.flyer-identidad { min-width: 0; text-align: center; }
.flyer-barra p { margin: 0; color: #0d368e; font-weight: 800; text-align: center; }
.flyer-identidad span { display: block; min-height: 1em; margin-top: 3px; color: #6b7a8d; font-size: .72rem; font-weight: 700; }
.flyer-volver, .flyer-cerrar { border: 0; font-family: inherit; font-weight: 800; cursor: pointer; }
.flyer-volver { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 17px; border-radius: 11px; background: #edf3fb; color: #123b91; }
.flyer-cerrar { width: 44px; height: 44px; border-radius: 50%; background: #102f91; color: #fff; font-size: 1.15rem; }
.flyer-contenido-grid { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); gap: clamp(16px, 2.4vw, 34px); overflow: hidden; }
.flyer-lienzo { position: relative; display: flex; justify-content: center; align-items: center; min-width: 0; min-height: 0; height: 100%; padding: 0 clamp(42px, 5vw, 70px); box-sizing: border-box; overflow: hidden; border-radius: 18px; background: rgba(255,255,255,.06); }
.flyer-lienzo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 22px 60px rgba(0, 0, 0, .48); background: #fff; }
.flyer-lienzo img.desde-derecha { animation: flyerDesdeDerecha .38s cubic-bezier(.22, 1, .36, 1); }
.flyer-lienzo img.desde-izquierda { animation: flyerDesdeIzquierda .38s cubic-bezier(.22, 1, .36, 1); }
.flyer-navegacion { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: clamp(42px, 4vw, 58px); height: clamp(42px, 4vw, 58px); border: 0; border-radius: 50%; background: #fff; color: #123b91; box-shadow: 0 10px 28px rgba(20, 49, 85, .2); font-size: clamp(1rem, 2vw, 1.35rem); cursor: pointer; transform: translateY(-50%); transition: background .2s ease, color .2s ease, transform .2s ease; }
.flyer-navegacion[hidden] { display: none; }
.flyer-navegacion:hover { background: #123b91; color: #fff; transform: translateY(-50%) scale(1.06); }
.flyer-anterior { left: clamp(2px, 1.2vw, 18px); }
.flyer-siguiente { right: clamp(2px, 1.2vw, 18px); }
.servicio-cotizacion { min-width: 0; min-height: 0; overflow: auto; box-sizing: border-box; padding: clamp(24px, 3vw, 42px); border-radius: 18px; background: #fff; color: #183047; }
.servicio-cotizacion h2 { margin: 0 0 12px; color: #0a355d; font-size: clamp(1.5rem, 2.4vw, 2.35rem); line-height: 1.05; }
.servicio-cotizacion > p:not(.servicios-etiqueta) { margin: 0 0 22px; color: #65758a; font-size: .86rem; line-height: 1.55; }
.servicio-formulario { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.servicio-formulario label { display: grid; gap: 6px; color: #41566d; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.servicio-formulario input, .servicio-formulario textarea { width: 100%; box-sizing: border-box; border: 1px solid #d5e0ea; border-radius: 9px; background: #f8fafc; color: #172b40; font: 500 .84rem "Montserrat", sans-serif; }
.servicio-formulario input { min-height: 43px; padding: 0 12px; }
.servicio-formulario textarea { min-height: 105px; padding: 12px; resize: vertical; }
.servicio-formulario input:focus, .servicio-formulario textarea:focus { outline: 3px solid rgba(18,105,176,.18); border-color: #1269b0; }
.servicio-formulario-mensaje, .servicio-formulario button, .servicio-formulario-estado { grid-column: 1 / -1; }
.servicio-formulario button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 10px; background: #1269b0; color: #fff; font: 800 .8rem "Montserrat", sans-serif; cursor: pointer; }
.servicio-formulario button:disabled { opacity: .65; cursor: wait; }
.servicio-formulario-estado { min-height: 18px; margin: 0; color: #25603f; font-size: .73rem; line-height: 1.45; }

body.flyer-abierto { overflow: hidden; }

@keyframes flyerEntrada { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes flyerDesdeDerecha { from { opacity: 0; transform: translateX(48px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes flyerDesdeIzquierda { from { opacity: 0; transform: translateX(-48px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 1120px) {
  .servicios-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .servicio-card, .servicio-card:nth-child(4), .servicio-card:nth-child(5) { grid-column: auto; }
  .servicio-card:last-child { grid-column: 1 / -1; width: calc(50% - 12px); justify-self: center; }
  .flyer-contenido-grid { grid-template-columns: minmax(0, .9fr) minmax(330px, 1.1fr); }
}

@media (max-width: 720px) {
  .servicios-pagina { padding-inline: 14px; }
  .servicios-grid { grid-template-columns: 1fr; }
  .servicio-card, .servicio-card:last-child { grid-column: auto; width: 100%; }
  .servicio-resumen { grid-template-columns: 82px minmax(0, 1fr) 40px; padding-inline: 14px; }
  .servicio-icono { width: 68px; height: 68px; font-size: 1.55rem; }
  .flyer-vista { padding: 8px; }
  .flyer-vista { overflow: auto; }
  .flyer-barra { position: sticky; top: 0; grid-template-columns: minmax(0, 1fr) 44px; gap: 7px; margin-bottom: 8px; padding: 8px; }
  .flyer-identidad { grid-row: 2; grid-column: 1 / -1; padding: 2px 8px 4px; }
  .flyer-volver { padding-inline: 12px; }
  .flyer-contenido-grid { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .flyer-lienzo { min-height: 62vh; padding-inline: 42px; }
  .servicio-cotizacion { overflow: visible; }
  .servicio-formulario { grid-template-columns: 1fr; }
  .servicio-formulario-mensaje, .servicio-formulario button, .servicio-formulario-estado { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .servicio-card, .servicio-foto img, .flyer-vista, .flyer-lienzo img { transition: none; animation: none; }
}

.flyer-barra { background:#fff; }
.flyer-ampliar { display:none; }
.flyer-interactivo { cursor:zoom-in; }
.flyer-interactivo:focus-visible { outline:3px solid #20c7ee; outline-offset:3px; }
.flyer-zoom { padding:54px 12px 12px; border:0; box-sizing:border-box; width:96vw; height:96dvh; max-width:none; max-height:none; background:#061729; overflow:auto; }
.flyer-zoom::backdrop { background:#000d; }
.flyer-zoom[open] { display:flex; justify-content:center; align-items:flex-start; }
.flyer-zoom img { display:block; width:auto; height:auto; max-width:100%; max-height:calc(96dvh - 70px); object-fit:contain; }
.flyer-zoom-cerrar { position:fixed; top:3vh; right:4vw; border:0; border-radius:8px; padding:12px 20px; background:#fff; color:#123b91; cursor:pointer; z-index:1; }
@media (min-width:721px) {
  .flyer-zoom { width:100vw; height:100dvh; margin:0; padding:12px 16px; background:transparent; overflow:hidden; }
  .flyer-zoom[open] { align-items:center; }
  .flyer-zoom img { width:auto; height:auto; max-width:100%; max-height:100%; border-radius:20px; }
  .flyer-zoom-cerrar { top:16px; right:20px; }
}
@media (max-width:720px) {
  .flyer-vista { display:block; padding:0; overflow-y:auto; overflow-x:hidden; background:#071b2e; animation:none; }
  .flyer-barra { position:sticky; top:0; margin:8px; }
  .flyer-contenido-grid { display:flex; flex-direction:column; height:auto; gap:16px; overflow:visible; }
  .flyer-lienzo { height:auto; min-height:0; flex:none; padding:0; overflow:visible; background:transparent; border-radius:0; }
  .flyer-lienzo img { width:100%; height:auto; max-height:none; object-fit:contain; border-radius:0; box-shadow:none; background:transparent; }
  .servicio-cotizacion { flex:none; min-height:min-content; height:auto; padding:24px 18px; overflow:visible; background:#fff; margin:0 8px 16px; }
  .servicio-formulario { display:flex; flex-direction:column; }
  .servicio-formulario input,.servicio-formulario textarea { font-size:16px; }
  .flyer-zoom img { max-height:none; width:100%; }
}
