/* Pediatría Oshiro — Web Pública — Servicios (componente independiente) */
.servicios-publico {
  --s-accent: var(--sp-primary, #08758a);
  --s-soft: var(--sp-soft, #e8f7fa);
  --s-ink: #103745;
  --s-muted: #607983;
  --s-border: #d9e9ee;
  margin: 0;
  background: #fff;
  color: var(--s-ink);
  font-family: Inter, "Segoe UI", system-ui, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.servicios-publico *,
.servicios-publico *::before,
.servicios-publico *::after {
  box-sizing: border-box;
}

.servicios-publico a {
  color: inherit;
  text-decoration: none;
}

.servicios-publico button {
  font: inherit;
}

.servicios-publico img {
  max-width: 100%;
  display: block;
}

.servicios-publico .sp-container {
  width: min(1216px, calc(100% - 44px));
  margin-inline: auto;
}

.sp-skip {
  position: absolute;
  top: -80px;
  left: 20px;
  z-index: 1000;
  padding: 12px 20px;
  background: #fff;
  border-radius: 10px;
}

.sp-skip:focus {
  top: 12px;
}
/* Encabezado blanco; mismos enlaces con iconos que Médicos */
.sp-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #e5edef;
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 22px rgba(7, 50, 66, 0.035);
}

.sp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.sp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sp-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.sp-brand-symbol {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #e5f6f8;
  color: var(--s-accent);
  font-size: 26px;
}

.sp-brand-copy {
  min-width: 0;
}

.sp-brand strong,
.sp-brand small {
  display: block;
}

.sp-brand strong {
  font-size: 17px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.sp-brand small {
  font-size: 10px;
  color: var(--s-muted);
  line-height: 1.4;
  margin-top: 4px;
  max-width: 250px;
}

.sp-navlinks {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.sp-navitem {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 84px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  color: #22465a !important;
  transition:
    background 0.2s,
    color 0.2s;
}

.sp-navitem svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.sp-navlinks a:hover {
  color: var(--s-accent) !important;
  background: #f4fbfb;
}

.sp-navlinks a[aria-current] {
  color: var(--s-accent) !important;
}

.sp-navlinks a[aria-current]::after {
  content: "";
  height: 3px;
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  border-radius: 4px;
  background: var(--s-accent);
}

.sp-soon {
  color: #8aa1aa !important;
  cursor: default;
}

.sp-menu {
  display: none;
  position: relative;
}

.sp-menu summary {
  list-style: none;
  width: 44px;
  height: 44px;
  border: 1px solid #deebef;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--s-ink);
  cursor: pointer;
  background: #fff;
}

.sp-menu summary::-webkit-details-marker {
  display: none;
}

.sp-menu svg {
  width: 24px;
  height: 24px;
}

.sp-menu-list {
  position: absolute;
  z-index: 80;
  right: 0;
  top: calc(100% + 12px);
  min-width: 225px;
  background: #fff;
  border: 1px solid var(--s-border);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(9, 58, 71, 0.16);
  overflow: hidden;
  padding: 8px;
}

.sp-menu-list a,
.sp-menu-list span {
  display: block;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
}

.sp-menu-list a:hover {
  background: #ecf8f8;
  color: var(--s-accent);
}

.sp-menu-list span {
  color: #8b9ba4;
}
/* Hero */
.sp-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(112deg, #f3fbfc 0%, #ecf8f9 52%, #e3f3f6 100%);
  border-bottom: 1px solid #e0eef1;
}

.sp-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: 46px;
  min-height: 430px;
  padding-top: 65px;
  padding-bottom: 65px;
}

.sp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--s-accent);
  font-weight: 850;
  font-size: 11px;
  letter-spacing: 1.65px;
  text-transform: uppercase;
}

.sp-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #31b5aa;
  box-shadow: 0 0 0 6px rgba(49, 181, 170, 0.12);
}

