/*
Theme Name: SmartMag Child
Theme URI: https://theme-sphere.com/smartmag/
Description: SmartMag Child Theme
Author: ThemeSphere
Author URI: https://theme-sphere.com
Template: smart-mag
Version: 1.0.0
Text Domain: smart-mag-child
*/

/* ==========================================================================
   Efectos para Banners de Afiliación (Barra Lateral)
   ========================================================================== */

/* Contenedor del banner inferior */
a[href*="/rd/banner_bottom/"] {
 position: relative;
 display: inline-block;
 overflow: hidden;
 vertical-align: middle;
 border-radius: 8px;
 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Efecto Hover: Elevación suave y sombra */
a[href*="/rd/banner_bottom/"]:hover {
 transform: translateY(-4px) scale(1.015);
 box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

/* Efecto Shimmer (Brillo periódico que pasa sobre la imagen) */
a[href*="/rd/banner_bottom/"]::after {
 content: '';
 position: absolute;
 top: 0;
 left: -150%;
 width: 50%;
 height: 100%;
 background: linear-gradient(
 to right, 
 rgba(255, 255, 255, 0) 0%, 
 rgba(255, 255, 255, 0.3) 50%, 
 rgba(255, 255, 255, 0) 100%
 );
 transform: skewX(-25deg);
 animation: shimmer 5s infinite ease-in-out;
}

@keyframes shimmer {
 0% {
 left: -150%;
 }
 10% {
 left: 150%;
 }
 100% {
 left: 150%;
 }
}

/* Efecto Sticky en Escritorio (Corrige el overflow y la altura para habilitar el desplazamiento) */
@media (min-width: 1024px) {
 /* Permitir que la barra lateral y su contenido se estiren al 100% de la altura principal */
 .main-wrap .row:has(.sidebar) {
  display: flex !important;
  flex-wrap: wrap;
  overflow: visible !important;
 }
 
 .main-wrap .row:has(.sidebar) > aside.sidebar {
  height: auto !important;
 }
 
 .main-wrap .row:has(.sidebar) > aside.sidebar > ul {
  height: 100% !important;
 }

 /* Hacer sticky el widget del banner inferior */
 #text-20,
 .widget:has(a[href*="/rd/banner_bottom/"]),
 .custom-html-widget:has(a[href*="/rd/banner_bottom/"]) {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 90px !important;
  z-index: 10 !important;
  transition: top 0.3s ease;
 }
}

/* ==========================================================================
   Ocultar secciones vacías al final del artículo
   ========================================================================== */

/* Ocultar sección de compartir */
.post-share {
    display: none !important;
}

/* Ocultar bloque publicitario (Adsense Multiplex) de artículos recomendados */
ins.adsbygoogle[data-ad-format="autorelaxed"] {
    display: none !important;
}

/* Añadir margen visual de separación al bloque de entradas relacionadas */
.related-posts {
    margin-top: 40px !important;
}
