/* CSXXI – Espacios publicitarios */

.csx-ad {
  position: relative;
  margin: 24px auto;
  text-align: center;
  max-width: 100%;
  clear: both;
}

.csx-ad__label {
  display: block;
  font: 600 10px/1 Roboto, Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 6px;
}

.csx-ad__link {
  display: inline-block;
  line-height: 0;
  max-width: 100%;
}

.csx-ad img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.csx-ad .adsbygoogle {
  min-height: 90px;
}

/* Aviso propio "Anunciá con nosotros" */
.csx-ad__house {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 20px;
  padding: 18px 20px;
  border: 1px dashed #9cc3e6;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0f7fd 0%, #e6f1fb 100%);
  color: #0a5594 !important;
  text-decoration: none !important;
  transition: background .2s, border-color .2s;
}

.csx-ad__house:hover {
  background: #dcecfa;
  border-color: #0077c8;
}

.csx-ad__house-title {
  font: 700 18px/1.2 Roboto, Arial, sans-serif;
}

.csx-ad__house-text {
  font: 400 14px/1.4 Roboto, Arial, sans-serif;
  color: #374151;
}

.csx-ad__house-btn {
  font: 600 13px/1 Roboto, Arial, sans-serif;
  background: #0077c8;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
}

/* Medidas reservadas para que la página no "salte" al cargar el anuncio (CLS) */
.csx-ad--header_top,
.csx-ad--footer_top {
  max-width: 970px;
}
.csx-ad--header_top {
  margin: 0 auto;
  padding: 10px 16px;
}
.csx-ad--header_top .csx-ad__house,
.csx-ad--footer_top .csx-ad__house {
  min-height: 70px;
  padding: 12px 20px;
}

.csx-ad--home_after_hero,
.csx-ad--home_mid,
.csx-ad--home_bottom {
  max-width: 970px;
}
.csx-ad--home_after_hero .csx-ad__house,
.csx-ad--home_mid .csx-ad__house,
.csx-ad--home_bottom .csx-ad__house {
  min-height: 120px;
}

.single-entry .csx-ad,
.entry-content .csx-ad {
  margin: 28px 0;
  max-width: 728px;
}

.csx-ad--sidebar_top,
.csx-ad--sidebar_bottom {
  max-width: 300px;
  margin: 0 auto 24px;
}
.csx-ad--sidebar_top .csx-ad__house,
.csx-ad--sidebar_bottom .csx-ad__house {
  flex-direction: column;
  min-height: 250px;
  text-align: center;
}

@media (min-width: 1025px) {
  .csx-ad--sidebar_bottom {
    position: sticky;
    top: 110px;
  }
  .csx-ad--sidebar_bottom .csx-ad__house {
    min-height: 600px;
  }
}

.csx-feed-ad {
  width: 100%;
}

/* Barra fija inferior: solo en celular */
.csx-ad--mobile_anchor {
  display: none;
}

@media (max-width: 767px) {
  .csx-ad {
    margin: 20px auto;
  }

  .csx-ad--header_top {
    padding: 8px 12px;
  }

  .csx-ad__house {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }

  .csx-ad--mobile_anchor {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    margin: 0;
    padding: 6px 40px 6px 8px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .csx-ad--mobile_anchor .csx-ad__label {
    display: none;
  }
  .csx-ad--mobile_anchor .csx-ad__house {
    flex-direction: row;
    flex-wrap: nowrap;
    min-height: 50px;
    padding: 6px 10px;
    gap: 10px;
    justify-content: space-between;
  }
  .csx-ad--mobile_anchor .csx-ad__house-text {
    display: none;
  }
  .csx-ad--mobile_anchor .csx-ad__house-title {
    font-size: 15px;
  }
  .csx-ad--mobile_anchor .adsbygoogle {
    min-height: 50px;
  }
  .csx-ad--mobile_anchor.is-closed {
    display: none;
  }

  /* Espacio para que la barra no tape el pie */
  body.csx-has-anchor {
    padding-bottom: 72px;
  }
}

.csx-ad__close {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #e5e7eb;
  color: #111;
  font: 400 20px/30px Arial, sans-serif;
  cursor: pointer;
  padding: 0;
}

/* ---------- AdSense ---------- */
/* Espacio reservado mientras llega el anuncio (evita que el texto salte) */
.csx-ad--adsense .adsbygoogle {
  min-height: 100px;
}
.csx-ad--sidebar_top.csx-ad--adsense .adsbygoogle,
.csx-ad--sidebar_bottom.csx-ad--adsense .adsbygoogle {
  min-height: 250px;
}
.csx-ad--footer_top.csx-ad--adsense {
  max-width: 1100px;
}
.csx-ad--footer_top.csx-ad--adsense .adsbygoogle {
  min-height: 280px;
}
@media (max-width: 767px) {
  .csx-ad--article_top.csx-ad--adsense .adsbygoogle,
  .csx-ad--article_mid.csx-ad--adsense .adsbygoogle,
  .csx-ad--article_bottom.csx-ad--adsense .adsbygoogle,
  .csx-ad--home_after_hero.csx-ad--adsense .adsbygoogle,
  .csx-ad--home_mid.csx-ad--adsense .adsbygoogle,
  .csx-ad--home_bottom.csx-ad--adsense .adsbygoogle,
  .csx-ad--feed.csx-ad--adsense .adsbygoogle {
    min-height: 250px;
  }
}
/* Google no tuvo anuncio para el espacio: se oculta entero */
.csx-ad--empty {
  display: none !important;
}

/* Anuncio de anclaje de Google abajo: la barra de navegación de celular sube por encima */
@media (max-width: 767px) {
  body.csx-google-anchor .csx-tabbar {
    bottom: calc(10px + var(--csx-google-anchor, 0px)) !important;
    transition: bottom .25s ease;
  }
}