.sp-hero h1 {
  max-width: 720px;
  font-size: clamp(38px, 4.9vw, 67px);
  font-weight: 850;
  letter-spacing: -2.4px;
  line-height: 1.08;
  margin: 20px 0;
}

.sp-hero h1 em {
  font-style: normal;
  color: var(--s-accent);
}

.sp-hero p {
  font-size: 16px;
  color: #526f7b;
  max-width: 570px;
  line-height: 1.85;
  margin: 0 0 28px;
}

.sp-hero-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.sp-btn,
.sp-btn-ghost,
.sp-band-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  min-height: 47px;
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 800;
  white-space: normal;
  transition:
    transform 0.2s,
    filter 0.2s;
}

.sp-btn {
  background: var(--s-accent);
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(8, 117, 138, 0.17);
}

.sp-btn:hover {
  filter: brightness(0.91);
  transform: translateY(-2px);
}

.sp-btn-ghost {
  background: rgba(255, 255, 255, 0.73);
  border: 1px solid #d4e7ea;
  color: #135163 !important;
}

.sp-btn-ghost:hover {
  transform: translateY(-2px);
  background: #fff;
}

.sp-hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 380px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.sp-art-circle {
  width: 61%;
  height: 61%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #cde7e9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  box-shadow: 0 22px 55px rgba(8, 90, 108, 0.08);
  position: relative;
  z-index: 2;
  text-align: center;
}

.sp-art-circle svg {
  width: 105px;
  height: 105px;
  color: var(--s-accent);
}

.sp-art-circle span {
  font-weight: 850;
  color: #164a59;
  font-size: 14px;
}

.sp-orbit {
  position: absolute;
  border: 1px solid rgba(8, 117, 138, 0.17);
  border-radius: 50%;
  inset: 3%;
}

.sp-orbit-b {
  inset: 17%;
  border-style: dashed;
}
/* Service catalog */
.sp-catalog {
  padding-top: 84px;
  padding-bottom: 96px;
  scroll-margin-top: 100px;
}

.sp-section-head {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 40px;
}

.sp-section-head h2 {
  font-size: clamp(30px, 3.7vw, 46px);
  letter-spacing: -1.4px;
  line-height: 1.16;
  margin: 10px 0;
  color: var(--s-ink);
}

.sp-section-head p {
  margin: 0;
  color: var(--s-muted);
  font-size: 15px;
}

.sp-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 27px;
}

.sp-card {
  background: #fff;
  min-width: 0;
  border: 1px solid #e0eaed;
  border-radius: 23px;
  overflow: hidden;
  box-shadow: 0 17px 44px rgba(6, 61, 76, 0.075);
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}

.sp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 23px 55px rgba(6, 61, 76, 0.12);
}

.sp-card-media {
  height: 300px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #bde4e9, #e9f8f9);
}

.sp-media-general {
  background: linear-gradient(140deg, #c5e7ee, #effafb);
}

.sp-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  transition: transform 0.35s;
}

.sp-card:hover .sp-card-media img {
  transform: scale(1.035);
}

.sp-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--s-accent);
}

.sp-card-placeholder svg {
  width: 98px;
  height: 98px;
  opacity: 0.5;
}

.sp-card-chip {
  position: absolute;
  top: 18px;
  left: 19px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #0a6478;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.7px;
}

.sp-card-main {
  padding: 29px 32px 28px;
}

.sp-card-number {
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 1.5px;
  color: var(--s-accent);
}

.sp-card h3 {
  font-size: clamp(27px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.7px;
  margin: 10px 0 13px;
}

.sp-card-summary {
  font-size: 15px;
  color: #5c7681;
  line-height: 1.8;
  margin: 0 0 26px;
  min-height: 55px;
}

.sp-card-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.sp-read-more {
  color: var(--s-accent) !important;
  font-weight: 800;
  font-size: 13px;
}

.sp-read-more:hover {
  text-decoration: underline;
}

.sp-card-detail {
  border-top: 1px solid #e3eff2;
}

.sp-card-detail summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 17px 32px;
  font-weight: 800;
  font-size: 13px;
  color: #245565;
  background: #f7fbfc;
  list-style: none;
}

