/* Espacios publicitarios */
.cy-ad {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 16px;
  /* hidden only to keep the corner radius; the image itself must not overflow */
  overflow: hidden;
  border: 1px dashed rgba(14, 76, 138, .35);
  background: linear-gradient(135deg, #F0F6FF 0%, #FFF8E6 100%);
  color: #101820;
  text-align: left;
  text-decoration: none;
}
.cy-ad-badge {
  display: inline-block;
  margin: 8px 10px 0;
  font: 700 9px/1 var(--dato, monospace); letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 999px; background: rgba(16,24,32,.78); color: #fff;
  position: relative; z-index: 1;
}
.cy-ad-hit {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
/* Ancho = caja de la tarjeta. Alto sigue la proporción.
   max-height + contain achicaba el dibujo y overflow:hidden
   (flex min-width) recortaba los costados. */
.cy-ad-img, .cy-ad-flyer .cy-ad-img,
.cy-ad-muro .cy-ad-img, .cy-ad-alquileres .cy-ad-img,
.cy-ad-arreglalo .cy-ad-img, .cy-ad-arreglalo.cy-ad-flyer .cy-ad-img {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
  box-sizing: border-box;
  background: #e8eef6;
}
.cy-ad-placeholder {
  width: 100%; height: 140px; max-height: none;
  display: flex; align-items: center; justify-content: center; font-size: 42px;
  margin-top: 4px; background: #e8eef6;
}
.cy-ad-placeholder {
  display: flex; align-items: center; justify-content: center; font-size: 42px;
  margin-top: 4px;
}
.cy-ad-placeholder.grande { height: 220px; font-size: 64px; border-radius: 16px; }
.cy-ad-body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.cy-ad-tit { margin: 0; font: 800 16px/1.25 var(--display, inherit); }
.cy-ad-txt { margin: 0; font-size: 13.5px; color: #3C4C5E; line-height: 1.35; }
.cy-ad-cta { align-self: flex-start; margin-top: 4px; text-decoration: none; }

.muro-feed > .cy-ad { margin: 0; }
.cy-ad-alquileres {
  border-color: #E2A400;
  box-shadow: 0 6px 18px rgba(226, 164, 0, .18);
}
/* Arreglalo: banner rectangular, badge above content (no overlay) */
.arr-ad-slot { margin: 12px 0 8px; width: 100%; }
.cy-ad-arreglalo {
  margin: 0;
  border-radius: 14px;
  border-style: solid;
  border-color: rgba(14, 76, 138, .28);
  background: #fff;
}
.cy-ad-arreglalo .cy-ad-badge {
  margin: 8px 10px 6px;
}
.cy-ad-arreglalo .cy-ad-body { padding: 8px 12px 12px; }
.cy-ad-arreglalo .cy-ad-cta.arr-btn,
.cy-ad-arreglalo .cy-ad-cta {
  display: inline-block; text-align: center; margin-top: 4px;
  text-decoration: none; width: 100%; box-sizing: border-box;
}

.est-circ-ad .est-anillo-ad {
  background: #fff;
  border: 2px dashed #0E4C8A;
}
.est-circ-ad .est-anillo-ad img,
.est-circ-ad .est-anillo > img {
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.est-circ-ad .est-ini { background: #0E4C8A; color: #fff; }

.cy-ad-visor {
  position: fixed; inset: 0; z-index: 950; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.cy-ad-visor[hidden] { display: none !important; }
.cy-ad-visor-x {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.15); color: #fff;
  font-size: 18px; cursor: pointer;
}
.cy-ad-visor-card {
  width: min(420px, 100%); background: #fff; border-radius: 20px; padding: 18px;
  display: flex; flex-direction: column; gap: 10px; color: #101820;
}
.cy-ad-visor-card img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 14px; background: #f4f7fb; }
.cy-ad-visor-card b { font-size: 20px; }
.cy-ad-visor-card p { margin: 0; color: #3C4C5E; line-height: 1.4; }

.muro-feed > .cy-ad,
.alq-lista > .cy-ad,
.arr-ad-slot,
.arr-ad-slot > .cy-ad {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
/* Estados: el círculo (border-radius 50% + overflow) comía los bordes.
   La publi entra entera, más chica que el aro, sin recorte. */
.est-circ-ad .est-anillo-ad {
  overflow: hidden;
  background: #fff;
  border: 2px dashed #0E4C8A;
}
.est-circ-ad .est-anillo-ad img,
.est-circ-ad .est-anillo > img {
  width: 42px;
  height: 42px;
  max-width: 70%;
  max-height: 70%;
  border-radius: 6px;
  border: 0;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.cy-ad-visor-card { overflow: visible; }
.cy-ad-visor-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 0;
}
