/* VALXEM Hipotecario: exclusive presentation, shared components untouched. */
.mortgage-premium {
  --mortgage-paper: #f8f7f4;
  --mortgage-ink: #171717;
  --mortgage-gold: #95600b;
  --mortgage-light-gold: #e4bd72;
}

/* Rhythm and typography */
.mortgage-premium section {
  padding: clamp(60px, 7vw, 100px) 0;
}
.mortgage-premium .mortgage-light {
  background: var(--mortgage-paper);
  color: var(--mortgage-ink);
}
.mortgage-premium .mortgage-dark {
  background: #101113;
  color: #f8f7f4;
}
.mortgage-premium h2 {
  font-size: clamp(2rem, 3.3vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -.035em;
  margin: 16px 0 23px;
}
.mortgage-premium h3 {
  font-size: 1.13rem;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.mortgage-premium p {
  line-height: 1.7;
}
.mortgage-light p {
  color: #595650;
}
.mortgage-dark p {
  color: #c8c5bd;
}
.mortgage-heading {
  max-width: 790px;
  margin-bottom: 36px;
}
.mortgage-premium .section-tag {
  color: var(--mortgage-gold);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.mortgage-dark .section-tag {
  color: var(--mortgage-light-gold);
}
.mortgage-premium a:focus-visible,
.mortgage-premium summary:focus-visible {
  outline: 3px solid #b77915;
  outline-offset: 5px;
}
.mortgage-premium .btn-primary {
  background: #ddb366;
  border-color: #ddb366;
  color: #17130d;
  box-shadow: none;
}
.mortgage-premium .btn-primary:hover {
  background: #ebc783;
}
.mortgage-premium .btn-secondary {
  background: transparent;
  border-color: #6b6250;
  color: #f8f7f4;
}
.mortgage-card,
.mortgage-premium section {
  scroll-margin-top: 115px;
}

/* Architectural hero: original line composition, no photography */
.mortgage-premium .mortgage-hero {
  background: #101113;
  color: #f8f7f4;
  border-bottom: 1px solid #594827;
}
.mortgage-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.mortgage-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .76rem;
  color: #c8c5bd;
  margin-bottom: 32px;
}
.mortgage-breadcrumb a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.mortgage-hero .eyebrow {
  color: #e4bd72;
  font-size: .78rem;
  letter-spacing: .14em;
}
.mortgage-hero h1 {
  color: #f8f7f4;
  font-size: clamp(2.45rem, 4.7vw, 4.6rem);
  line-height: 1.07;
  letter-spacing: -.045em;
  margin: 23px 0;
}
.mortgage-hero h1 span {
  color: #e4bd72;
}
.mortgage-lead {
  max-width: 660px;
  color: #c8c5bd;
  font-size: 1.05rem;
}
.mortgage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.mortgage-hero-note {
  color: #c8c5bd;
  margin-top: 24px;
  font-size: .8rem;
}
.mortgage-architecture {
  position: relative;
  width: 100%;
  max-width: 440px;
  justify-self: center;
}
.mortgage-architecture svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 440 / 450;
  stroke-width: 1.4;
}
.architecture-frame {
  stroke: #493f30;
}
.architecture-gold {
  stroke: #ddb366;
}
.architecture-silver {
  stroke: #aaa69f;
}
.architecture-subtle {
  stroke: #595044;
}
.architecture-caption {
  display: block;
  color: #c8c5bd;
  text-align: center;
  font-size: .75rem;
  letter-spacing: .12em;
}

/* Quick project access */
.mortgage-needs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.mortgage-need {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 25px;
  background: #fff;
  border: 1px solid #dedad1;
  border-radius: 12px;
  color: #171717;
  text-decoration: none;
  transition: border-color .18s ease;
}
.mortgage-need:hover {
  border-color: #95600b;
}
.mortgage-need p {
  font-size: .9rem;
  flex: 1;
}
.mortgage-need>span {
  color: #835309;
  font-size: .78rem;
  font-weight: 650;
}

/* Eight official modalities */
.mortgage-modalities-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.mortgage-card {
  display: flex;
  flex-direction: column;
  padding: 26px 23px;
  border: 1px solid #3b372f;
  border-radius: 12px;
  background: #191a1d;
}
.mortgage-icon {
  display: block;
  color: #ddb366;
  margin-bottom: 25px;
}
.mortgage-icon svg {
  display: block;
  width: 30px;
  height: 30px;
}
.mortgage-card h3 {
  color: #f8f7f4;
  margin-bottom: 15px;
}
.mortgage-card p {
  flex: 1;
  font-size: .9rem;
  margin-bottom: 26px;
}
.mortgage-card-link {
  color: #ebc986;
  font-size: .84rem;
  font-weight: 650;
  line-height: 1.5;
  padding-top: 18px;
  border-top: 1px solid #3b372f;
}

/* Value and process */
.mortgage-values,
.mortgage-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.mortgage-values li {
  padding-top: 23px;
  border-top: 1px solid #c8bdab;
}
.mortgage-values h3,
.mortgage-process h3 {
  margin-bottom: 14px;
}
.mortgage-values p,
.mortgage-process p {
  font-size: .92rem;
}
.mortgage-process li {
  padding: 25px 0;
  border-top: 1px solid #6b5630;
}
.mortgage-process-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid #3b372f;
  margin-top: 12px;
}
.mortgage-process-cta p {
  max-width: 590px;
}
.mortgage-process-cta a {
  flex-shrink: 0;
}
.mortgage-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 105px);
}
.mortgage-considerations ul {
  padding-left: 20px;
  margin-top: 25px;
  line-height: 1.7;
}
.mortgage-considerations li+li {
  margin-top: 12px;
}

