/* ==============================
   FQC HOME (index.php)
   NO cambia diseño/funcionalidad.
   ============================== */

/* ==============================
   BOTONES HERO (Nosotros / Contacto)
   ============================== */
.boton-personalizado{
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
  border: none;
  font-weight: bold;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.4s ease;
  z-index: 1;
}
.boton-personalizado::before{
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  z-index: -1;
  transition: all 0.4s ease;
}

.btn-nosotros{ background-color: #205b8c; }
.btn-nosotros::before{ background-color: #ff8f0f; }
.btn-nosotros:hover{
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 143, 15, 0.3);
}
.btn-nosotros:hover::before{ left: 0; }

.btn-contacto{ background-color: #ff8f0f; }
.btn-contacto::before{ background-color: #205b8c; }
.btn-contacto:hover{
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(32, 91, 140, 0.3);
}
.btn-contacto:hover::before{ left: 0; }

/* ==============================
   HERO (tu mismo CSS)
   ============================== */
.hero-wrap{
  margin-top: 0;
  min-height: clamp(520px, 70vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  --video-shift: clamp(12px, 2vw, 28px);
}

/* ==============================
   HERO BACKGROUND RESPONSIVO (3 IMÁGENES)
   - Mobile: 45
   - Normal: 2400
   - Large: 3200
   ============================== */

.hero-bg{
  background-image: url('/imagenes/FQC_Almacen_2400.png'); /* DEFAULT: normal */
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  width: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Pantallas GRANDES (monitores) */
@media (min-width: 1700px){
  .hero-bg{
    background-image: url('/imagenes/FQC_Almacen3200.png');
  }
}

/* CELULARES */
@media (max-width: 575.98px){
  .hero-bg{
    background-image: url('/imagenes/FQC_Almacen_45.png');
    background-position: center top;   /* normalmente se ve mejor en móviles */
    background-size: cover;
  }
}


/* ==============================
   fin HERO BACKGROUND RESPONSIVO (3 IMÁGENES)
   - Mobile: 45
   - Normal: 2400
   - Large: 3200
   ============================== */
/* En desktop: mostrar la imagen completa, sin zoom */
@media (min-width: 1200px){
  .hero-bg{
    /* más grande que contain, sin deformar */
    background-size: 125% auto !important;   /* prueba 110%–125% */
    background-position: center center !important;
    background-repeat: no-repeat !important;
  }
}

/* Ajuste: corre el video ligeramente a la izquierda solo en >= LG */
@media (min-width: 992px){
  .hero-wrap .video-col{
    transform: translateX(calc(var(--video-shift) * -1));
  }
}

/* ==============================
   EMPRESAS REPRESENTADAS (tu mismo CSS)
   ============================== */
.owl-carousel .client-logo{
  text-align: center;
  display: flex;
  justify-content: center;
}
.owl-carousel .client-logo img{
  display: inline-block;
  margin: 0 auto;
}

/* ==============================
   MERCADOS (CONSOLIDADO)
   ============================== */

/* Icono negro -> blanco al hover */
#mercados .featured-item .icon-hover{ display: none; }
#mercados .featured-item:hover .icon-default{ display: none; }
#mercados .featured-item:hover .icon-hover{ display: inline; }

/* Tarjeta base + transición */
#mercados .featured-item{
  background: #fff;
  border: 1px solid #e9eaed;
  padding: 24px 18px;
  height: 100%;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
  text-align: center;
}

/* Hover con azul corporativo */
#mercados .featured-item:hover{
  background: #205b8c !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* Texto a blanco en hover */
#mercados .featured-item:hover .featured-title h5,
#mercados .featured-item:hover .featured-desc,
#mercados .featured-item:hover .featured-desc p,
#mercados .featured-item:hover a,
#mercados .featured-item:hover .fqc_naranja,
#mercados .featured-item:hover .fqc_azul{
  color: #fff !important;
  text-decoration: none;
}

/* Tamaño seguro de iconos */
#mercados .featured-item .featured-icon img{
  width: 64px;
  height: 64px;
}

/* Centrar icono */
#mercados .featured-item .featured-icon{
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Centrar título */
#mercados .featured-item .featured-title,
#mercados .featured-item .featured-title h5{
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

/* ===== 5 columnas por fila (pantallas grandes) ===== */
#mercados .row{
  display: flex;
  flex-wrap: wrap;
}
#mercados .row > [class*="col-"]{
  flex: 0 0 20%;
  max-width: 20%;
  padding-left: 12px;
  padding-right: 12px;
}

/* Reset para la fila del encabezado: 100% */
#mercados .row.mb-4 > [class*="col-"]{
  flex: 0 0 100%;
  max-width: 100%;
}

/* Responsivo cómodo */
@media (max-width: 1199.98px){
  #mercados .row > [class*="col-"]{ flex: 0 0 25%; max-width: 25%; }
}
@media (max-width: 991.98px){
  #mercados .row > [class*="col-"]{ flex: 0 0 33.3333%; max-width: 33.3333%; }
}
@media (max-width: 767.98px){
  #mercados .row > [class*="col-"]{ flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 575.98px){
  #mercados .row > [class*="col-"]{ flex: 0 0 100%; max-width: 100%; }
}

#mercados .row.mb-4{ text-align: center; }
#mercados .row.mb-4 p{ max-width: 800px; margin: 0 auto; }
#mercados .row.mb-4 .col-12{
  display: flex;
  flex-direction: column;
  align-items: center;
}
#mercados .row.mb-4 h2,
#mercados .row.mb-4 p{
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* EN: que no parezca enlace cuando anulamos clic */
#mercados .featured-title .no-link{
  cursor: default;
  text-decoration: none;
}

