/* Monteleva Cumbres 101 - Template Specific Colors */
:root {
  --lighter: #F6F7F0;
  --light: #F6F7F0;
  --gray: #B5CCBE;
  --medium: #184C38;
  --dark: #2E3D31;
  --darker: #2E3D31;
  --gold: #AE983F;
  --gold-dk: #8C7A30;
}

@font-face {
  font-family: 'Alike';
  src: url('../../fonts/Alike-Regular.woff2') format('woff2');
  font-display: swap;
}

/* Hero: header logo lockup, gold variant (page-scoped; #inicio beats hero-banner.css, which loads after this file) */
#inicio .hero-banner__logo img {
  display: inline-block; /* Tailwind preflight sets block, which breaks the mobile centering */
  vertical-align: top;
  width: clamp(16rem, 31vw, 28rem);
  height: auto;
}

#inicio .hero-banner__description-main {
  max-width: 27rem;
  font-size: 1.3rem;
}

/* Hero CTA row: gold filled + white outline */
.hero-banner__ctas-link {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--darker);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.hero-banner__ctas-link:hover {
  background: #fff;
  border-color: #fff;
}

.hero-banner__ctas-link.is-outline {
  background: transparent;
  border-color: #fff;
  color: #fff;
}

.hero-banner__ctas-link.is-outline:hover {
  background: #fff;
  color: var(--darker);
}

/* Feature-split slider dots: forest active, light inactive (design) */
.feature-split__slider .slick-dots li button:before {
  font-size: 10px;
  color: var(--darker) !important; /* custom-slider.css forces var(--light) !important globally */
  opacity: 0.25;
}

.feature-split__slider .slick-dots li.slick-active button:before {
  opacity: 1;
}

/* Hero: slow zoom-out on the background (Ken Burns, Randia-style). Runs on every slide,
   not just .active: sliders.js swaps .active every 2.5s, and removing a running
   animation snaps the outgoing image back to its start scale mid-fade. */
#inicio .hero-banner__background {
  background-attachment: scroll; /* a transformed element can't keep a fixed background */
  animation: cumbres-hero-zoom-out 15s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes cumbres-hero-zoom-out {
  from { transform: scale(1.15); }
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  #inicio .hero-banner__background {
    animation: none;
  }
}

/* Amenities slider dots: white, over the photo. slick-theme's 30px .slick-dotted margin
   left an empty band under the photo; the dots sit over it anyway */
.cumbres-amenities__slider.slick-dotted.slick-slider {
  margin-bottom: 0;
}

.cumbres-amenities__dots {
  bottom: 24px;
}

.cumbres-amenities__dots li button:before {
  color: #fff !important; /* custom-slider.css forces var(--light) !important globally */
  opacity: 0.5;
}

.cumbres-amenities__dots li.slick-active button:before {
  opacity: 1;
}

/* Referral program: Cumbres look via ids/structure, so the shared component stays untouched.
   Children of .container-fluid: 1 trigger, 2 title row, 3 image + steps, 4 button row. */
#referral-title {
  font-family: 'Nimbus Sans L', sans-serif;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

#referral-subtitle,
#referral-subtitle em {
  font-family: 'Nimbus Sans L', sans-serif;
  font-style: italic;
}

#steps-container .step-item:nth-child(1) { background-color: #0F5E40; }
#steps-container .step-item:nth-child(2) { background-color: #157556; }
#steps-container .step-item:nth-child(3) { background-color: #148C61; }

@media (min-width: 1024px) {
  #programa-de-referidos .container-fluid > div:nth-child(3) > div:first-child {
    background-color: var(--gray);
    border-bottom-left-radius: 3rem;
    margin-left: 8%;
  }
}

#programa-de-referidos .container-fluid > div:nth-child(4) {
  background-color: var(--light);
}

#referral-modal-trigger {
  background-color: var(--medium);
  color: #fff;
  border-radius: 0;
}

#referral-modal-trigger:hover {
  background-color: var(--darker);
}

#bottom-line {
  color: var(--dark);
  font-style: normal;
}

#steps-container h4,
#bottom-line {
  font-family: 'Nimbus Sans L', sans-serif;
}

/* Contact card form: boxed fields + full-width button (ids beat forms.css, which loads after this file) */
#contacto .wpforms-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

#contacto .wpforms-field input,
#contacto .wpforms-field select,
#contacto .wpforms-field textarea {
  border: 1px solid rgba(46, 61, 49, 0.6);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 1.125rem;
  color: var(--darker);
  background-color: transparent;
}

#contacto .wpforms-field input::placeholder,
#contacto .wpforms-field textarea::placeholder {
  color: var(--darker);
}