/* Native accessible FAQ */
.mortgage-premium .mortgage-faq-section {
  padding-top: 0;
}
.mortgage-faq details {
  border-bottom: 1px solid #d8d2c7;
}
.mortgage-faq summary {
  cursor: pointer;
  position: relative;
  padding: 20px 30px 20px 0;
  font-weight: 650;
  line-height: 1.5;
  list-style: none;
}
.mortgage-faq summary::-webkit-details-marker {
  display: none;
}
.mortgage-faq summary::after {
  content: '+';
  position: absolute;
  right: 3px;
  top: 20px;
  color: #835309;
}
.mortgage-faq details[open] summary::after {
  content: '−';
}
.mortgage-faq details p {
  padding-bottom: 23px;
  font-size: .92rem;
}

/* Other corporate routes and transparency */
.mortgage-other h2 {
  font-size: clamp(1.7rem, 2.5vw, 2.4rem);
}
.mortgage-other nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px;
  margin-top: 28px;
}
.mortgage-other a {
  display: block;
  border-top: 1px solid #6b5630;
  padding-top: 18px;
  color: #e4bd72;
}
.mortgage-other strong {
  display: block;
  margin-bottom: 10px;
}
.mortgage-other a>span {
  display: block;
  color: #c8c5bd;
  font-size: .83rem;
  line-height: 1.6;
}
.mortgage-transparency p+p {
  margin-top: 20px;
}
.mortgage-small {
  font-size: .83rem;
}

/* Closing conversion */
.mortgage-final {
  text-align: center;
  border-top: 1px solid #6b5630;
}
.mortgage-premium .mortgage-final h2 {
  max-width: 800px;
  margin-inline: auto;
  text-align: center;
}
.mortgage-final p {
  max-width: 670px;
  margin: 0 auto 28px;
}
.mortgage-final small {
  display: block;
  color: #c8c5bd;
  font-size: .73rem;
  margin-top: 22px;
}

/* Responsive adaptations */
@media (max-width: 1050px) {
  .mortgage-needs-grid,
  .mortgage-modalities-grid,
  .mortgage-values,
  .mortgage-process,
  .mortgage-other nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .mortgage-hero-grid,
  .mortgage-split {
    grid-template-columns: 1fr;
  }
  .mortgage-architecture {
    max-width: 260px;
    margin-top: 10px;
  }
  .mortgage-actions {
    flex-direction: column;
  }
  .mortgage-actions a {
    justify-content: center;
  }
  .mortgage-process-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 480px) {
  .mortgage-needs-grid,
  .mortgage-modalities-grid,
  .mortgage-values,
  .mortgage-process,
  .mortgage-other nav {
    grid-template-columns: 1fr;
  }
  .mortgage-hero h1 {
    font-size: 2.35rem;
  }
  .mortgage-premium .btn-primary,
  .mortgage-premium .btn-secondary {
    white-space: normal;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mortgage-premium a {
    transition: none;
  }
}

/* Menú móvil: destinos accesibles en ventanas de poca altura. */
@media (max-width: 1050px) {
  body:has(> main.mortgage-premium) > header #main-nav.is-open {
    max-height: calc(100dvh - 120px);
    flex-wrap: nowrap;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body:has(> main.mortgage-premium) > header #main-nav.is-open > * {
    flex-shrink: 0;
  }
}

@media (max-width: 340px) {
  body:has(> main.mortgage-premium) > header #main-nav.is-open {
    max-height: calc(100dvh - 185px);
  }
}

/* Compensar el encabezado fijo únicamente en escritorio. */
@media (min-width: 1051px) {
  .mortgage-premium .mortgage-hero {
    padding-top: calc(89px + clamp(60px, 7vw, 100px));
  }
}
