/* ==========================================================
   BANNER / SLIDER (RJS)
   ========================================================== */

/* Contenidor */
.rjs-banner {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

/* Slide amb fons cover i caption centrat */
.rjs-frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;

  background: center / cover no-repeat var(--bg);

  opacity: 0;
  transition: opacity 0.7s ease;

  pointer-events: none;
  z-index: 1;
}

.rjs-frame.rjs-on {
  opacity: 1;
  pointer-events: auto;
}

/* Caption: columna, centrat */
.rjs-caption {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8em;

  max-width: 90%;
  margin-inline: auto;

  text-align: center;
  color: #fff;
  line-height: 1.15;

  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.5);
  transform: translateZ(0);

  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Títol (més gran i sec) */
.rjs-title {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: clamp(26px, 5vw, 56px);
}

/* Subtítol */
.rjs-sub {
  font-weight: 600;
  opacity: 0.95;
  letter-spacing: 0.03em;
  font-size: clamp(18px, 2.8vw, 28px);
  margin-top: 0.6em;
}

/* Logo */
.rjs-logo {
  display: block;
  margin-top: 10px;
  text-align: left; /* canvia a center si vols */
}

.rjs-logo img {
  width: 325px;
  height: auto;
  opacity: 0.9;
}

/* Controls (fletxes) */
.rjs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 9999px;

  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 2;
}

.rjs-prev { left: 12px; }
.rjs-next { right: 12px; }

.rjs-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}

.rjs-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Nota: això NO “pausa” el slider; només manté la mateixa transition */
.rjs-banner:hover .rjs-frame {
  transition: opacity 0.7s ease;
}

/* (Opcional, segur) Ajust per mòbil: una mica menys d'alçada */
@media (max-width: 768px) {
  .rjs-banner {
    height: 300px;
  }

  .rjs-logo img {
    width: min(325px, 80vw);
  }

  .rjs-logo {
    text-align: center; /* opcional, més coherent en mòbil */
  }
}
