/*
Theme Name: Salient Child Theme
Description: This is a custom child theme for Salient
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: ThemeNectar
Author URI:  https://themeforest.net/user/themenectar
Template: salient
Version: 1.0
*/

/* =========================================================
 * PageSpeed · Home CLS
 * Salient calcula tarde el full-height del hero y desplaza la columna
 * hacia abajo. Aplicamos desde el primer render su geometría final.
 * ========================================================= */
.nectar-sticky-row-wrap--top > .wpb_row.vc_row-o-full-height,
.nectar-sticky-row-wrap--top > .wpb_row.vc_row-o-full-height > .row_col_wrap_12 {
  min-height: calc(100vh - 1px) !important;
}

.nectar-sticky-row-wrap--top > .wpb_row.vc_row-o-columns-bottom > .row_col_wrap_12 {
  display: flex !important;
  align-items: flex-end !important;
}

/* Fitty termina ocupando ~22px en móvil; reservamos ese espacio antes del JS. */
.nectar-sticky-row-wrap--top .nectar-split-heading[data-has-fit-text="true"] {
  min-height: clamp(22px, 2.4vw, 42px);
}

/* Home · ajuste fino para portátiles: apenas más pequeño para evitar saltos de línea. */
@media only screen and (min-width: 1000px) {
  body.home .nectar-sticky-row-wrap--top .nectar-split-heading.font_size_4rem {
    font-size: 3.8rem !important;
    line-height: 1.1 !important;
  }
}

/* =========================================================
 * Hero · fondo de soporte durante scroll/parallax
 * Limitado exclusivamente al hero: no altera el fondo general de la página
 * ni las transiciones de color del footer.
 * ========================================================= */
.nectar-sticky-row-wrap--top,
.nectar-sticky-row-wrap--top > .wpb_row,
body.single-portfolio #page-header-wrap,
body.single-portfolio #page-header-bg {
  background-color: #f2f2f2 !important;
}

/* =========================================================
 * PageSpeed · Home móvil: render inicial estático
 * En móvil priorizamos que el contenido sea visible desde el primer frame.
 * Neutralizamos animaciones/transformaciones de Salient que dependen de JS.
 * ========================================================= */
@media only screen and (max-width: 999px) {
  body.home .nectar-split-heading,
  body.home .nectar-split-heading *,
  body.home .custom-trigger,
  body.home .scroll-timeline,
  body.home [data-nectar-animate-settings],
  body.home [data-bg-animation]:not([data-bg-animation="none"]),
  body.home .wpb_animate_when_almost_visible,
  body.home .animated-in,
  body.home .nectar-animated-title,
  body.home .nectar-next-section-wrap,
  body.home .nectar-cta,
  body.home .row-bg,
  body.home .row-bg-layer {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  body.home .nectar-split-heading,
  body.home .nectar-split-heading *,
  body.home .wpb_animate_when_almost_visible,
  body.home .nectar-animated-title,
  body.home [data-nectar-animate-settings] {
    opacity: 1 !important;
    visibility: visible !important;
  }

  body.home [data-nectar-animate-settings],
  body.home [data-bg-animation]:not([data-bg-animation="none"]),
  body.home .row-bg-wrap,
  body.home .row-bg-layer {
    clip-path: none !important;
    -webkit-clip-path: none !important;
  }

  /* Camino: en móvil las flechas intermedias no aportan y generan demasiado aire. */
  body.home #el-camino .inner_row > .row_col_wrap_12_inner > .vc_col-sm-4 {
    display: none !important;
  }
  body.home #el-camino .inner_row > .row_col_wrap_12_inner > .vc_col-sm-8 {
    width: 100% !important;
  }
  body.home #el-camino > .row_col_wrap_12 > .wpb_column {
    margin-bottom: 24px !important;
  }
  body.home #el-camino > .row_col_wrap_12 > .wpb_column:last-child {
    margin-bottom: 0 !important;
  }

  /* Situaciones 01/02/03...: espaciado vertical homogéneo en móvil. */
  body.home .vc_row:has(.vc_custom_1789551517530) {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
}