/* ============  E S T I L O S   P Á G I N A   E M P R E S A S  ============ */

/* box-sizing global (mismo criterio que styleClaseA.css)
   evita desbordes horizontales por padding en móviles */
*, *::before, *::after {
  box-sizing: border-box;
}

/* #whatsapp-container se excluye del box-sizing global para conservar
   EXACTAMENTE la misma configuración que usa index.html (solo style.css),
   donde .whatsapp-tab crece naturalmente al ancho de su contenido. */
#whatsapp-container,
#whatsapp-container *,
#whatsapp-container *::before,
#whatsapp-container *::after {
  box-sizing: content-box;
}

/* ===== BARRA SUPERIOR / MENÚ ===== */

/* --- Ajuste para que el menú superior con enlaces largos no se desborde --- */
@media (min-width: 1025px) {
  .top-links {
    gap: 0.75rem;
    align-items: center;
  }

  .top-links a {
    font-size: 13px;
  }

  .top-bar-content {
    column-gap: 10px;
  }
}

/* Escritorios estrechos: permitimos que el menú envuelva a una segunda línea */
@media (min-width: 1025px) and (max-width: 1380px) {
  .top-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .top-bar {
    padding: 0.4rem 1rem;
  }
}

/* --- Tablets y móviles: la barra superior usa el menú hamburguesa lateral
       definido en style.css, por lo que aquí no modificamos .top-links --- */


/* ===== HEADER HERO PARA EMPRESAS ===== */
header.heroEmpresas {
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url("../assets/fondo_header_empresas.png") no-repeat center/cover;
  text-align: center;
  color: #ffffff;
  /* Tablets, notebooks y pantallas grandes:
     la imagen debe llegar hasta el bottom visible del viewport.
     El body tiene padding-top:60px (altura de la barra superior fija),
     por lo que el héroe inicia en y=60px y con esta altura termina
     exactamente en el borde inferior del viewport. */
  height: calc(100vh - 60px);
  min-height: 420px;               /* altura mínima confortable en pantallas media/grandes */
  max-height: none;                /* sin tope máximo: llega siempre al fondo visible */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

header.heroEmpresas h1 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  font-size: 2rem;
}

header.heroEmpresas p {
  margin-top: 0;
  font-size: 1.1rem;
  max-width: 800px;
}

/* ===== Ajustes tablets (media query de styleClaseA.css) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  header.heroEmpresas {
    /* Las tablets también muestran la imagen hasta el fondo del viewport */
    height: calc(100vh - 60px);
    min-height: 420px;
    max-height: none;
  }

  header.heroEmpresas h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
  }

  header.heroEmpresas p {
    font-size: 1rem;
  }
}

/* Notebooks y pantallas más grandes: héroe a pantalla completa hasta el fondo */
@media (min-width: 1025px) {
  header.heroEmpresas {
    height: calc(100vh - 60px);
    min-height: 420px;
    max-height: none;
  }
}

/* ===== Ajustes móviles ===== */
@media (max-width: 768px) {
  header.heroEmpresas {
    height: 35vh;
    max-height: 300px;
    min-height: 180px;
  }

  header.heroEmpresas h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
  }

  header.heroEmpresas p {
    font-size: 1rem;
    line-height: 1.4;
  }
}

/* ===== Ajustes móviles muy pequeños ===== */
@media (max-width: 480px) {
  header.heroEmpresas {
    height: 30vh;
    max-height: 260px;
    min-height: 160px;
    padding: 0 14px;
  }

  header.heroEmpresas h1 {
    font-size: 1.5rem;
    margin-bottom: 0.15rem;
  }

  header.heroEmpresas p {
    font-size: 0.95rem;
  }
}

/*  F I N   -   H E R O   E M P R E S A S   */


/* ===== SECCIÓN PRINCIPAL ===== */
/* Nota: style.css define `section { padding: 40px 20px !important; }`,
   por lo que agregamos !important para que estos valores apliquen correctamente */
.seccionEmpresas {
  padding: 50px 20px !important;
  max-width: 1100px;
  margin: 0 auto;
}

.seccionEmpresas .tituloSeccion {
  text-align: left;
  margin-bottom: 35px;
  color: #434AFE;
  font-size: 1.7rem;
  /* alinea el título con el borde vertical izquierdo de las tarjetas:
     mismo ancho máximo y misma centración que .empresas-container */
  width: 100%;
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
}

