/* ============================================
   VARIABLES / COLORES COMPARTIDOS
   #00aaaa  — color principal (badges, botones)
   #1a9c6e  — hover links
   #148f60  — hover items sidebar
   ============================================ */

/* ============================================
   CAROUSEL DE NOTICIAS — FORMATO TARJETA
   ============================================ */

.owl-carousel .owl-item > div {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.11);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 8px;
  height: 230px;
  box-sizing: border-box;
}

.owl-carousel .owl-item .nota-fecha {
  display: none;
}

.owl-carousel .owl-item .nota-imagen {
  width: 100%;
  height: 130px;
  overflow: hidden;
  flex-shrink: 0;
  flex-grow: 0;
  border-radius: 6px 6px 0 0;
}

.owl-carousel .owl-item .nota-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.owl-carousel .owl-item > div > div:nth-child(3) {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  overflow: hidden;
  min-height: 0;
}

.owl-carousel .owl-item > div > div:nth-child(3) > div:first-child {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.owl-carousel .owl-item > div > div:nth-child(3) > div:last-child {
  display: none;
}

.owl-carousel .owl-item .nota-categoria {
  display: block !important;
  flex: 0 0 auto !important;
  height: auto !important;
  overflow: visible !important;
  width: fit-content;
  background: #00aaaa;
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  line-height: 1.5;
  white-space: nowrap;
  margin-bottom: 4px;
}

.owl-carousel .owl-item .nota-titulo {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.owl-carousel .owl-item .nota-titulo:hover {
  color: #1a9c6e;
}

/* ============================================
   DEMO / LEGACY
   ============================================ */

a {
  color: #22BCB9;
  text-decoration: none;
}

.cred {
  margin-top: 20px;
  font-size: 11px;
}

#galleria {
  height: 250px;
  background-color: White;
}

.threeColumns {
  width: 33.3%;
  margin: 0 auto;
  padding: 10px;
}

/* ============================================
   NOTAS DESTACADAS — BADGES DE CATEGORÍA
   (compartido entre destacada 1, 2 y nota2)
   ============================================ */

#div_categoria_1,
#div_categoria_2,
.notas-sidebar-wrapper .nota2 .nota-categoria {
  display: inline-block !important;
  width: fit-content !important;
  max-width: fit-content !important;
  background: #00aaaa !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-radius: 4px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  line-height: 1.5 !important;
  margin-bottom: 8px !important;
}

/* ============================================
   NOTA DESTACADA 1 (hero grande)
   ============================================ */

#div_destacada_1 {
  position: relative;
  width: calc(100% - 16px);
  height: 380px !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 28px;
  box-sizing: border-box;
  margin: 0 8px 24px 8px;
  cursor: pointer;
}

#div_destacada_1::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.30) 60%, rgba(0,0,0,0.50) 100%);
  z-index: 1;
}

#div_destacada_1 > * {
  position: relative;
  z-index: 2;
}

#div_titulo_1 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

#div_copete_1 {
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  max-width: 700px;
}

/* ============================================
   NOTA DESTACADA 2 (secundaria con imagen)
   ============================================ */

#div_destacada_2 {
  position: relative;
  width: calc(100% - 385px) !important;
  max-width: 748px !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  margin-left: 8px;
  height: 267px !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  padding: 20px 22px;
  box-sizing: border-box;
  margin-bottom: 24px;
  cursor: pointer;
}

#div_destacada_2::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.30) 60%, rgba(0,0,0,0.50) 100%);
  z-index: 1;
}

#div_destacada_2 > * {
  position: relative;
  z-index: 2;
  text-align: left;
}

#div_titulo_2 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

#div_copete_2 {
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

/* ============================================
   NOTAS FUERA DEL CAROUSEL — LAYOUT + SIDEBAR
   ============================================ */

.notas-sidebar-wrapper {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
  gap: 0;
}

.notas-sidebar-wrapper .contenedorPrincipal {
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
}

.notas-sidebar-wrapper .contenedorPrincipal > div:first-child {
  width: 100% !important;
  max-width: 100% !important;
  flex-grow: 1 !important;
  overflow: hidden !important;
  align-items: stretch !important;
}

.notas-sidebar-wrapper .contenedorPrincipal > div:first-child > :not(#div_destacada_2):not(#div_categoria_2) {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ============================================
   NOTA2 — listado de notas con miniatura
   ============================================ */

.notas-sidebar-wrapper .nota2 {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  padding-top: 0 !important;
  padding-bottom: 30px !important;
  padding-right: 385px !important;
}

.nota2 .nota-imagen img,
.notas-sidebar-wrapper .nota-imagen img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transform: none !important;
}