#contacto .wpforms-submit {
  width: 100%;
  border-radius: 12px;
  padding: 12px 32px;
  font-size: 1.25rem;
  font-weight: 400;
  background-color: var(--darker);
}

/* Nav: section links + CTA + socials must fit one row (ids beat navigation.css) */
/* .container max-width equals the breakpoint and md:px-0 drops the gutter, so at
   768/1024/1280px the logo and toggle touched the screen edge; keep 24px minimum */
@media (min-width: 768px) {
  #main-navigation .nav-container {
    width: calc(100% - 48px);
  }
}

#main-navigation .nav-logo {
  flex-shrink: 0;
  margin-right: 24px;
}

#main-navigation .desktop-menu,
#main-navigation .nav-menu-list {
  gap: 18px;
}

#main-navigation .nav-menu-list a {
  font-size: 0.9375rem;
  white-space: nowrap;
}

#main-navigation .nav-menu-list a::after {
  background-color: var(--gold);
}

/* Current section: each link fades its own line in, replacing the shared gliding bar */
#main-navigation .nav-menu-list::after {
  display: none;
}

#main-navigation .nav-menu-list.has-spy a::after {
  display: block;
  width: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#main-navigation .nav-menu-list.has-spy a.is-current::after {
  opacity: 1;
  transition: opacity 0.8s ease 0.2s; /* fade-in only: the old line leaves right away */
}

@media (prefers-reduced-motion: reduce) {
  #main-navigation .nav-menu-list.has-spy a::after,
  #main-navigation .nav-menu-list.has-spy a.is-current::after {
    transition: none;
  }
}

/* Outline CTA: keep the label weight on hover (shared slide-bg hover bolds it) */
#main-navigation .nav-cta-slide-bg:hover span {
  font-weight: inherit;
}

/* Over the hero (not scrolled) the hover sweep is gold, not white */
#main-navigation:not(.scrolled) .nav-cta-slide-bg:hover {
  border-color: var(--gold);
}

#main-navigation:not(.scrolled) .nav-cta-slide-bg::before {
  background-color: var(--gold);
}

#main-navigation:not(.scrolled) .nav-cta-slide-bg:hover span {
  color: #fff;
}

@media (min-width: 1025px) and (max-width: 1279px) {
  #main-navigation .nav-social-links {
    display: none;
  }

  #main-navigation .desktop-menu,
  #main-navigation .nav-menu-list {
    gap: 14px;
  }

  #main-navigation .nav-menu-list a {
    font-size: 0.875rem;
  }
}

/* 8 links + brochure overflow just above the 1024px mobile menu */
@media (max-width: 1100px) {
  #main-navigation .desktop-menu,
  #main-navigation .nav-menu-list {
    gap: 10px;
  }

  #main-navigation .nav-menu-list a {
    font-size: 0.8125rem;
  }
}

/* Anchor jumps land below the fixed nav (94px desktop, 78px with the mobile toggle) */
html:root {
  scroll-padding-top: 94px;
}

@media (max-width: 1024px) {
  html:root {
    scroll-padding-top: 78px;
  }
}

/* Zoom modal (components/cumbres-zoom-modal.php): full-screen infinite slider */
.cz-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 28, 22, 0.97);
  color: #fff;
}

.cz-modal[hidden] {
  display: none;
}

.cz-modal__track {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cz-modal__rail {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.cz-modal__slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 0 148px; /* 60px nav + 28px offset + 60px clear of the content */
}

.cz-modal__slide > img {
  height: 90vh;
  max-width: 100%;
  object-fit: contain;
  justify-self: center;
}

.cz-modal__close {
  position: absolute;
  top: 16px;
  right: 24px;
  z-index: 2;
  font-size: 2.25rem;
  line-height: 1;
}

.cz-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.cz-modal__nav--prev { left: 28px; }
.cz-modal__nav--next { right: 28px; }

.cz-modal__dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.cz-modal__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.3;
}

.cz-modal__dots span.is-active {
  opacity: 1;
}

body.cz-open {
  overflow: hidden;
}

@media (max-width: 800px) {
  .cz-modal__slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 16px;
    padding: 64px 24px 96px; /* bottom clears the nav buttons */
    overflow-y: auto;
  }

  .cz-modal__slide > img {
    height: auto;
    max-height: 36vh; /* keeps the details above the nav buttons on a phone */
  }

  .cz-modal__nav {
    top: auto;
    bottom: 12px;
    transform: none;
  }

  .cz-modal__nav--prev { left: 16px; }
  .cz-modal__nav--next { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .cz-modal__rail {
    transition: none;
  }
}

