/* ============================================================
   ST Banners — Estilos frontend  (sin overlay oscuro)
   ============================================================ */

:root {
  --stb-accent:     #E8A020;
  --stb-radius:     12px;
  --stb-gap:        16px;
  --stb-transition: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --stb-font-title: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --stb-font-body:  'Inter', 'Helvetica Neue', sans-serif;
}

/* ── Bloque de sección ─────────────────────────────────────── */
.stbanners-section {
  width: 100%;
  padding: 12px 0;
  box-sizing: border-box;
}

/* ── Grid ──────────────────────────────────────────────────── */
.stbanners-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--stb-gap);
  width: 100%;
  box-sizing: border-box;
}

/* ── Items ─────────────────────────────────────────────────── */
.stb-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--stb-radius);
  box-sizing: border-box;
  flex-shrink: 0;
  /* Sombra sutil para separar del fondo */
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  transition: box-shadow var(--stb-transition), transform var(--stb-transition);
}

.stb-item:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);
  transform: translateY(-3px);
}

.stb-half { width: calc(50% - var(--stb-gap) / 2); }
.stb-full  { width: 100%; }

/* ── Inner ─────────────────────────────────────────────────── */
.stb-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--stb-radius);
  background: #f5f5f5;
  display: block;
}

/* ── Imagen — ocupa todo el espacio, SIN overlay oscuro ────── */
.stb-media {
  display: block;
  width: 100%;
  line-height: 0;
}

.stb-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--stb-transition), opacity 0.4s ease;
  opacity: 0;
  /* aspect-ratio por defecto; se sobreescribe inline en el tpl si hace falta */
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.stb-img.lazy-loaded {
  opacity: 1;
}

.stb-inner:hover .stb-img {
  transform: scale(1.03);
}

/* ── Overlay SOLO debajo del texto (si hay texto) ──────────── */
/* Degradado muy ligero únicamente en la franja del CTA        */
.stb-has-text .stb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent       0%,
    transparent       55%,
    rgba(0,0,0,0.45) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Sin texto → sin overlay en absoluto */
.stb-no-text .stb-overlay { display: none; }

/* ── Contenido de texto ────────────────────────────────────── */
.stb-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 20px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* Sin texto: ocultar contenido */
.stb-no-text .stb-content { display: none; }

/* ── Título ────────────────────────────────────────────────── */
.stb-title {
  font-family: var(--stb-font-title);
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
}

/* ── Subtítulo ─────────────────────────────────────────────── */
.stb-subtitle {
  font-family: var(--stb-font-body);
  font-size: 0.88rem;
  color: rgba(255,255,255,0.90);
  margin: 0;
  text-shadow: 0 1px 5px rgba(0,0,0,0.45);
  max-width: 420px;
  line-height: 1.4;
}

/* ── Botón CTA ─────────────────────────────────────────────── */
.stb-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: var(--stb-accent);
  color: #000;
  font-family: var(--stb-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 5px;
  margin-top: 4px;
  border: 2px solid transparent;
  transition: background var(--stb-transition), color var(--stb-transition),
              border-color var(--stb-transition), transform 0.2s;
  box-shadow: 0 3px 12px rgba(232,160,32,0.4);
}
.stb-btn:hover {
  background: transparent;
  color: var(--stb-accent);
  border-color: var(--stb-accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.stb-btn svg { transition: transform 0.22s; }
.stb-btn:hover svg { transform: translateX(4px); }

/* ── Banners imagen pura (sin texto) — efecto borde acento ─── */
.stb-no-text .stb-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--stb-radius);
  border: 3px solid transparent;
  transition: border-color var(--stb-transition);
  pointer-events: none;
  z-index: 2;
}
.stb-no-text:hover .stb-inner::after {
  border-color: var(--stb-accent);
}

/* ── Lazy placeholder ──────────────────────────────────────── */
.stb-img.lazy {
  background: #e8e8e8;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .stbanners-grid { gap: 10px; }
  .stb-half, .stb-full { width: 100%; }
  .stb-content { padding: 14px 16px 18px; }
  .stb-btn { padding: 8px 14px; font-size: 0.78rem; }
}

@media (max-width: 480px) {
  .stbanners-section { padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .stb-img, .stb-btn, .stb-item { transition: none !important; transform: none !important; }
}
