/* ==========================================================================
   "Lo que hacemos": lista de servicios, panel de detalle y diafragma animado.
   ========================================================================== */

.svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.svc {
  border-top: 1px solid var(--line);
}

.svc-row {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,22rem) 44px;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(18px,2.4vw,28px) clamp(8px,1.5vw,20px);
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  isolation: isolate;
}

.svc-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--teal);
  z-index: -1;
  clip-path: polygon(0 0,0 0,-60px 100%,0 100%);
  transition: clip-path .45s cubic-bezier(.7,0,.2,1);
}

.svc-row:hover::before, .svc.open .svc-row::before {
  clip-path: polygon(0 0,calc(100% + 60px) 0,100% 100%,0 100%);
}

.svc-row:hover, .svc.open .svc-row {
  color: var(--on-teal);
}

.svc-row:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -3px;
}

.svc-name {
  font-size: clamp(2.1rem,5.6vw,4.6rem);
  font-weight: 800;
  font-stretch: 64%;
  line-height: 1;
  letter-spacing: -.01em;
}

.svc-teaser {
  font-size: 1rem;
  color: var(--muted);
  transition: color .3s;
}

.svc-row:hover .svc-teaser, .svc.open .svc-teaser {
  color: var(--on-teal);
}

.svc-icon {
  position: relative;
  width: 28px;
  height: 28px;
  justify-self: end;
}

.svc-icon::before, .svc-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 3px;
  background: currentColor;
  transform: translate(-50%,-50%);
  transition: transform .3s;
}

.svc-icon::after {
  transform: translate(-50%,-50%) rotate(90deg);
}

.svc.open .svc-icon::after {
  transform: translate(-50%,-50%) rotate(0);
}

.svc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s ease;
}

.svc.open .svc-panel {
  grid-template-rows: 1fr;
}

.svc-panel>div {
  overflow: hidden;
}

.svc-body {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,22rem) 44px;
  gap: 1.5rem;
  padding: 28px clamp(8px,1.5vw,20px) 40px;
  background: var(--surface);
}

.svc-body p {
  font-size: 1.15rem;
  max-width: 46ch;
}

.svc-body h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .8rem;
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  --c: 8px;
  background: var(--bg);
  padding: .4rem .8rem .4rem .7rem;
  font-size: .92rem;
  clip-path: polygon(0 0,calc(100% - var(--c)) 0,100% var(--c),100% 100%,0 100%);
}

/* Sección de servicios en el celeste del logo (igual en modo claro y oscuro) */
#servicios {
  --ink: #000000;
  --muted: #001A1E;
  --line: rgba(0,0,0,.25);
  --teal: #000000;
  --on-teal: #FFFFFF;
  background: var(--sect);
  color: #000000;
}

#servicios .svc-row:focus-visible {
  outline-color: #FFFFFF;
}

#servicios .svc-body {
  background: #000000;
  color: #FFFFFF;
}

#servicios .svc-body h4 {
  color: #5CD3E4;
}

#servicios .tags li {
  background: var(--sect);
  color: #000000;
}

#servicios ::selection {
  background: #000000;
  color: #FFFFFF;
}

/* Distribución: lista a la izquierda, detalle a la derecha (escritorio) */
.svc-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.05fr);
  gap: clamp(24px,3vw,48px);
  align-items: start;
}

.svc-detail {
  position: sticky;
  top: calc(env(safe-area-inset-top,0px) + var(--header-h) + 24px);
  background: #000000;
  color: #FFFFFF;
  padding: clamp(28px,3vw,44px);
}

.svc-detail h3 {
  font-size: clamp(2rem,3.4vw,3rem);
  font-weight: 850;
  font-stretch: 115%;
  line-height: 1;
  letter-spacing: -.02em;
}

.svc-detail .d-teaser {
  color: #5CD3E4;
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: .9rem;
}

.svc-detail .d-text {
  font-size: 1.1rem;
  margin-top: 1.1rem;
  max-width: 46ch;
  color: #E6F2F4;
}

.svc-detail h4 {
  font-size: .95rem;
  font-weight: 700;
  color: #5CD3E4;
  margin: 1.8rem 0 .8rem;
}

.svc-detail .d-cta {
  margin-top: 2.2rem;
}

/* Diafragma animado junto al texto de "Lo que hacemos" */
.iris {
  width: clamp(68px,8vw,112px);
  height: auto;
  flex: none;
  overflow: visible;
}

.iris .ir-body {
  fill: #000000;
}

.iris .ir-hole {
  fill: var(--sect);
}

.iris .ir-lines line {
  stroke: var(--sect);
  stroke-width: 3.2;
  stroke-linecap: round;
}

.iris .ir-ring {
  fill: none;
  stroke: #000000;
  stroke-width: 3;
}

.svc-detail.swap>* {
  animation: dIn .35s ease both;
}

@keyframes dIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width:981px) {
  #servicios .svc-row {
    grid-template-columns: minmax(0,1fr) 36px;
    padding: 16px 18px;
  }
  #servicios .svc-name {
    font-size: clamp(1.9rem,3.1vw,2.9rem);
  }
  #servicios .svc-teaser, #servicios .svc-panel {
    display: none;
  }
}

@media (max-width:980px) {
  .svc-layout {
    grid-template-columns: 1fr;
  }
  .svc-detail {
    display: none;
  }
}

@media (max-width:980px) {
  .svc-row, .svc-body {
    grid-template-columns: minmax(0,1fr) 36px;
  }
  .svc-teaser {
    display: none;
  }
  .svc-body>div:last-child {
    display: none;
  }
  .svc-body {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}