.notas-sidebar-wrapper .nota-contenido {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 20px !important;
  padding: 8px 0 !important;
  border-bottom: none !important;
  overflow: hidden !important;
}

.notas-sidebar-wrapper .nota-imagen {
  flex-shrink: 0 !important;
  float: none !important;
  width: 187px !important;
  height: 66px !important;
  display: block !important;
}

.notas-sidebar-wrapper .nota-contenido > div:not(.nota-imagen) {
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.notas-sidebar-wrapper .nota-fecha:not(:has(.nota-titulo)) {
  display: none !important;
}

.notas-sidebar-wrapper .nota-fecha:has(.nota-titulo) {
  display: block !important;
}

.notas-sidebar-wrapper .nota-titulo {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #111 !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.notas-sidebar-wrapper .nota-titulo:hover {
  color: #1a9c6e !important;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar-tarjetas {
  position: absolute;
  right: 0;
  top: 0;
  flex: 0 0 377px;
  width: 377px;
  min-width: 377px;
  max-width: 377px;
  margin-left: -24px;
  padding: 20px 8px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.sidebar-tarjeta {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.11);
  min-height: 120px;
  width: 100%;
  box-sizing: border-box;
  counter-reset: tarjeta-counter;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Más leídas — título */
.masleidas {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.masleidas::before {
  content: none;
}

/* Más leídas — items */
.sidebar-tarjeta > [id*="div_tarjeta"] {
  font-size: 13px;
  font-weight: 400;
  color: #000;
  padding: 6px 0;
  counter-increment: tarjeta-counter;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  line-height: 1.4;
}

.sidebar-tarjeta > [id*="div_tarjeta"]:last-child {
  border-bottom: none;
}

.sidebar-tarjeta > [id*="div_tarjeta"]::before {
  content: counter(tarjeta-counter) '.';
  font-weight: 700;
  color: #888;
  flex-shrink: 0;
  min-width: 16px;
}

.sidebar-tarjeta > [id*="div_tarjeta"]:hover {
  color: #148f60;
}

/* Temas — card */
.sidebar-tarjeta:has(.temas) {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 8px 6px;
}

.sidebar-tarjeta:has(.temas) .temas {
  flex: 0 0 100%;
}

.temas {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  margin-bottom: 8px;
}

/* Temas — botones */
.sidebar-tarjeta:has(.temas) .btn {
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 3px 10px !important;
  border-radius: 6px !important;
  width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  cursor: pointer !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  margin: 4px 2px !important;
}

/* Newsletter */
.sidebar-newsletter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  gap: 0;
  min-height: 120px;
}

.sidebar-newsletter .form-inline {
  flex-wrap: nowrap !important;
  align-items: stretch;
  width: 100%;
}

.sidebar-newsletter .form-group {
  flex: 1 1 auto !important;
  margin-bottom: 0 !important;
  min-width: 0 !important;
}

.sidebar-newsletter .form-control {
  font-size: 13px !important;
  width: 100% !important;
}

.sidebar-newsletter .btn-primary {
  font-size: 13px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  background-color: #00aaaa !important;
  border-color: #00aaaa !important;
}

.sidebar-newsletter #example1 {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

/* ============================================
   RESPONSIVE = 850px
   ============================================ */

@media (max-width: 850px) {

  .threeColumns {
    width: 100%;
  }

  #div_destacada_2 {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    flex-grow: 1 !important;
  }

  .notas-sidebar-wrapper {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }

  .notas-sidebar-wrapper .contenedorPrincipal {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    padding-right: 0 !important;
  }

  .notas-sidebar-wrapper .nota2 {
    padding-right: 0 !important;
  }

  .sidebar-tarjetas {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    padding: 0 !important;
    margin: 16px 0 0 0 !important;
    gap: 16px !important;
  }

  .sidebar-tarjeta {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }

  .sidebar-tarjeta-masleidas,
  .sidebar-tarjeta-temas {
    margin-bottom: 16px !important;
  }

  .sidebar-radio img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .sidebar-newsletter .form-group {
    width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 8px !important;
  }

  .sidebar-newsletter .btn-primary {
    width: 100% !important;
  }
}

/* ============================================
   RESPONSIVE = 500px
   ============================================ */

@media (max-width: 500px) {

  .notas-sidebar-wrapper .nota-imagen {
    width: 100px !important;
    height: 56px !important;
  }

  .sidebar-newsletter .form-inline {
    flex-wrap: wrap !important;
  }
}