.sp-card-detail summary::-webkit-details-marker {
  display: none;
}

.sp-card-detail[open] summary span {
  transform: rotate(45deg);
}

.sp-card-detail-text {
  padding: 23px 32px 29px;
  color: #53717e;
  line-height: 1.95;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.sp-empty {
  text-align: center;
  background: #f4fafb;
  border: 1px dashed #c5e4e9;
  padding: 65px 22px;
  border-radius: 22px;
}

.sp-empty > span {
  font-size: 46px;
  color: var(--s-accent);
}

.sp-empty h3 {
  font-size: 25px;
  margin: 8px 0;
}

.sp-empty p {
  color: var(--s-muted);
  margin: 0 0 23px;
}
/* Call to action */
.sp-band {
  background: linear-gradient(110deg, #0b5363, #073943);
  padding: 69px 0;
  color: #fff;
}

.sp-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.sp-band .sp-eyebrow {
  color: #8fe4d9;
}

.sp-band h2 {
  font-size: clamp(27px, 3.2vw, 41px);
  line-height: 1.15;
  letter-spacing: -0.9px;
  max-width: 680px;
  margin: 12px 0;
}

.sp-band p {
  color: #bedce1;
  margin: 0;
}

.sp-band-button {
  flex-shrink: 0;
  background: #fff;
  color: #0d4656 !important;
  padding-inline: 24px;
}

.sp-band-button:hover {
  background: #e8f8f8;
  transform: translateY(-2px);
}

.sp-footer {
  background: #072f3a;
  color: #bad2d8;
  padding: 23px 0;
}

.sp-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
}
/* Accessible keyboard focus */
.sp-header a:focus-visible,
.sp-menu summary:focus-visible,
.sp-btn:focus-visible,
.sp-btn-ghost:focus-visible,
.sp-read-more:focus-visible,
.sp-card-detail summary:focus-visible,
.sp-band-button:focus-visible {
  outline: 3px solid #38b7ad;
  outline-offset: 3px;
}
@media (max-width: 1130px) {
  .sp-navlinks {
    gap: 0;
  }
  .sp-navitem {
    padding-inline: 8px;
    font-size: 12px;
  }
  .sp-brand small {
    max-width: 190px;
  }
}
@media (max-width: 960px) {
  .sp-navlinks {
    display: none;
  }
  .sp-menu {
    display: block;
  }
  .sp-hero-layout {
    gap: 25px;
    grid-template-columns: 1.2fr 0.8fr;
  }
  .sp-hero-art {
    opacity: 0.65;
  }
}
@media (max-width: 720px) {
  .servicios-publico .sp-container {
    width: min(100% - 30px, 1216px);
  }
  .sp-nav {
    min-height: 75px;
  }
  .sp-brand img,
  .sp-brand-symbol {
    width: 44px;
    height: 44px;
  }
  .sp-brand strong {
    font-size: 15px;
  }
  .sp-brand small {
    font-size: 9px;
  }
  .sp-hero-layout {
    display: block;
    padding-block: 66px 63px;
    min-height: 0;
  }
  .sp-hero-art {
    display: none;
  }
  .sp-hero h1 {
    font-size: clamp(36px, 9vw, 50px);
    letter-spacing: -1.4px;
  }
  .sp-hero p {
    font-size: 14px;
  }
  .sp-catalog {
    padding-block: 60px 75px;
  }
  .sp-section-head {
    margin-bottom: 31px;
  }
  .sp-cards {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .sp-card-media {
    height: 250px;
  }
  .sp-card-main {
    padding: 25px;
  }
  .sp-card-summary {
    min-height: 0;
  }
  .sp-card-detail summary {
    padding: 17px 25px;
  }
  .sp-card-detail-text {
    padding: 20px 25px;
  }
  .sp-band-inner {
    align-items: flex-start;
    flex-direction: column;
  }
  .sp-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }
}
@media (max-width: 410px) {
  .sp-hero-actions {
    align-items: stretch;
  }
  .sp-btn,
  .sp-btn-ghost,
  .sp-band-button {
    width: 100%;
  }
  .sp-card-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .sp-card-media {
    height: 215px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sp-card,
  .sp-card-media img,
  .sp-btn,
  .sp-btn-ghost,
  .sp-band-button {
    transition: none;
  }
}

/* Botón accesible para abrir detalles sin agregar #fragmentos a la URL. */
.servicios-publico button.sp-read-more {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 0;
  cursor: pointer;
  color: var(--s-accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  line-height: 1.4;
}

.servicios-publico button.sp-read-more:hover {
  text-decoration: underline;
}

.servicios-publico button.sp-read-more:focus-visible {
  outline: 3px solid #38b7ad;
  outline-offset: 3px;
  border-radius: 3px;
}

/* ==========================================================
   DETALLE DEL SERVICIO — VENTANA PREMIUM / URL LIMPIA
========================================================== */
.servicios-publico.sp-modal-open {
  overflow: hidden;
}

.sp-detail-modal {
  width: min(980px, calc(100% - 36px));
  max-width: 980px;
  max-height: min(90vh, 850px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: #123847;
  box-shadow: 0 36px 90px rgba(3, 35, 48, 0.3);
  overflow: hidden;
  overscroll-behavior: contain;
}

.sp-detail-modal::backdrop {
  background: rgba(3, 31, 43, 0.68);
  backdrop-filter: blur(5px);
}

.sp-detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.84fr) minmax(0, 1.16fr);
  height: min(82vh, 730px);
  min-height: 0;
  overflow: hidden;
}

.sp-detail-media {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #d8eff2, #f5fbfc);
  border-right: 1px solid #d9e9ed;
}

.sp-detail-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(9, 67, 82, 0.1);
}

.sp-detail-image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 320px;
  height: 100%;
  color: #08758a;
  font-size: 100px;
}

