/* Estilo común basado en la referencia «Soluciones legales». */
:root {
  --lf-title-font: "Times New Roman", Times, serif;
  --lf-title-gold: #c7a343;
  --lf-title-gradient: linear-gradient(100deg, #c19a3d 0%, #e5d38b 37%, #ba8c2c 57%, #e3d08a 80%, #bd932f 100%);
  --lf-reference-mist: #e7e8f3;
}

html body :is(h1, h2, h3, h4, h5, h6, [role="heading"]) {
  font-family: var(--lf-title-font) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  color: var(--lf-title-gold) !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  html body :is(h1, h2, h3, h4, h5, h6, [role="heading"]) {
    background-image: var(--lf-title-gradient) !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }
}

html body :is(h1, h2, h3, h4, h5, h6, [role="heading"]) :is(span, em, strong, a) {
  font-family: inherit !important;
  font-weight: inherit !important;
  font-style: inherit !important;
  color: inherit !important;
  background-image: none !important;
  -webkit-text-fill-color: inherit !important;
  text-shadow: none !important;
}

/* Centrar el degradado sobre las letras de los títulos, sin espacio lateral vacío. */
html body :is(.section-shell > .section-title, .case-hero h1, .cases-intro h2,
  .services-cover-hero h1, .contact-hero-center h1, .mobile-title h1,
  .case-final-banner h2, .value-card h3) {
  width: fit-content !important;
  max-width: 100%;
  margin-inline: auto !important;
}
html body .about-hero h1 {
  width: max-content !important;
  max-width: calc(100% - 40px) !important;
}
html body .section-title { font-size: 40px !important; }

/* Inicio: proporciones, texto y solape de las tres tarjetas de referencia. */
body.native-home-flow { --mist: var(--lf-reference-mist); }
body.native-home-flow .value-cards {
  width: min(980px, calc(100% - 80px));
  gap: 53px;
  bottom: -276px;
}
body.native-home-flow .value-card {
  min-height: 460px;
  padding: 54px 26px 60px;
  box-shadow: none;
}
html body.native-home-flow .value-card h3 {
  font-size: 24px;
  font-weight: 700 !important;
  line-height: 1.23;
  margin: 28px 0 24px;
}
body.native-home-flow .value-card p {
  color: #000;
  font: 400 14px/1.56 "Montserrat", Arial, sans-serif;
  text-align: justify;
}
body.native-home-flow .value-card .ornament { width: 118px; }
body.native-home-flow .value-card .ornament::before,
body.native-home-flow .value-card .ornament::after { background: #e3dbd0; }
body.native-home-flow .value-card .ornament i {
  width: 12px;
  height: 12px;
  border: 2px solid #e3dbd0;
  margin: 0 4px;
}
body.native-home-flow .solutions { padding-top: 365px; }

/* Servicios: retirar 20 puntos del espacio superior y dejar el 10% restante en blanco. */
body.services-page #portfolio {
  --practice-top-space: 10vh;
  background: linear-gradient(to bottom, #fff 0 var(--practice-top-space), #041f40 var(--practice-top-space) 100%) !important;
  height: auto !important;
  min-height: 0 !important;
  padding-top: var(--practice-top-space) !important;
}
body.services-page #portfolio .pf-view {
  flex: none;
  height: max(620px, 80vh);
}
body.services-page #portfolio::before,
body.services-page #portfolio::after,
body.services-page #portfolio .pf-arrow,
body.services-page #portfolio .pf-orbit-dot {
  top: calc(var(--practice-top-space) + max(310px, 40vh));
}

/* Casos de éxito: dos pilas independientes, sin filas compartidas. */
.cases-section {
  background: var(--lf-reference-mist) !important;
  overflow-anchor: none;
}
.cases-shell { width: min(970px, calc(100% - 56px)) !important; }
.cases-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: none !important;
  grid-auto-flow: row !important;
  gap: 54px !important;
  align-items: start !important;
}
.cases-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}
.case-accordion {
  border: 1px solid #fff !important;
  border-radius: 5px !important;
}
.case-accordion summary,
.case-accordion[open] summary {
  min-height: 0 !important;
  padding: 18px 42px 18px 17px !important;
  font: 700 16px/14px "Times New Roman", Times, serif !important;
  letter-spacing: normal !important;
  text-wrap: wrap !important;
}
.case-accordion summary::after {
  content: "" !important;
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  right: 22px !important;
  transform: translateY(-65%) rotate(45deg) !important;
}
.case-accordion[open] summary::after {
  top: 24px !important;
  transform: rotate(225deg) !important;
}
html body .cases-intro h2 { font-size: 40px !important; }

@media (max-width: 1050px) and (min-width: 701px) {
  body.native-home-flow .value-cards { gap: 24px; width: calc(100% - 48px); }
  body.native-home-flow .value-card { padding-inline: 20px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  body.native-home-flow .value-cards {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  body.native-home-flow .value-cards {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: min(580px, calc(100% - 40px));
    grid-template-columns: 1fr;
    gap: 24px;
  }
  body.native-home-flow .value-card { min-height: 0; padding: 42px 28px 48px; }
  body.native-home-flow .solutions { padding-top: 80px; }
  .cases-shell { width: min(760px, calc(100% - 34px)) !important; }
  .cases-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .cases-column { gap: 24px; }
}
@media (max-width: 700px) {
  body.services-page #portfolio .pf-view { height: max(600px, 80vh); }
  body.services-page #portfolio .pf-arrow { top: auto; bottom: 4.5vh; }
  body.services-page #portfolio .pf-progress { bottom: 92px; }
  body.services-page #portfolio .pf-card h3 { font-size: clamp(32px, 8.7vw, 40px); }
  .case-accordion summary,
  .case-accordion[open] summary { font-size: 16px !important; line-height: 1.06 !important; }
  html body .cases-intro h2 { font-size: 32px !important; }
  html body .section-title { font-size: 34px !important; }
  .experience-image { margin: 0; max-width: 100%; }
}
