/* 7. Publicidad y Banners */
.ad-banner-container {
    width: 100%;
    margin: 25px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ad-banner-link {
    display: block;
    width: 100%;
    position: relative;
}

.ad-banner-image {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    display: block;
}

.ad-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}



/* ============================================================
   CARRUSEL DE PUBLICIDAD PREMIUM (VIVID & ANIMATED)
   ============================================================ */

/* Shimmer animation for premium feel */
@keyframes ad-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes ad-icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12) rotate(3deg); }
}

@keyframes ad-glow-line {
    0% { left: -100%; }
    100% { left: 100%; }
}

.ad-carousel-container {
    position: relative;
    width: 100%;
    margin: 28px 0;
    border-radius: 18px;
    overflow: hidden;
    height: 135px;
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Animated glow line at top */
.ad-carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    z-index: 10;
    animation: ad-glow-line 3s ease-in-out infinite;
}

.ad-carousel-container:hover {
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.28);
    transform: translateY(-3px);
}

.ad-carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.ad-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.7s;
    transform: scale(0.97) translateX(8px);
    z-index: 1;
}

.ad-carousel-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateX(0);
    z-index: 2;
}

/* Enlaces y fotos de anuncios reales */
.ad-carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.ad-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Indicadores (Dots) */
.ad-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.ad-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ad-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.ad-carousel-dot.active {
    background: #fff;
    width: 22px;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ============================
   FALLBACK SLIDES — CADA UNO CON SU PROPIA PERSONALIDAD
   ============================ */

/* --- Slide 1: Azul Eléctrico (Megáfono) --- */
.ad-carousel-slide.fallback-slide-1 {
    background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 45%, #3B82F6 100%);
}

/* --- Slide 2: Verde Esmeralda (Trofeo) --- */
.ad-carousel-slide.fallback-slide-2 {
    background: linear-gradient(135deg, #064E3B 0%, #059669 45%, #34D399 100%);
}

/* --- Slide 3: Naranja Fuego (Rayo) --- */
.ad-carousel-slide.fallback-slide-3 {
    background: linear-gradient(135deg, #7C2D12 0%, #EA580C 45%, #FB923C 100%);
}

/* Shimmer overlay on each fallback slide */
.ad-carousel-slide[class*="fallback-slide-"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        110deg,
        transparent 25%,
        rgba(255, 255, 255, 0.08) 37%,
        transparent 50%
    );
    background-size: 200% 100%;
    animation: ad-shimmer 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Content layout */
.ad-carousel-slide .ad-fallback-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 100%;
    gap: 20px;
    position: relative;
    z-index: 2;
}

/* Icon container */
.ad-carousel-slide .ad-fallback-icon {
    font-size: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: ad-icon-pulse 2.5s ease-in-out infinite;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Text wrapper */
.ad-carousel-slide .ad-fallback-text-wrapper {
    flex: 1;
    min-width: 0;
}

/* Title — white and bold */
.ad-carousel-slide .ad-fallback-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
    color: #fff;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Description */
.ad-carousel-slide .ad-fallback-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* CTA Button — vivid white glass */
.ad-carousel-slide .ad-fallback-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 11px 24px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ad-carousel-slide .ad-fallback-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Per-slide CTA accents */
.ad-carousel-slide.fallback-slide-1 .ad-fallback-btn {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}
.ad-carousel-slide.fallback-slide-2 .ad-fallback-btn {
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.35);
}
.ad-carousel-slide.fallback-slide-3 .ad-fallback-btn {
    box-shadow: 0 4px 20px rgba(234, 88, 12, 0.35);
}

/* ============================
   RESPONSIVE — MÓVIL
   ============================ */
@media (max-width: 640px) {
    .ad-carousel-container {
        height: 115px;
        margin: 20px 0;
        border-radius: 14px;
    }

    .ad-carousel-slide .ad-fallback-content {
        padding: 0 12px;
        gap: 10px;
    }

    .ad-carousel-slide .ad-fallback-icon {
        display: none;
    }

    .ad-carousel-slide .ad-fallback-title {
        font-size: 13px;
        margin-bottom: 2px;
        font-weight: 800;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .ad-carousel-slide .ad-fallback-desc {
        font-size: 10px;
        color: rgba(255, 255, 255, 0.9);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.3;
    }

    .ad-carousel-slide .ad-fallback-btn {
        padding: 8px 14px;
        font-size: 9px;
        flex-shrink: 0;
    }

    .ad-carousel-dots {
        bottom: 8px;
    }
}