/* Row visibility — controlled by JS (slideshow-admin.js) */
.asca-sf-row { transition: opacity 0.15s; }

/* ================================================================
   ASCA Slideshow — Front-end + Admin styles
   ================================================================ */

/* ── Front-end: Contenedor ──────────────────────────────────────── */
.asca-slideshow {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0A1D4A;
  outline: none;
}

.asca-slideshow__track {
  position: relative;
  width: 100%;
}

/* ── Slide base ─────────────────────────────────────────────────── */
.asca-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  min-height: clamp(240px, 34vw, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.asca-slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.asca-slide.is-prev {
  opacity: 0;
  z-index: 1;
}

/* Slide solo imagen — CUBRE todo el alto y ancho del slideshow (cover) y la
   altura se reduce proporcionalmente al bajar la resolución (clamp por viewport).
   El selector con .asca-slideshow gana a las reglas .asca-slide de los media queries. */
.asca-slideshow .asca-slide--image {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: #0A1D4A;
  min-height: clamp(240px, 42vw, 620px);
  height: clamp(240px, 42vw, 620px);


/*cambios*/

background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: #0A1D4A;
  min-height: clamp(240px, 34vw, 620px);
  height: clamp(240px, 34vw, 650px);
  
  
}

/* ── Overlay ────────────────────────────────────────────────────── */
.asca-slide__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ── Banner con enlace (stretched link) ─────────────────────────── */
.asca-slide--link { cursor: pointer; }
.asca-slide__link {
  position: absolute;
  inset: 0;
  z-index: 5;              /* por encima de overlay (1) y texto (2) */
  display: block;
  text-indent: -9999px;    /* oculta cualquier texto accesible del <a> */
  overflow: hidden;
  outline-offset: -3px;
}
.asca-slide--link:hover .asca-slide__overlay { opacity: 0.9; }
.asca-slide--link .asca-slide__text { pointer-events: none; }

/* ── Inner content ──────────────────────────────────────────────── */
.asca-slide__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
}

/* ── Hero text ──────────────────────────────────────────────────── */
.asca-slide__text {
  max-width: 640px;
  color: #fff;
}

/* ── Posición del bloque hero (título + texto + botones) ─────────── */
/* Vertical: controla la alineación del bloque dentro del slide */
.asca-slide--vy-top    { align-items: flex-start; }
.asca-slide--vy-center { align-items: center; }
.asca-slide--vy-bottom { align-items: flex-end; }
/* Horizontal: alinea el bloque de texto y sus botones */
.asca-slide--hx-left   .asca-slide__text { margin-right: auto; text-align: left; }
.asca-slide--hx-left   .asca-slide__buttons { justify-content: flex-start; }
.asca-slide--hx-center .asca-slide__text { margin-left: auto; margin-right: auto; text-align: center; }
.asca-slide--hx-center .asca-slide__buttons { justify-content: center; }
.asca-slide--hx-right  .asca-slide__text { margin-left: auto; text-align: right; }
.asca-slide--hx-right  .asca-slide__buttons { justify-content: flex-end; }

.asca-slide__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.asca-slide__content {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  margin: 0 0 28px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ── Botones ────────────────────────────────────────────────────── */
.asca-slide__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.asca-slide-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.asca-slide-btn--primary {
  background: var(--asca-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(204,17,17,0.4);
}

.asca-slide-btn--primary:hover {
  background: #a50d0d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(204,17,17,0.5);
}

.asca-slide-btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
}

.asca-slide-btn--secondary:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  transform: translateY(-2px);
}

/* ── Cards (news / cpt) ─────────────────────────────────────────── */
.asca-slide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.asca-slide-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid rgba(255,255,255,0.15);
}

.asca-slide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.asca-slide-card__img {
  height: 160px;
  background-size: cover;
  background-position: center;
}

.asca-slide-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.asca-slide-card__date,
.asca-slide-card__type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.75;
}

.asca-slide-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

/* ── Prev / Next buttons ────────────────────────────────────────── */
.asca-slideshow__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.2s;
}

.asca-slideshow__btn:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-50%) scale(1.1);
}

.asca-slideshow__btn--prev { left: 20px; }
.asca-slideshow__btn--next { right: 20px; }

/* ── Dots ───────────────────────────────────────────────────────── */
.asca-slideshow__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}

.asca-slideshow__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.asca-slideshow__dot.is-active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.3);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .asca-slide {
    min-height: 420px;
  }
  .asca-slide__inner {
    padding: 40px 20px;
  }
  .asca-slide__title {
    font-size: 1.5rem;
  }
  .asca-slide-cards {
    grid-template-columns: 1fr 1fr;
  }
  .asca-slideshow__btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .asca-slide-cards {
    grid-template-columns: 1fr;
  }
  .asca-slideshow__btn--prev { left: 10px; }
  .asca-slideshow__btn--next { right: 10px; }
}

/* ================================================================
   Admin Styles
   ================================================================ */

/* Position preview */
.asca-pos-preview {
  margin-top: 12px;
}

.asca-pos-preview__label {
  font-size: 12px;
  color: #555;
  margin: 0 0 6px;
}

.asca-pos-preview__frame {
  position: relative;
  width: 200px;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #ddd;
  background: #e8e8e8;
}

.asca-pos-preview__img {
  width: 100%;
  height: 100%;
}

.asca-pos-preview__dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #CC1111;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.3);
  transition: left 0.3s, top 0.3s;
}

/* Category picker */
.asca-cat-picker {
  margin-top: 10px;
  padding: 12px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.asca-cat-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}

.asca-cat-picker__item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  cursor: pointer;
}

/* Post search */
.asca-post-search {
  margin-top: 10px;
}

.asca-post-search__bar {
  position: relative;
}

.asca-post-search__input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccd0d4;
  border-radius: 4px;
  font-size: 13px;
}

.asca-post-search__results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccd0d4;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.asca-post-search__result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  transition: background 0.15s;
}

.asca-post-search__result-item:hover { background: #f0f6ff; }

.asca-post-search__result-item img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.asca-no-thumb {
  display: inline-block;
  width: 36px;
  height: 36px;
  background: #e0e0e0;
  border-radius: 3px;
  flex-shrink: 0;
}

.asca-result-title { font-weight: 600; flex: 1; }
.asca-result-meta  { font-size: 11px; color: #888; }

.asca-post-search__selected { margin-top: 10px; }

.asca-post-search__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.asca-post-search__selected-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f0f6ff;
  border: 1px solid #c5d9f5;
  border-radius: 4px;
  font-size: 13px;
}

.asca-post-search__selected-item img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 3px;
}

.asca-post-search__selected-item span { flex: 1; }

.asca-remove-post {
  background: none;
  border: none;
  color: #CC1111;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* Shared picker helpers */
.asca-picker-label   { font-size: 12px; color: #555; margin: 0 0 6px; font-weight: 600; }
.asca-picker-loading { font-size: 12px; color: #888; font-style: italic; }
.asca-picker-empty   { font-size: 12px; color: #888; padding: 8px 12px; display: block; }

/* Hide overlay sub-fields by default (JS shows them) */
.cmb2-id-asca-slides [id*="[overlay_opacity]"],
.cmb2-id-asca-slides [id*="[overlay_color]"],
.cmb2-id-asca-slides [id*="[gradient_from]"],
.cmb2-id-asca-slides [id*="[gradient_to]"],
.cmb2-id-asca-slides [id*="[gradient_dir]"] {
  /* visibility controlled by JS */
}