/* =============================================================
   SOLUTIONS
================================================================ */

.solutions {
  width: 100%;
  min-height: 668px;
  padding: 92px 73px;
  box-sizing: border-box;
}

.solutions__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 80px;
}

.solutions__header h2 {
  margin: 0;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  width: 100%;
  max-width: 1800px;
  margin-inline: auto;
  justify-items: center;
}

.solution-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: 380px;
  min-width: 240px;
  height: 220px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}

.solution-card__background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.solution-card:nth-child(3) .solution-card__background,
.solution-card:nth-child(4) .solution-card__background {
  transform: rotate(180deg);
}

.solution-card__icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 50px !important;
  height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  transform: translate(-50%, -50%);
  object-fit: contain;
  pointer-events: none;
}


.solution-card span {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  width: 220px;
  padding: 7px 10px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.3);
  color: #fff !important;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
}

.solution-card strong {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 12px;
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
}

.solutions__all {
  width: 100%;
  max-width: 1800px;
  margin: 40px auto 60px;
  padding: 0 40px;
  box-sizing: border-box;
  text-align: right;
}



/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1199px) {

  .solution-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 90%;
  }


  .solution-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .solution-card:nth-child(3) .solution-card__background {
    content: url("../assets/backgrounds/background_product_blue.svg");
    transform: none;
  }

  .solution-card:nth-child(4) .solution-card__background {
    content: url("../assets/backgrounds/background_product_orange.svg");
    transform: none;
  }

}

/* ========================================
   MÓVIL
======================================== */

@media (max-width: 767px) {

  .solutions {
    padding: 70px var(--gutter);
  }

  .solutions__header {
    flex-direction: column;
    gap: 30px;
  }

  .solution-grid {
    grid-template-columns: 1fr;
    width: 80%;
  }

  .solution-card:nth-child(3) .solution-card__background {
    content: url("../assets/backgrounds/background_product_orange.svg");
    transform: rotate(180deg);
  }

  .solution-card:nth-child(4) .solution-card__background {
    content: url("../assets/backgrounds/background_product_blue.svg");
    transform: rotate(180deg);
  }
}



/* ==========================================================================
   Steps
   ========================================================================== */

.steps {
  width: min(100% - 80px, 1600px);
  margin: 0 auto;
  padding: 70px 0;
  display: block;
}

.steps__item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  min-height: 215px;
  padding: 30px 0;
  box-sizing: border-box;
  border-top: 1px solid var(--color-accent);
}

.steps__item:last-child {
  border-bottom: 1px solid var(--color-accent);
}

.steps__text {
  width: calc(100% - 110px);
  padding: 20px 0;
  box-sizing: border-box;
}

.steps__number {
  display: block;
  font-size: clamp(42px, 4.4vw, 64px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 18px;
}

.steps__item p {
  margin-top: 0;
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.steps__item>img {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
}


/* ========================================
   MÓVIL
======================================== */

@media (max-width: 767px) {

  .steps {
    width: 100%;
    padding: 70px 24px;
    box-sizing: border-box;
  }

  .steps__item {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 150px;
  }

  .steps__text {
    width: calc(100% - 65px);
  }

  .steps__item>img {
    width: 40px;
    height: 40px;
  }

}

/* =========================================================
   FRASE
   ========================================================= */

.service-statement {
  overflow: hidden;
  height: 100vh;
  display: flex;
  align-items: center;
}

.service-statement__text {
  display: block;
  width: max-content;
  white-space: nowrap;
  padding-left: 100vw;
  font-size: clamp(1.8rem, 6vw, 8rem);
  font-weight: 600;
  line-height: 1.1;
}

/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1199px) {

  .service-statement {
    height: 100vh;
    min-height: 0;
    padding: 0 20px;
  }

  .service-statement__text {
    font-size: 48px;
  }
}


/* =========================================================
   CTA
   ========================================================= */

.final-cta {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background);
}

.final-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(100% - 152px);
  height: 1px;
  transform: translateX(-50%);
  background: var(--color-accent);
}

