/* =========================================================
   Public Banners — Fase 20
   Carrusel de banners visuales del portal público.
   Sin dependencias externas.
   ========================================================= */

/* ── Variables ────────────────────────────────────────── */
:root {
    --banner-height-desktop: 480px;
    --banner-height-mobile: 320px;
    --banner-overlay: rgba(10, 10, 24, 0.55);
    --banner-radius: 1rem;
    --banner-transition: 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    --banner-dot-size: 8px;
    --banner-dot-active: #a855f7;
    --banner-nav-size: 44px;
}

/* ── Contenedor principal ─────────────────────────────── */
.public-banner-carousel {
    position: relative;
    width: 100%;
    border-radius: var(--banner-radius);
    overflow: hidden;
    background: #0d0d1a;
    box-shadow: 0 4px 40px rgba(168, 85, 247, 0.15);
    user-select: none;
}

/* ── Track y slides ───────────────────────────────────── */
.public-banner-track {
    position: relative;
    width: 100%;
    height: var(--banner-height-desktop);
}

@media (max-width: 768px) {
    .public-banner-track {
        height: var(--banner-height-mobile);
    }
}

.public-banner-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--banner-transition);
    pointer-events: none;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a0a2e 100%);
}

.public-banner-slide--active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* ── Imagen ───────────────────────────────────────────── */
.public-banner-picture,
.public-banner-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.public-banner-picture {
    display: contents;
}

/* ── Overlay ──────────────────────────────────────────── */
.public-banner-overlay {
    position: absolute;
    inset: 0;
    background: var(--banner-overlay);
    z-index: 1;
}

/* ── Contenido ────────────────────────────────────────── */
.public-banner-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem 3rem;
    background: linear-gradient(
        to top,
        rgba(6, 5, 20, 0.92) 0%,
        rgba(6, 5, 20, 0.4) 50%,
        transparent 100%
    );
}

@media (max-width: 768px) {
    .public-banner-content {
        padding: 1.5rem 1.25rem;
    }
}

.public-banner-title {
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: clamp(1.4rem, 3.5vw, 2.25rem);
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.2;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    letter-spacing: -0.02em;
}

.public-banner-subtitle {
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    color: rgba(241, 245, 249, 0.78);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.public-banner-body {
    font-size: 0.875rem;
    color: rgba(241, 245, 249, 0.6);
    margin: 0 0 1.25rem 0;
    max-width: 560px;
}

/* ── CTAs ─────────────────────────────────────────────── */
.public-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.public-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.22s ease;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.public-banner-btn--primary {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.public-banner-btn--primary:hover {
    background: linear-gradient(135deg, #6d28d9, #9333ea);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.55);
    transform: translateY(-2px);
    color: #fff;
}

.public-banner-btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
}

.public-banner-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

/* ── Navegación prev/next ─────────────────────────────── */
.public-banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: var(--banner-nav-size);
    height: var(--banner-nav-size);
    border-radius: 50%;
    background: rgba(13, 13, 26, 0.7);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: #f1f5f9;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s ease;
    opacity: 0.7;
}

.public-banner-nav:hover {
    opacity: 1;
    background: rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.5);
    transform: translateY(-50%) scale(1.08);
}

.public-banner-nav--prev { left: 1rem; }
.public-banner-nav--next { right: 1rem; }

@media (max-width: 576px) {
    .public-banner-nav { display: none; }
}

/* ── Dots ─────────────────────────────────────────────── */
.public-banner-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.public-banner-dot {
    width: var(--banner-dot-size);
    height: var(--banner-dot-size);
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.public-banner-dot--active {
    background: var(--banner-dot-active);
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.public-banner-dot:hover:not(.public-banner-dot--active) {
    background: rgba(255, 255, 255, 0.7);
}

/* ── Banner único (sin carrusel) ──────────────────────── */
.public-banner-carousel--single .public-banner-slide {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

.public-banner-carousel--single .public-banner-track {
    height: var(--banner-height-desktop);
}

/* ── Banner card (para placement tipo card) ───────────── */
.public-banner-card {
    border-radius: var(--banner-radius);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #1a0a2e, #0d0d1a);
    border: 1px solid rgba(168, 85, 247, 0.2);
    min-height: 200px;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(168, 85, 247, 0.1);
}
