/* =============================================================================
 * Experiencias Oliva — estilos base de los widgets
 * (estilos "de fábrica"; el diseño fino se ajusta desde Elementor)
 * ========================================================================== */

/* Aviso de campo vacío — solo visible en el editor de Elementor */
.oliva-exp-empty {
    display: inline-block;
    padding: 8px 12px;
    font-size: 13px;
    color: #8c8f94;
    background: #f6f7f7;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
}

/* ── Títulos / texto ───────────────────────────────────────────────────── */
.oliva-exp-titulo,
.oliva-exp-subtitulo { margin: 0; }

.oliva-exp-descripcion > *:first-child { margin-top: 0; }
.oliva-exp-descripcion > *:last-child  { margin-bottom: 0; }

/* ── Imagen ────────────────────────────────────────────────────────────── */
.oliva-exp-imagen img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ── Bloques de contenido detallado ────────────────────────────────────── */
.oliva-exp-bloque-titulo { margin: 0 0 .5em; }
.oliva-exp-bloque-texto > *:first-child { margin-top: 0; }
.oliva-exp-bloque-texto > *:last-child  { margin-bottom: 0; }

/* ── Información adicional (Requisitos, Nivel, Accesibilidad, etc.) ─────── */
.oliva-exp-info-titulo {
    display: inline-flex;   /* inline-flex para respetar text-align del bloque */
    align-items: center;
    gap: .5em;
    margin: 0 0 .5em;
}
.oliva-exp-info-icono {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    color: inherit;
}
.oliva-exp-info-icono svg {
    display: block;
    width: 1em;
    height: 1em;
    /* No se fuerza fill aquí: cada SVG conserva su propio diseño
       (evita que los iconos de contorno se rellenen como un cuadro). */
}
.oliva-exp-info-texto > *:first-child { margin-top: 0; }
.oliva-exp-info-texto > *:last-child  { margin-bottom: 0; }

/* ── Galería · carrusel deslizable (scroll-snap) ───────────────────────── */
.oliva-exp-galeria-wrap { position: relative; }
.oliva-exp-galeria-viewport { position: relative; }

/* La pista es el contenedor con scroll horizontal + snap por página (swipe táctil nativo) */
.oliva-exp-galeria {
    --exp-gal-cols: 3;     /* columnas por fila (lo sobrescribe Elementor, responsive)   */
    --exp-gal-per: 6;      /* elementos por vista (lo usa el JS para armar las páginas)   */
    --exp-gal-gap: 10px;   /* separación entre elementos                                  */
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;         /* Firefox */
}
.oliva-exp-galeria::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* Cada página ocupa el ancho visible y encaja con el snap */
.oliva-exp-galeria-page {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
    display: grid;
    grid-template-columns: repeat(var(--exp-gal-cols), 1fr);
    gap: var(--exp-gal-gap);
}

.oliva-exp-galeria-item {
    overflow: hidden;
    line-height: 0;
}
/* Proporción apaisada por defecto (se puede ajustar desde Elementor) */
.oliva-exp-galeria-imagen,
.oliva-exp-galeria-video {
    aspect-ratio: 4 / 3;
}
.oliva-exp-galeria-item img,
.oliva-exp-galeria-item video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.oliva-exp-galeria-imagen { cursor: zoom-in; }
.oliva-exp-yt-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}
.oliva-exp-yt-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Flechas laterales */
.oliva-exp-galeria-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    color: #111;
    background: rgba(255, 255, 255, .9);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
    transition: opacity .2s ease, background .2s ease;
}
.oliva-exp-galeria-arrow:hover { background: #fff; }
.oliva-exp-galeria-arrow.prev { left: 8px; }
.oliva-exp-galeria-arrow.next { right: 8px; }
.oliva-exp-galeria-arrow:disabled { opacity: 0; pointer-events: none; }

/* Sin desplazamiento posible (pocos elementos): ocultar controles */
.oliva-exp-galeria-wrap.is-static .oliva-exp-galeria-arrow,
.oliva-exp-galeria-wrap.is-static .oliva-exp-galeria-dots {
    display: none !important;
}

/* Puntos de navegación */
.oliva-exp-galeria-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.oliva-exp-galeria-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.oliva-exp-galeria-dot.is-active {
    background: #111;
    transform: scale(1.2);
}

/* ── Lightbox de fotos ─────────────────────────────────────────────────── */
body.oliva-exp-lb-open { overflow: hidden; }
.oliva-exp-lb {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}
.oliva-exp-lb.is-open { display: flex; }
.oliva-exp-lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .9);
}
.oliva-exp-lb-figure {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}
.oliva-exp-lb-img {
    display: block;
    margin: 0 auto;
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
}
.oliva-exp-lb-caption {
    margin-top: 12px;
    color: #fff;
    font-size: .95rem;
    line-height: 1.4;
}
.oliva-exp-lb-close,
.oliva-exp-lb-prev,
.oliva-exp-lb-next {
    position: absolute;
    z-index: 2;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}