.sp-detail-content {
  padding: 32px 38px 38px;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.sp-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.sp-detail-close {
  appearance: none;
  border: 1px solid #dce9ed;
  background: #f5fafb;
  color: #245565;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.sp-detail-close:hover {
  color: #fff;
  background: #08758a;
}

.sp-detail-content h2 {
  margin: 18px 0 12px;
  font-size: clamp(28px, 3.3vw, 41px);
  line-height: 1.15;
  letter-spacing: -1px;
  color: #0b3445;
}

.sp-detail-intro {
  font-size: 15px;
  color: #56727d;
  line-height: 1.8;
  margin: 0 0 28px;
}

.sp-detail-content h3 {
  font-size: 15px;
  margin: 20px 0 12px;
  font-weight: 800;
}

.sp-detail-description {
  padding: 20px 23px;
  background: #f4fafb;
  border: 1px solid #dcebed;
  border-radius: 15px;
  color: #456571;
  font-size: 14px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

.sp-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 27px;
}

.sp-detail-back {
  appearance: none;
  border: 1px solid #d9e8ec;
  padding: 12px 17px;
  border-radius: 11px;
  background: #fff;
  color: #0a6174;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sp-detail-back:hover {
  background: #eef9fa;
}

.sp-detail-close:focus-visible,
.sp-detail-back:focus-visible {
  outline: 3px solid #39b6af;
  outline-offset: 3px;
}
@media (max-width: 720px) {
  .sp-detail-modal {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    overflow-y: auto;
  }

  .sp-detail-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .sp-detail-media {
    flex: none;
    height: 260px;
    min-height: 0;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid #d9e9ed;
  }

  .sp-detail-media img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
  }

  .sp-detail-content {
    padding: 24px 22px 36px;
    overflow: visible;
  }
}

/* Mantener la fotografía entera, también en pantallas de poca altura. */
@media (min-width: 721px) and (max-height: 650px) {
  .sp-detail-layout {
    height: min(84vh, 520px);
  }
  .sp-detail-media {
    padding: 14px;
  }
}