/* ==============================
   INTERACTUANDO (solo aplica si existe el section)
   ============================== */
#interactuando{ padding-bottom: 64px; margin-bottom: 24px; }

/* Apaga overlays del theme */
#interactuando .cases-item,
#interactuando .cases-item::before,
#interactuando .cases-item::after,
#interactuando .cases-item .overlay,
#interactuando .cases-item .img-overlay,
#interactuando .cases-item .cases-overlay{
  content: none !important;
  display: none !important;
  background: transparent !important;
  opacity: 0 !important;
}

/* Tarjeta clickeable */
#interactuando .interact-card{
  width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

/* Contenedor img */
#interactuando .interact-card .thumb{
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagen completa (contain) + suave zoom */
#interactuando .interact-card .thumb img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: none !important;
  transition: transform .35s ease;
}
#interactuando .interact-card:hover .thumb img{ transform: scale(1.06); }

/* Etiqueta en hover */
#interactuando .interact-card .label{
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: #205b8c;
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  padding: .35rem .6rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
#interactuando .interact-card:hover .label{
  opacity: 1;
  transform: translateY(0);
}

/* SR only */
#interactuando .sr-only{
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 576px){
  #interactuando .interact-card{ width: 220px; }
  #interactuando .interact-card .thumb{ height: 180px; }
}


/* ===== Recuadro “blanco” semitransparente para el texto del HERO ===== */
.hero-card{
  background: rgba(255,255,255,.86);          /* blanco transparente */
  border-radius: 14px;
  padding: clamp(14px, 2vw, 26px);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  border: 1px solid rgba(255,255,255,.35);
}

/* Efecto glass (si el navegador lo soporta) */
@supports ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))){
  .hero-card{
    background: rgba(255,255,255,.74);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

/* IMPORTANTE: tu <p> trae inline color:white; aquí lo forzamos a azul FQC */
.hero-card p{
  color: #205b8c !important;
}

/* En móvil: un poco más compacto y legible */
@media (max-width: 991.98px){
  .hero-card{
    padding: 16px;
    border-radius: 12px;
  }
}

/* ==============================
   MERCADOS - FIX: tarjetas mismo tamaño (sin deformar)
   - NO cambia estructura del HTML
   - Asegura misma altura y alineación consistente
   ============================== */

/* 1) Columna "col-mercado" debe comportarse como columna real en tu flex-row */
#mercados .col-mercado{
  flex: 0 0 20%;
  max-width: 20%;
  padding-left: 12px;
  padding-right: 12px;
  display: flex;              /* clave: la columna estira la tarjeta */
}

/* Respeta tu responsivo actual (mismas reglas que ya usas) */
@media (max-width: 1199.98px){
  #mercados .col-mercado{ flex: 0 0 25%; max-width: 25%; }
}
@media (max-width: 991.98px){
  #mercados .col-mercado{ flex: 0 0 33.3333%; max-width: 33.3333%; }
}
@media (max-width: 767.98px){
  #mercados .col-mercado{ flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 575.98px){
  #mercados .col-mercado{ flex: 0 0 100%; max-width: 100%; }
}

/* 2) El <a> debe estirar a todo el alto */
#mercados .col-mercado > a{
  width: 100%;
  display: flex !important;
}

/* 3) Tarjeta con altura uniforme + layout estable */
#mercados .featured-item{
  width: 100%;
  min-height: 170px;          /* ajusta si quieres más/menos alto */
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center;    /* centra contenido verticalmente */
  align-items: center;
  padding: 22px 18px;         /* (tu padding original) */
  text-align: center;
}

/* 4) Ícono: caja fija, imagen sin deformar */
#mercados .featured-icon{
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

#mercados .featured-item .featured-icon img{
  width: 64px !important;
  height: 64px !important;
  object-fit: contain;        /* clave: NO deforma */
  display: block;
}

/* 5) Título: mismo alto (máx 2 líneas) para que todas queden parejas */
#mercados .featured-title{
  width: 100%;
  min-height: 44px;           /* reserva espacio para 2 líneas */
  display: flex;
  align-items: center;
  justify-content: center;
}

#mercados .featured-title h5{
  margin: 0 !important;
  line-height: 1.15;
  max-width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;      /* máximo 2 líneas */
  overflow: hidden;
}

/* 6) Si tu theme mete márgenes raros en .style-1 o .h-100 */
#mercados .featured-item.style-1{
  height: 100% !important;
}

/* ==============================
   MERCADOS - FIX: alinear iconos negro/blanco EXACTO al centro
   (evita "desplazamiento" al hover)
   ============================== */
#mercados .featured-icon{
  position: relative;                 /* para centrar absolutos */
}

/* Ambos iconos ocupan el mismo "slot" y se centran perfecto */
#mercados .featured-icon .icon-default,
#mercados .featured-icon .icon-hover{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block !important;          /* mata baseline/inline */
  margin: 0 !important;
  padding: 0 !important;
}

/* Mantén el tamaño igual en ambos */
#mercados .featured-icon .icon-default,
#mercados .featured-icon .icon-hover{
  width: 64px !important;
  height: 64px !important;
  object-fit: contain !important;
}

/* Toggle correcto (en vez de display:inline) */
#mercados .featured-item .icon-hover{ opacity: 0; }
#mercados .featured-item:hover .icon-hover{ opacity: 1; }
#mercados .featured-item:hover .icon-default{ opacity: 0; }