.services-hero {
  position: relative;
  overflow: hidden;
}

.services-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../pexels-daniel-ledesma-1524324436-33183295.jpg");
  background-size: cover;
  background-position: center;
  filter: blur(5px) brightness(0.56);
  transform: scale(1.06);
}

.services-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(11, 22, 31, 0.74), rgba(11, 22, 31, 0.34));
}

.services-hero .container {
  position: relative;
  z-index: 1;
  color: #eef5f8;
}

.services-hero h1 {
  max-width: 860px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin-bottom: 10px;
  font-family: "Manrope", "SF Pro Display", sans-serif;
  letter-spacing: -0.02em;
}

[data-typewriter] {
  min-height: 30px;
  color: #dbe9f1;
  font-size: 1.06rem;
}

[data-typewriter]::after {
  content: "|";
  margin-left: 4px;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.services-title {
  margin: 0 0 20px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-family: "Manrope", "SF Pro Display", sans-serif;
}

.services-kpis {
  background: #eef3f6;
  border-top: 1px solid #d6e1e8;
  border-bottom: 1px solid #d6e1e8;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi-card {
  background: #d9dde2;
  border: 1px solid #c9d3db;
  border-radius: 20px;
  padding: 22px 18px;
  text-align: center;
}

.kpi-value {
  margin: 0;
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #101922;
  font-family: "Manrope", "SF Pro Display", sans-serif;
}

.kpi-label {
  margin: 12px 0 2px;
  font-size: 1rem;
  color: #253847;
  font-weight: 600;
}

.services-story {
  background: #f5f7f9;
}

.services-story.alt {
  background: #edf3f7;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.story-media {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  min-height: 400px;
  box-shadow: 0 18px 38px rgba(17, 33, 47, 0.14);
}

.story-media::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  pointer-events: none;
}

.story-media img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
}

.story-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-family: "Manrope", "SF Pro Display", sans-serif;
}

.story-copy p {
  margin: 0 0 12px;
  font-size: 1.14rem;
  color: #243745;
}

.story-copy ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.story-copy li {
  position: relative;
  padding-left: 16px;
  color: #1d2f3d;
  font-weight: 600;
}

.story-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2d5162;
}

.services-panels {
  background: #2d5162;
  color: #ecf3f7;
}

.services-panels .services-title {
  color: #ffffff;
}

.panels-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-panel {
  position: relative;
  min-height: 220px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(219, 232, 240, 0.22);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.service-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.8) contrast(1.02);
  transform: scale(1.03);
}

.service-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 16, 25, 0.25), rgba(6, 16, 25, 0.74));
}

.service-panel h3,
.service-panel p {
  position: relative;
  z-index: 1;
  margin: 0;
}

.service-panel h3 {
  font-size: 1.78rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-family: "Manrope", "SF Pro Display", sans-serif;
}

.service-panel p {
  margin-top: 10px;
  color: #dbe8ef;
  font-size: 1.02rem;
}

.panel-a::before {
  background-image: url("../bahia-de-santander.jpg");
}

.panel-b::before {
  background-image: url("../casita.jpg");
}

.panel-c::before {
  background-image: url("../02502-moah-arquitectos-santander-cantabria-casa-moderna-somo.jpg");
}

.panel-d::before {
  background-image: url("../interiorcasacant.webp");
}

.cta-form {
  padding: 30px;
}

.cta-form h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 14px;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cta-form form > .btn {
  margin-top: 14px;
}

@media (max-width: 980px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-grid,
  .panels-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .services-hero h1 {
    margin-bottom: 8px;
  }

  [data-typewriter] {
    min-height: 24px;
    font-size: 0.98rem;
  }

  .services-title {
    margin-bottom: 14px;
  }

  .kpi-grid {
    gap: 10px;
  }

  .kpi-card {
    border-radius: 14px;
    padding: 14px 10px;
  }

  .kpi-label {
    font-size: 0.92rem;
  }

  .story-grid {
    gap: 14px;
  }

  .story-media {
    min-height: 250px;
    border-radius: 14px;
  }

  .story-media::after {
    inset: 10px;
    border-radius: 10px;
  }

  .story-media img {
    min-height: 250px;
  }

  .story-copy h2 {
    font-size: 1.8rem;
  }

  .story-copy p {
    font-size: 1rem;
  }

  .service-panel {
    min-height: 190px;
    border-radius: 16px;
    padding: 18px 14px;
  }

  .service-panel h3 {
    font-size: 1.35rem;
  }

  .service-panel p {
    font-size: 0.94rem;
  }

  .cta-form {
    padding: 18px 14px;
    border-radius: 16px;
  }

  .cta-form form > .btn {
    width: 100%;
    margin-top: 10px;
  }
}