/* Nuestras torres (components/towers-section.php) */
/* dark bronze: the darkest gold that keeps 4.5:1 on the #AE983F band (lighter golds fail) */
.towers__eyebrow {
  color: #3A300E;
}

/* Feature split, framed variant (Roof Garden / Estacionamiento): ghost arrows + thumbs.
   White over photos; dark on plan slides, whose background is white (.is-plan, cumbres101.js) */
.feature-split__arrow {
  position: absolute;
  bottom: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

/* mouse users see the arrows on hover; touch has no hover, so they stay visible there */
@media (hover: hover) {
  .feature-split__arrow {
    opacity: 0;
  }

  .feature-split__framed:hover .feature-split__arrow,
  .feature-split__framed:focus-within .feature-split__arrow {
    opacity: 1;
  }
}

.feature-split__arrow:hover {
  background: #fff;
  color: var(--darker);
}

.feature-split__framed.is-plan .feature-split__arrow {
  border-color: var(--darker);
  color: var(--darker);
}

.feature-split__framed.is-plan .feature-split__arrow:hover {
  background: var(--darker);
  color: #fff;
}

.feature-split__next-btn { right: 14px; }
.feature-split__prev { right: 62px; }

.feature-split__progress {
  height: 3px;
  margin-top: 10px;
  background: rgba(46, 61, 49, 0.12);
}

.feature-split__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
}

.feature-split__progress span.is-running {
  animation: fs-bar var(--fs-interval, 5000ms) linear forwards;
}

.feature-split__framed.is-paused .feature-split__progress span {
  animation-play-state: paused;
}

@keyframes fs-bar {
  to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .feature-split__progress span.is-running {
    animation: none;
    width: 100%;
  }
}

.feature-split__thumb {
  opacity: 0.5;
  border: 2px solid transparent;
  transition: opacity 0.3s, border-color 0.3s;
}

.feature-split__thumb.is-active,
.feature-split__thumb:hover {
  opacity: 1;
}

.feature-split__thumb.is-active {
  border-color: var(--gold);
}

/* Amenidades: icon of the current slide in a gold disc with a 4s progress bar */
/* dim the children, not the button: AOS's .aos-animate sets the button's opacity to 1 */
.cumbres-amenities__item > * {
  transition: opacity 0.3s;
}

.cumbres-amenities__item:not(.is-active):not(:hover) > * {
  opacity: 0.55;
}

.cumbres-amenities__disc {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.cumbres-amenities__item.is-active .cumbres-amenities__disc {
  background: var(--gold);
}

.cumbres-amenities__item.is-active .cumbres-amenities__name {
  color: var(--gold);
}

.cumbres-amenities__bar {
  position: relative;
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.cumbres-amenities__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--gold);
}

.cumbres-amenities__item.is-active .cumbres-amenities__bar::after {
  animation: amenities-bar 4.7s linear forwards; /* the 4700ms timer in cumbres101.js */
}

.cumbres-amenities.is-paused .cumbres-amenities__item.is-active .cumbres-amenities__bar::after {
  animation-play-state: paused;
}

@keyframes amenities-bar {
  to { width: 100%; }
}

/* label text cross-fade; .is-out toggled in cumbres101.js at half the 700ms slide fade */
.cumbres-amenities__label-text {
  display: inline-block;
  transition: opacity 0.35s;
}

.cumbres-amenities__label-text.is-out {
  opacity: 0;
}

/* slow zoom-out on the slide that is showing */
.cumbres-amenities__slider .slick-slide img {
  transform: scale(1.06);
  transition: transform 5s ease-out;
}

.cumbres-amenities__slider .slick-current img {
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .cumbres-amenities__slider .slick-slide img {
    transform: none;
    transition: none;
  }

  .cumbres-amenities__label-text {
    transition: none;
  }

  .cumbres-amenities__item.is-active .cumbres-amenities__bar::after {
    animation: none;
    width: 100%;
  }
}

/* Avance de obra: pulsing play button */
.avances__play {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background-color 0.3s, border-color 0.3s;
}

.avances__play:hover {
  transform: scale(1.08);
  background: var(--gold);
  border-color: var(--gold);
}

.avances__play::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: avances-ring 2s ease-out infinite;
}

