/* =============================================
   UCAP Cursos Carousel — Stylesheet v1.2
   Botones overlay dentro del container
   para evitar desbordamiento horizontal
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

.ucap-carousel-wrapper *,
.ucap-carousel-wrapper *::before,
.ucap-carousel-wrapper *::after {
    box-sizing: border-box;
}

/* ── Wrapper — bloquea todo scroll horizontal ── */
.ucap-carousel-wrapper {
    font-family: 'Nunito', sans-serif;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 0 40px;
    text-align: center;
    position: relative;
    width: 100%;
    /* Doble seguro anti-scroll */
    overflow-x: hidden;
    overflow-y: visible;
}

.ucap-carousel-title { display: none; }

/* ── Stage — solo el container, sin margen lateral para botones ── */
.ucap-carousel-stage {
    position: relative;
    width: 100%;
}

/* ── Track container — viewport del carrusel ── */
.ucap-track-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    border-radius: 0;
}

/* ── Track ── */
.ucap-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    align-items: stretch;
}

/* ── Card (ancho via JS) ── */
.ucap-card {
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.ucap-card:hover {
    transform: translateY(-4px) scale(1.012);
    box-shadow: 0 12px 36px rgba(0,0,0,0.18);
    text-decoration: none !important;
}

/* ── Imagen ── */
.ucap-card-img-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #0d2b5e;  /* fallback si imagen tarda en cargar */
    flex-shrink: 0;
}

/* Zoom suave via div interno .ucap-bg */
.ucap-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
    z-index: 0;
}

.ucap-card:hover .ucap-bg {
    transform: scale(1.06);
}

/* ── Badge recinto ── */
.ucap-badge-recinto {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: #ff8300;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2;
}

/* ── Overlay tipo + título ── */
.ucap-card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 2;
    padding: 12px 14px 14px;
    background: linear-gradient(to top, rgba(10,30,70,0.92) 0%, rgba(10,30,70,0.5) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ucap-tipo {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
}

.ucap-card-title {
    font-family: 'Nunito', sans-serif !important;
    font-size: clamp(14px, 2.5vw, 17px) !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    text-align: left;
}

/* ── Footer bar ── */
.ucap-card-footer {
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 36px;
}

.ucap-modalidad,
.ucap-fecha {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    white-space: nowrap;
}

.ucap-separator { color: rgba(255,255,255,0.5); font-size: 12px; }

/* ── Botones NAV — overlay absoluto sobre el track ── */
.ucap-btn-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13, 43, 94, 0.85);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.ucap-btn-prev { left: 8px; }
.ucap-btn-next { right: 8px; }

.ucap-btn-nav:hover {
    background: #ff8300;
    transform: translateY(-50%) scale(1.1);
}

.ucap-btn-nav:disabled {
    opacity: 0.25;
    cursor: default;
}

.ucap-btn-nav:disabled:hover {
    background: rgba(13, 43, 94, 0.85);
    transform: translateY(-50%);
}

/* ── Dots ── */
.ucap-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
    padding: 0 16px;
}

.ucap-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ccd6e8;
    border: none; padding: 0;
    cursor: pointer;
    transition: background 0.25s, width 0.25s, border-radius 0.25s;
}

.ucap-dot.active {
    background: #0d2b5e;
    width: 24px;
    border-radius: 4px;
}

/* ── CTA ── */
.ucap-cta-wrap { margin-top: 28px; padding: 0 16px; }

.ucap-cta-btn {
    display: inline-block;
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 800;
    padding: 14px 40px;
    border-radius: 40px;
    letter-spacing: 0.02em;
    transition: filter 0.25s ease, transform 0.25s ease;
    box-shadow: none;
}

.ucap-cta-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: none;
    text-decoration: none !important;
    color: #fff !important;
}