.final-cta__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100% - 208px, 1231px);
  text-align: center;
  gap: 40px;
}

.final-cta__title {
  margin: 0 0 45px;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
}

.final-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 48px;
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 700;
}


/* ========================================
   MÓVIL
======================================== */

@media (max-width: 767px) {
  .final-cta {
    min-height: 400px;
    padding: 12px 12px;
  }

  .final-cta__title {
    font-size: 42px;
  }

  .final-cta::before {
    width: calc(100% - 24px);
  }
}


/* ==========================================================================
   Capabilities
   ========================================================================== */

.capabilities {
  position: relative;
  min-height: 1600px;
  padding: 125px 68px;
  box-sizing: border-box;
  background: var(--color-background);
}

.capabilities__content {
  width: min(100%, 1250px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 416px;
  gap: 70px;
  align-items: start;
}

.capabilities__intro {
  width: 100%;
  background: var(--color-background);
  max-width: 523px;
}

.capabilities__intro h2 {
  max-width: 497px;
}

.capabilities__intro p {
  margin-top: 24px;
  padding-bottom: 40px;
  max-width: 523px;
  line-height: 1.35;
}

.capabilities__items {
  display: flex;
  flex-direction: column;
  width: 416px;
  gap: 125px;
}

.capabilities__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 2px solid var(--color-accent);
  padding-left: 30px;
}

.capabilities__item>span {
  color: var(--color-accent);
}

  .capabilities__item:last-child {
    margin-bottom: 60px;
  }


/* ==========================================================================
   Capabilities - Tablet
   ========================================================================== */

@media (max-width: 1199px) {

  .capabilities {
    min-height: auto;
    padding: 80px 40px;
    position: relative;
  }

  .capabilities__content {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .capabilities__intro {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
  }

  .capabilities__intro::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -80px;
    bottom: 0;
    left: -200px;
    right: -200px;
    background: var(--color-background);
  }

  .capabilities__items {
    width: 100%;
    max-width: 520px;
    margin: 70px auto 0;
    gap: 70px;
  }

  .capabilities__item:last-child {
    margin-bottom: 40px;
  }

}

/* ========================================
   MÓVIL
======================================== */

@media (max-width: 767px) {

  .capabilities {
    min-height: auto;
    padding: 70px 20px;
  }

  .capabilities__content {
    width: 85%;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .capabilities__intro {
    width: 100%;
    max-width: none;
    margin: 0 auto;
  }

  .capabilities__items {
    width: 100%;
    max-width: none;
    margin: 60px auto 0;
    gap: 55px;
  }

  .capabilities__intro::before {
    bottom: 0;
  }

  .capabilities__item:last-child {
    padding-bottom: 1px;
  }

}



/* ==========================================================================
   PROCESS 
   ========================================================================== */

.process {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  grid-template-rows: auto 1fr;
  column-gap: 100px;
  min-height: 960px;
  padding: 200px 50px;
}

.process>h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.process__statement {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  width: 100%;
  margin: 25px 0 0;
  line-height: 1.45;
}

.process__steps {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 120px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process__steps li {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 25px;
  margin: 0;
}

.process__steps li>span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  line-height: 1;
}

.process__steps h3 {
  margin: 0;
}

.process__steps p {
  max-width: 623px;
  margin: 8px 0 0;
}

.process__steps em {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-style: normal;
  line-height: 1.3;
}


/* ========================================
   MÓVIL
======================================== */

@media (max-width: 767px) {
  .process {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: 50px;
    min-height: auto;
    padding: 70px 50px;
  }

  .process>h2 {
    grid-column: 1;
    grid-row: 1;
  }

  .process__statement {
    grid-column: 1;
    grid-row: 2;
    margin: -30px 0 0;
  }

  .process__steps {
    grid-column: 1;
    grid-row: 3;
    gap: 38px;
  }

}


/* Final CTA */

.final-cta {
  min-height: 528px;
  padding: 50px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding-bottom: 90px;
}

.final-cta h2 {
  max-width: 900px;
  margin: 0;
}

.final-cta p {
  width: 719px;
  max-width: none;
  margin: 28px 0 0;
  padding: 0;
}

.final-cta__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 40px 0 0;
  padding: 0;
}