@keyframes avances-ring {
  from { transform: scale(0.8); opacity: 1; }
  to { transform: scale(1.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .avances__play::after {
    animation: none;
    opacity: 0;
  }
}

/* Footer social links: round outline buttons, gold on hover */
.cumbres-footer__social .social-links {
  display: flex;
  gap: 12px;
}

.cumbres-footer__social .social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, border-color 0.3s;
}

.cumbres-footer__social .social-link:hover {
  background: var(--gold);
  border-color: var(--gold);
}

.cumbres-footer__social .social-icon {
  width: 18px;
  height: 18px;
}

/* Contacto: forest gradient over the photo (chosen in the demo round) */
#contacto .contacto__overlay {
  background: linear-gradient(90deg, rgba(46, 61, 49, 0.85), rgba(46, 61, 49, 0.3));
}

#contacto .contacto__card {
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

#contacto .wpforms-field input,
#contacto .wpforms-field select,
#contacto .wpforms-field textarea {
  border-color: var(--darker);
}

#contacto .wpforms-submit {
  background-color: var(--gold);
  color: var(--darker);
}

/* Departamentos: on short desktop viewports the plans shrink so the card head, the plan
   and the "Ambos incluyen" row fit on one screen (nav 94 + head 94 + paddings + row ~150) */
@media (min-width: 1024px) {
  #departamentos .tipologias__plan img {
    height: clamp(300px, calc(100vh - 340px), 520px);
  }
}

.towers__card-img {
  cursor: zoom-in;
}

.towers__card-img img {
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.towers__card-img:hover img {
  transform: scale(1.04);
}

/* icon row: icons sit slightly dimmed, full strength and a touch larger when their item is hovered */
.towers__icon {
  opacity: 0.85;
  transition: opacity 0.3s, transform 0.3s;
}

li:hover > .towers__icon {
  opacity: 1;
  transform: scale(1.1);
}

/* CTA Golden Sweep (initCtaSweep in cumbres101.js): on hover or keyboard focus a brand-colour
   layer wipes in from the left and out to the right. It spans the border box (negative inset
   by the border width) so the border is swept too and the hover shows one colour. Each button
   keeps its own colours, restated so the old :hover fills and the WPForms hover lift stay off;
   :is(#…) carries an id to beat "#contacto .wpforms-submit". */
:is(#inicio, #avances, #contacto) .cm-btn,
:is(#inicio, #avances, #contacto) .cm-btn:hover {
  position: relative;
  isolation: isolate;
  background: var(--cm-bg);
  border-color: var(--cm-line);
  color: var(--cm-text);
  transform: none;
  box-shadow: none;
  transition: color 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

#inicio .cm-btn { /* gold fill → darkest forest, gold text */
  --cm-bg: #AE983F;
  --cm-line: #AE983F;
  --cm-text: #2E3D31;
  --cm-sweep: #2E3D31;
  --cm-ink: #AE983F;
}

#inicio .cm-btn.is-outline { /* white outline → cream */
  --cm-bg: transparent;
  --cm-line: #fff;
  --cm-text: #fff;
  --cm-sweep: #F6F7F0;
  --cm-ink: #2E3D31;
}

#avances .cm-btn { /* gold outline on forest → gold */
  --cm-bg: transparent;
  --cm-line: #AE983F;
  --cm-text: #AE983F;
  --cm-sweep: #AE983F;
  --cm-ink: #2E3D31;
}

#contacto .cm-btn { /* gold fill → forest */
  --cm-bg: #AE983F;
  --cm-line: #2E3D31;
  --cm-text: #2E3D31;
  --cm-sweep: #2E3D31;
  --cm-ink: #F6F7F0;
  --cm-bw: 0px; /* WPForms submit has no border */
}

:is(#inicio, #avances, #contacto) .cm-btn::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--cm-bw, 1px));
  border-radius: inherit;
  background: var(--cm-sweep);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

:is(#inicio, #avances, #contacto) .cm-btn.is-on {
  color: var(--cm-ink);
  transition-duration: 450ms;
}

:is(#inicio, #avances, #contacto) .cm-btn.is-on::before {
  transform: scaleX(1);
  transform-origin: left;
  transition-duration: 450ms;
}

@media (prefers-reduced-motion: reduce) {
  :is(#inicio, #avances, #contacto) .cm-btn,
  :is(#inicio, #avances, #contacto) .cm-btn::before {
    transition-duration: 0s !important;
  }
}

/* Hero scroll indicator: small caps label over a hairline with a white segment running down it */
#inicio .scroll-line {
  display: block;
  color: var(--lighter);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  padding-left: 0.3em; /* balances the trailing letter-spacing */
}

#inicio .scroll-line span {
  position: relative;
  display: block;
  width: 1px;
  height: 48px;
  margin: 10px auto 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

#inicio .scroll-line span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  animation: scroll-line 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scroll-line {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  #inicio .scroll-line span::after {
    animation: none;
  }
}