/* Contenedor: tarjetas apiladas una por línea, ocupando todo el ancho */
.empresas-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin: 0 auto;
  max-width: 950px;
}

/* Tarjeta - cada tarjeta ocupa una fila completa */
.cardEmpresas {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 30px 35px;
  scroll-margin-top: 80px;
  text-align: left;
  width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}

.cardEmpresas:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Contenedor del texto de cada tarjeta */
.cardEmpresas-contenido {
  flex: 1;
  min-width: 0; /* permite que el texto se encoja sin desbordar */
}

/* Ícono lateral de cada tarjeta */
.empresas-icono {
  width: 60px;
  height: 60px;
  background: #434AFE;
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.cardEmpresas h3 {
  color: #434AFE;
  margin: 0 0 12px;
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: bold;
}

.cardEmpresas p {
  font-size: 15px;
  line-height: 1.65;
  color: #333;
  margin: 0 0 12px;
  overflow-wrap: break-word; /* evita desbordes con palabras largas */
}

.cardEmpresas p:last-child {
  margin-bottom: 0;
}

/* Enlace de correo dentro de las tarjetas */
.cardEmpresas a {
  color: #0077cc;
  text-decoration: none;
  font-weight: bold;
  overflow-wrap: break-word;
}

.cardEmpresas a:hover {
  text-decoration: underline;
}


/* ============================================================ */
/*  R E S P O N S I V E    (media queries guía: styleClaseA)    */
/* ============================================================ */

/* ---------- Tablets (mismo patrón que styleClaseA.css) ---------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .seccionEmpresas {
    padding: 45px 20px !important;
  }

  .seccionEmpresas .tituloSeccion {
    max-width: 100%; /* .empresas-container también es 100% en tablets */
  }

  .empresas-container {
    gap: 22px;
    max-width: 100%;
  }

  /* Las tarjetas siguen en fila (ícono + texto) con mayor comodidad */
  .cardEmpresas {
    padding: 26px 28px;
    gap: 18px;
  }

  .empresas-icono {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }
}

/* ---------- Móviles (max 768px) ---------- */
@media (max-width: 768px) {
  .seccionEmpresas {
    padding: 40px 16px !important;
  }

  .seccionEmpresas .tituloSeccion {
    font-size: 1.5rem;
    margin-bottom: 28px;
    max-width: 100%; /* .empresas-container también es 100% en móviles */
  }

  .empresas-container {
    gap: 20px;
    width: 100%;
  }

  .cardEmpresas {
    padding: 24px 20px;
    gap: 16px;
  }

  .empresas-icono {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .cardEmpresas h3 {
    font-size: 1.1rem;
  }

  .cardEmpresas p {
    font-size: 14.5px;
  }
}

/* ---------- Móviles pequeños (max 600px): cards apiladas
   mismo criterio de apilado 100% que styleClaseA.css ---------- */
@media (max-width: 600px) {
  .seccionEmpresas {
    padding: 35px 16px !important;
  }

  .empresas-container {
    gap: 20px;
    width: 100%;
  }

  /* Tarjeta ocupa exactamente el 100% del ancho y apila ícono arriba */
  .cardEmpresas {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 22px 18px;
    gap: 14px;
  }

  /* Texto interno sigue alineado a la izquierda para mejor lectura */
  .cardEmpresas h3,
  .cardEmpresas p {
    text-align: left;
    width: 100%;
  }

  .cardEmpresas-contenido {
    width: 100%;
    flex: 0 0 auto;
  }

  .empresas-icono {
    margin-bottom: 5px;
    width: 54px;
    height: 54px;
    font-size: 24px;
  }
}

/* ---------- Móviles muy pequeños (max 480px) ---------- */
@media (max-width: 480px) {
  .seccionEmpresas {
    padding: 30px 12px !important;
  }

  .tituloSeccion {
    font-size: 1.35rem !important;
  }

  .cardEmpresas {
    padding: 20px 14px;
    border-radius: 10px;
  }

  .cardEmpresas h3 {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .cardEmpresas p {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* ===== Pestañas WhatsApp ===== */
/* Sin override: se usa exactamente la configuración de style.css,
   igual que en index.html (cada pestaña crece al ancho de su contenido). */
