/* ============================================
   Smiley Sidebar Ads v3.0.0
   2 banners visibles | 100 en pool por región
   ============================================ */

/* ---- Contenedor principal ---- */
.smiley-ads-section {
    background: #ffffff;
    border: 2px solid #33cc33;
    border-radius: 12px;
    padding: 16px;
    margin: 10px 0 20px 0; /* 10px top baja el sidebar */
    box-shadow: 0 2px 12px rgba(51, 204, 51, 0.12);
    position: relative;
    overflow: hidden;
}

/* Barra de color superior */
.smiley-ads-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #33cc33 0%, #fbbf24 50%, #ff4444 100%);
}

/* ---- Header ---- */
.smiley-ads-header {
    text-align: center;
    margin-bottom: 12px;
    padding-top: 6px;
}

.smiley-ads-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.3 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.smiley-ads-title::before {
    content: '🌟';
    font-size: 16px;
}

.smiley-ads-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 0 !important;
    font-weight: 500;
}

/* ---- Slots de banners ---- */
.smiley-ads-slot {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px; /* aumentado de 4px a 12px para llenar altura de 2 posts */
    background: #f3f4f6;

    /* 4 banners 3:2 landscape (MISMO ratio que imágenes de posts) */
    aspect-ratio: 3 / 2;
}

/* ---- Items individuales ---- */
.smiley-ad-item {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.smiley-ad-item.active {
    display: block;
    animation: smileyFadeIn 0.5s ease;
}

.smiley-ad-item a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.smiley-ad-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.smiley-ad-item a:hover img {
    transform: scale(1.04);
}

/* ---- Badge "Negocio Local" ---- */
.smiley-ad-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(51, 204, 51, 0.92);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* ---- Indicadores de posición ---- */
.smiley-ads-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 0 4px;
}

.smiley-ads-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s ease;
    cursor: default;
}

.smiley-ads-dot.active {
    background: #33cc33;
    width: 18px;
    border-radius: 3px;
}

.smiley-ads-count {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 4px;
}

/* ---- CTA ---- */
.smiley-ads-cta {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

.smiley-ads-cta-text {
    font-size: 11px;
    color: #6b7280;
    margin: 0 0 6px 0 !important;
}

.smiley-ads-cta-link {
    display: inline-block;
    padding: 7px 16px;
    background: #33cc33;
    color: white !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(51, 204, 51, 0.3);
}

.smiley-ads-cta-link:hover {
    background: #28a428;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(51, 204, 51, 0.4);
    color: white !important;
}

/* ---- Estado vacío ---- */
.smiley-ads-empty {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.smiley-ads-empty-slot {
    aspect-ratio: 3 / 2;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.smiley-ads-empty-icon {
    font-size: 32px;
    opacity: 0.5;
}

.smiley-ads-empty-slot p {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 !important;
    font-weight: 600;
}

/* ---- Animación entrada ---- */
@keyframes smileyFadeIn {
    from {
        opacity: 0;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .smiley-ads-section {
        padding: 12px;
    }

    .smiley-ads-title {
        font-size: 15px !important;
    }

    .smiley-ad-badge {
        font-size: 9px;
        padding: 2px 8px;
    }
}