/* Widget Entel: /noticias/stat/includes/modulos/widget_entel/css/widget_entel.css */

/* ===== Contenedor ===== */
.container-entel {
  --entel-azul: #0028fe;
  --entel-card-background: #FFFFFF;
  --entel-card-text: #1A1A1A;
  --entel-card-radius: 12px;
  --entel-image-radius: 10px;
  --entel-gap: 20px;
  --entel-padding: 22px;
  display: flex;
  flex-direction: column;
  max-width: 1120px;
  margin: auto;
  background: var(--entel-azul);
  font-family: lato;
  border-radius: 10px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.container-entel a {
  text-decoration: none;
}
.container-entel .row {
  --bs-gutter-x: 0.8rem;
  margin-right: unset;
  margin-left: unset;
}
@media (max-width: 767px) {
  .container-entel {
    width: 96%;
  }
}

/* ===== Header (logo y frase) ===== */
.container-entel [src$="entel_logo.webp"] {
  width: 220px;
  height: auto;
  /*outline: 1px red dotted;*/
  background: #0028fe;
  position: absolute;
  left: 6px;
}
.container-entel [src$="entel_frase.webp"] {
  height: auto;
  /*outline: 1px green dotted;*/
  background: #0028fe;
  position: absolute;
  right: 0;
}
.container-entel section {
  margin-top: 64px;
  position: relative;
  z-index: 6; /* las cards quedan sobre el banner GAM (z-index 5) */
}

/* Pantallas mayores a 1367px */
@media (min-width: 1367px) {
  .container-entel [src$="entel_frase.webp"] {
    width: 778px;
    top: 34px;
  }
}

/* Pantallas menores a 1366px */
@media (max-width: 1366px) {
  .container-entel [src$="entel_frase.webp"] {
    width: 708px;
    top: 36px;
  }
}

/* La frase móvil solo se muestra en pantallas chicas */
.container-entel [src*="entel_frase_movil"] {
  display: none;
}

/* Tablet (576px a 959px): logo arriba y la frase completa debajo */
@media (min-width: 576px) and (max-width: 959px) {
  .container-entel [src$="entel_logo.webp"],
  .container-entel [src$="entel_frase.webp"] {
    position: static;
    display: block;
    height: auto;
    margin-left: auto;
    margin-right: auto;
  }
  .container-entel [src$="entel_logo.webp"] {
    width: 220px;
    max-width: 100%;
    margin-top: 20px;
  }
  .container-entel [src$="entel_frase.webp"] {
    width: 100%;
    max-width: 708px;
    margin-top: 16px;
  }
  .container-entel section {
    margin-top: 24px;
  }
}

/* Móvil: logo centrado arriba y frase móvil debajo */
@media (max-width: 575px) {
  .container-entel [src$="entel_logo.webp"] {
    position: static;
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }
  .container-entel [src$="entel_frase.webp"] {
    display: none;
  }
  .container-entel [src*="entel_frase_movil"] {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    aspect-ratio: 925 / 116;
    margin: 12px auto 0;
  }
  .container-entel section {
    margin-top: 6px;
  }
  /* Menos margen alrededor del cabezal (Bootstrap m-4 usa !important) */
  .container-entel .entel-header {
    margin: 14px 16px 6px !important;
  }
}

/* ===== Banner GAM transparente encima del header ===== */
.container-entel .gam-entel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 112px; /* escritorio: hasta donde empiezan las cards */
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  z-index: 5;
  overflow: hidden;
}
.container-entel .gam-entel div,
.container-entel .gam-entel iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0;
}
/* Tablet y móvil: el header crece, el banner lo cubre entero */
@media (max-width: 959px) {
  .container-entel .entel-header {
    position: relative;
  }
  .container-entel .gam-entel {
    top: -24px;
    left: -24px;
    right: -24px;
    bottom: -48px;
    height: auto;
  }
}
/* Móvil: el banner sigue los márgenes más chicos del cabezal */
@media (max-width: 575px) {
  .container-entel .gam-entel {
    top: -14px;
    left: -16px;
    right: -16px;
    bottom: -12px; /* 6px del cabezal + 6px de la sección */
  }
}

/* ===== Cards ===== */
.container-entel .noticias-entel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--entel-gap);
  width: 100%;
  padding: 0 var(--entel-padding) var(--entel-padding);
  box-sizing: border-box;
}
.container-entel .noticia-entel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--entel-card-background);
  border-radius: var(--entel-card-radius);
  text-decoration: none;
  color: var(--entel-card-text);
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  transition: transform .22s ease, box-shadow .22s ease;
}
.container-entel .noticia-entel:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,.22);
  color: var(--entel-card-text);
  text-decoration: none;
}
.container-entel picture.noticia-media {
  display: block;
  position: static;
  overflow: hidden;
  padding: 8px 8px 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.container-entel picture.noticia-media img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--entel-image-radius);
  transition: transform .35s ease;
}
.container-entel .noticia-entel:hover picture.noticia-media img {
  transform: scale(1.04);
}
.container-entel .noticia-titulo {
  display: block;
  margin: 0;
  padding: 12px 12px 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* Tablet: 2 columnas */
@media (max-width: 991px) {
  .container-entel .noticias-entel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Móvil: 1 columna */
@media (max-width: 575px) {
  .container-entel .noticias-entel { grid-template-columns: 1fr; gap: 16px; padding: 0 16px 16px; }
}
