/*
 * Ajustes responsive del home de fiducoldex.com.co (tema drupal-theme-fiducoldex).
 * Cargar DESPUÉS de estilo.css / home.css / movil.css (Asset Injector: CSS, todas las páginas).
 *
 * Causa raíz: el tema solo tiene un modo "móvil" (<=500px) y un modo "escritorio" (>=1024px).
 * Entre 501 y 1023px conviven el menú de escritorio y el botón hamburguesa, el logo ocupa el 100%
 * del ancho, las tarjetas tienen altura fija (350px), los botones .anclas son absolutos y el texto
 * del banner (50vw) se sale de la imagen. Además el menú y los botones usan unidades vh
 * (2vh/5vh/10vh) que dependen del alto de la ventana, y los botones de pago se montan sobre el menú.
 * Probado en el navegador a 1440, 1100, 800 y 600 px (inyectado sin tocar el servidor).
 */

/* ---------- Escritorio (>=1024px): separar el menú de los botones de pago ---------- */
@media (min-width: 1024px) {
  header .custom-flex { height: auto; margin-bottom: .9rem; }
  .primary-nav-boton a.btn { min-height: 45px; height: auto; }
  /* !important: el HTML trae style="width:150px;" y el CSS de estilos inline lo reproduce con !important;
     sin esto la imagen (relación 2,31:1) se estiraba a 150×38. */
  .wrap-pse-button img { width: auto !important; height: 44px !important; max-width: 100%; }
  header .custom-heigth { height: auto; }
  header .custom-heigth ul#superfish-main { height: auto; padding-bottom: 0; align-items: center; }
  /* estilo.css fija "Home" (primer li) en 2vh con borde de 2px: lo dejaba más abajo que el resto */
  header li.sf-depth-1,
  header li.sf-depth-1:first-child { height: auto; }
  header li.sf-depth-1:first-child { border-right-width: 1px; }
  header a.sf-depth-1 { line-height: 1.5; padding: .2rem .6rem !important; }
}
/* solo el menú del encabezado: el menú lateral de las páginas internas (.menu-productos) debe poder partir líneas */
header a.sf-depth-1 { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279.98px) {
  header .custom-heigth { font-size: 1.05rem; }
  header a.sf-depth-1 { padding: .2rem .45rem !important; }
}

/* ---------- Tarjetas del home: sin altura fija (>=700px) ---------- */
@media (min-width: 700px) {
  .container-min.container-fluid.pr-5.pl-5.d-flex { height: auto; min-height: 350px; }
}

/* ---------- Tablet y móvil grande (<=1023px): modo "móvil" del encabezado ---------- */
@media (max-width: 1023.98px) {
  header nav#home { padding-left: 1rem !important; padding-right: 1rem !important; flex-wrap: nowrap; }
  header nav#home > div:first-child { width: 100%; }
  header .botones { display: none !important; }
  #block-fiducoldex-branding { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  a.navbar-brand { width: auto; max-width: 260px; margin: 0; }
  a.navbar-brand img { width: 100%; height: auto; }
  .toggle-btn { display: block; width: 48px; flex: 0 0 auto; }
  .toggle-btn.hide { display: none; }

  /* menú lateral */
  #sidebar { width: min(90vw, 420px); left: -100vw; overflow-y: auto; }
  #sidebar.active { left: 0; }
  #sidebar .ul { margin-top: 80px; padding-left: 0; }
  #sidebar .cerrar { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; line-height: 38px; text-align: center; border: 1px solid #1379b7; border-radius: 30px; color: #1379b7 !important; cursor: pointer; }
  #sidebar .primary-nav-boton { display: flex !important; flex-wrap: wrap; justify-content: center; gap: .75rem; padding: 1rem; height: auto; }
  #sidebar .primary-nav-boton a.btn { height: 45px; min-width: 150px; width: auto; }
  #sidebar .primary-nav-boton a.btn img { width: 150px !important; height: auto; }

  /* banner principal: el texto no debe salirse de la imagen */
  .main-banner .field-content { padding: 0 1rem; }
  .main-banner .views-field.views-field-body { width: min(70vw, 560px); padding: 0 .5rem; }
  .main-banner .views-field-body h2 { font-size: clamp(1rem, 3.2vw, 1.9rem); line-height: 1.2; margin-bottom: .5rem; }
  .main-banner .views-field-body p { margin-bottom: .4rem; }

  /* tarjetas Fondos / Informes / Contratación */
  .container-min.container-fluid.pr-5.pl-5.d-flex { flex-direction: column; padding-left: 1rem !important; padding-right: 1rem !important; }
  .container-min .card.card-one,
  .container-min .card.col-lg-5 { width: 100%; max-width: 100%; flex: 0 0 auto; margin: .5rem 0; }
  .container-min .card.card-one { flex-direction: row !important; }
  .container-min .card.card-one > div:first-child { flex: 1 1 60%; min-width: 0; }
  .container-min .card.card-one .container-img { flex: 0 0 40%; max-width: 40%; }
  .container-min .card.col-lg-5 { flex-direction: row !important; }
  .container-min .card.col-lg-5 > .card { flex: 1 1 50%; min-width: 0; margin: 0 .25rem; padding-bottom: 4.5rem !important; }
  .container-min i.move-i { padding: .8rem; font-size: 1.25rem; right: 1rem; bottom: 1rem; }

  /* botones FIC dentro de la tarjeta: en flujo normal, no absolutos */
  .anclas { position: static !important; width: auto !important; flex-wrap: wrap; gap: .5rem; justify-content: flex-start !important; margin-top: 1rem; }
  .anclas a { padding: .3rem .9rem; }

  /* pestañas del simulador */
  .custom-empty.d-flex { max-width: none; flex-wrap: wrap; justify-content: center; gap: .25rem; }
  .custom-empty.d-flex > div { flex: 0 0 auto; width: auto; max-width: none; }
}

/* ---------- Móvil (<=700px): tarjetas apiladas, texto alineado a la izquierda ---------- */
@media (max-width: 700px) {
  .container-min .card.card-one,
  .container-min .card.col-lg-5 { flex-direction: column !important; }
  .container-min .card.card-one .container-img { display: none; }
  .container-min .card.col-lg-5 > .card { margin: .25rem 0; padding-bottom: 4.5rem !important; }
  p { text-align: left !important; }
}

/* ---------- Pie de página y redes sociales (todos los anchos) ---------- */
footer p { text-align: left !important; }
.custom-rs .field-content > div { flex-direction: row !important; flex-wrap: wrap; gap: .25rem 1rem; }
.custom-rs a.enlace { display: inline-flex; align-items: center; gap: .4rem; margin: .25rem 0; padding-right: 0; }
.custom-rs .redondo { display: inline-flex; flex: 0 0 2rem; align-items: center; justify-content: center; margin: 0 !important; line-height: 1; }

/* ---------- Accesibilidad (opcional): contraste del botón "Conoce más aquí" ---------- */
/* Antes: texto blanco sobre #c0cbd7 (contraste ~1,7:1). Ahora azul de la marca (#0739aa) con texto blanco. */
a.boton-banner-1 { display: inline-block; background-color: #0739aa; color: #fff; text-shadow: none; padding: .45rem 1.25rem; }

.klaro .cookie-modal p {
	text-align: left !important;
}