.oliva-exp-lb-close {
    top: 20px;
    right: 24px;
    font-size: 30px;
}
.oliva-exp-lb-prev,
.oliva-exp-lb-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    padding: 10px 18px;
    opacity: .8;
    transition: opacity .2s ease;
}
.oliva-exp-lb-prev:hover,
.oliva-exp-lb-next:hover { opacity: 1; }
.oliva-exp-lb-prev { left: 12px; }
.oliva-exp-lb-next { right: 12px; }

@media (max-width: 600px) {
    .oliva-exp-galeria-arrow { width: 38px; height: 38px; font-size: 22px; }
    .oliva-exp-lb-prev, .oliva-exp-lb-next { font-size: 36px; padding: 8px 12px; }
}

/* ── Fechas ────────────────────────────────────────────────────────────── */
.oliva-exp-fechas-titulo { margin: 0 0 .5em; }
.oliva-exp-fechas-lista {
    list-style: none;
    margin: 0;
    padding: 0;
}
.oliva-exp-fecha-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.oliva-exp-fecha-item:last-child { border-bottom: 0; }
.oliva-exp-fecha-fecha { font-weight: 600; }
.oliva-exp-fecha-horario { opacity: .85; }
.oliva-exp-fecha-cupos {
    margin-left: auto;
    font-size: .9em;
    opacity: .8;
}

/* ── Precio ────────────────────────────────────────────────────────────── */
.oliva-exp-precio-valor { font-weight: 700; }

/* ── Botón de reserva ──────────────────────────────────────────────────── */
.oliva-exp-reserva-btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: #111;
    color: #fff;
    text-decoration: none;
    border: 0 solid transparent;
    border-radius: 4px;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

/* ── Listado de experiencias (tarjeta tipo hero, como archive-product) ──── */
.oliva-expl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.oliva-expl-card {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* Imagen secundaria (hover). Si la experiencia no la tiene, este div no se
   imprime y la tarjeta no cambia al pasar el ratón. */
.oliva-expl-hover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity .45s ease;
    z-index: 0;
}
.oliva-expl-card:hover .oliva-expl-hover { opacity: 1; }
.oliva-expl-card.oliva-expl-hidden { display: none; }
.oliva-expl-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    pointer-events: none;
    z-index: 1;
}
.oliva-expl-content {
    position: relative;
    z-index: 2;
}
.oliva-expl-title {
    margin: 0 0 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.15;
    color: #D5D5D5;
}
.oliva-expl-label {
    margin: 0 0 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #D5D5D5;
}
.oliva-expl-sub {
    margin: 0 0 18px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #D5D5D5;
}
.oliva-expl-btn {
    display: inline-block;
    align-self: flex-start;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    color: #D5D5D5;
    border: 1px solid #D5D5D5;
    border-radius: 10px;
    padding: 12px 26px;
    background: transparent;
    text-decoration: none;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.oliva-expl-btn:hover { background: #D5D5D5; color: #1a1a1a; }

/* Cargar más */
.oliva-expl-more-wrap {
    display: flex;
    justify-content: center;
    padding: 32px 0 0;
}
.oliva-expl-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1;
    background: none;
    border: none;
    box-shadow: none;
    cursor: pointer;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: .02em;
    padding: 8px 12px;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.oliva-expl-more.is-loading { opacity: .4; cursor: default; }
