/* ============================================================
   Banner Slider — CyberBook (cb-banner)
   Scoped via #cb-banner-wrapper to avoid class/style conflicts
   ============================================================ */

#cb-banner-wrapper {
    position: relative;
    width: 100%;
    max-width: 80rem;          /* ≈ max-w-7xl */
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

#cb-banner-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1366 / 300;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 1px solid rgba(224, 222, 252, 0.8);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.08);
    background-color: #f0eefc;
}

/* ---------- Slides ---------- */
#cb-banner-viewport .cb-banner-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.8s ease-in-out;
    display: block;
    text-decoration: none;
}

#cb-banner-viewport .cb-banner-item.cb-active {
    opacity: 1;
    z-index: 5;
}

#cb-banner-viewport .cb-banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Title overlay ---------- */
.cb-banner-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1rem 2rem;
    pointer-events: none;
}

.cb-banner-caption h3 {
    color: #ffffff !important;
    font-size: 1.25rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    margin: 0;
}

/* ---------- Arrow buttons ---------- */
.cb-banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(229, 231, 235, 0.4);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    font-size: 0.875rem;
    padding: 0;
    line-height: 1;
}

#cb-banner-viewport:hover .cb-banner-arrow {
    opacity: 1;
}

.cb-banner-arrow:hover {
    background: #4f46e5;
    color: #ffffff;
}

.cb-banner-arrow-prev { left: 1rem; }
.cb-banner-arrow-next { right: 1rem; }

/* ---------- Dot indicators ---------- */
.cb-banner-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 0.375rem;
}

.cb-banner-dot {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.cb-banner-dot.cb-active {
    background-color: #ffffff;
    width: 22px;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
    #cb-banner-wrapper { padding: 2rem 1.5rem; }
    .cb-banner-caption h3 { font-size: 1.5rem; }
}
@media (min-width: 1024px) {
    #cb-banner-wrapper { padding: 2rem 2rem; }
}