.final-cta__actions .button--accent,
.final-cta__actions .button--outline {
  margin-left: 0 !important;
}


.final-cta--centered {
  min-height: 500px;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
}


.final-cta--centered .final-cta__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
  width: 60%;
}

.final-cta--centered .final-cta__title {
  margin: 0 0 45px;
}

/* ========================================
   MÓVIL
======================================== */

@media (max-width: 767px) {
  .final-cta {
    min-height: 400px;
    padding: 70px 20px
  }

  .final-cta p {
    width: 100%;
  }

  .final-cta__actions {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 30px;
  }

  .final-cta--centered .final-cta__content {
    width: 80%;
  }
}



/* =============================================================
   VOLVER ARRIBA
============================================================= */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-text-dark);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.back-to-top svg {
  display: block;
}

@media (max-width: 768px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}


/* =========================================================
   PÁGINAS LEGALES (aviso legal, privacidad, cookies)
========================================================= */

.legal-page .site-header {
  position: relative;
  background: var(--color-background);
}


/* ---------- Hero ---------- */

.legal-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-white);
}

.legal-hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.legal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 25, 38, 0.82), rgba(0, 25, 38, 0.38));
}

.legal-hero .container {
  position: relative;
  z-index: 1;
  padding-block: 100px;
}

.legal-hero h1 {
  font-family: var(--font-body);
  color: var(--color-white);
}

.legal-hero span {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 1000px;
}

.legal-hero p {
  max-width: 720px;
  margin-top: 24px;
  line-height: 1.5;
}

/* Icono de scroll */
.legal-hero__scroll {
  position: absolute;
  z-index: 1;
  right: var(--gutter);
  bottom: 32px;
  width: 24px;
  height: 38px;
  border: 1px solid var(--color-white);
  border-radius: 20px;
}

.legal-hero__scroll::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--color-white);
}


/* ---------- Contenido ---------- */

.legal-content {
  padding: 80px 0 120px;
}

.legal-content article {
  width: min(900px, calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.legal-content article> :first-child {
  margin-top: 0;
}

.legal-content h2 {
  margin: 64px 0 24px;
}

.legal-content h3 {
  margin: 40px 0 16px;
}

.legal-content p,
.legal-content li {
  font-size: 17px;
  line-height: 1.8;
}

.legal-content p {
  margin-bottom: 22px;
}

.legal-content ul {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.legal-content li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 24px;
}

.legal-content li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.legal-content a {
  color: var(--color-accent);
  font-size: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-content a:hover {
  color: var(--color-primary);
}

/* Nota destacada (política de privacidad) */
.legal-content blockquote {
  margin: 0 0 32px;
  padding-left: 20px;
  border-left: 3px solid var(--color-accent);
  font-style: italic;
}

.legal-content blockquote p {
  margin-bottom: 0;
  font-size: 15px;
}

/* Tabla (política de privacidad) */
.legal-content table {
  width: 100%;
  margin: 28px 0 48px;
  border-collapse: collapse;
}

.legal-content th,
.legal-content td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 63, 92, 0.16);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

.legal-content th {
  width: 28%;
  background: rgba(0, 63, 92, 0.06);
}


/* ---------- Móvil ---------- */

@media (max-width: 767px) {

  .legal-hero {
    min-height: 400px;
  }

  .legal-hero .container {
    padding-block: 64px;
  }

  .legal-hero__scroll {
    bottom: 20px;
  }

  .legal-content {
    padding: 48px 0 72px;
  }

  .legal-content h2 {
    margin: 44px 0 18px;
  }

  .legal-content h3 {
    margin: 32px 0 12px;
  }

  .legal-content p,
  .legal-content li {
    font-size: 15px;
    line-height: 1.75;
  }

  .legal-content th,
  .legal-content td {
    padding: 12px;
  }

  .legal-content th {
    width: 34%;
  }
}