/* =============================================
   AD SYSTEM STYLES
   ============================================= */

.ad-container {
  margin: 30px auto;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.ad-container ins {
  display: block !important;
  margin: 0 auto;
}

/* Ad placements específicos */

/* Home Top Banner - Full width */
section.hero-slider + .ad-container {
  max-width: 1200px;
  margin: 40px auto;
}

/* Between sections */
.ad-container[data-ad-zone="home-between-sections"],
.ad-container[data-ad-zone="city-top"] {
  max-width: 1200px;
  margin: 40px auto;
  padding: 30px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Inline ads (entre negocios) */
.ad-container[data-ad-zone="business-list-inline"] {
  grid-column: 1 / -1;
  margin: 20px 0;
  padding: 25px;
  background: linear-gradient(135deg, #fff5e1 0%, #ffe4c4 100%);
  border: 2px dashed #ffa500;
  border-radius: 10px;
}

/* Sidebar ads */
.ad-container[data-ad-zone*="sidebar"] {
  max-width: 300px;
  margin: 20px 0;
  padding: 15px;
  background: white;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Ad placeholder styles (para testing) */
.ad-placeholder {
  background: #f0f0f0;
  padding: 40px 20px;
  text-align: center;
  border-radius: 8px;
  border: 2px dashed #ccc;
  color: #999;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .ad-container {
    margin: 20px 10px;
    padding: 15px;
  }
  
  .ad-container[data-ad-zone="business-list-inline"] {
    padding: 15px;
  }
  
  /* Ocultar algunos ads en móvil si es necesario */
  .ad-container[data-ad-zone*="sidebar"] {
    max-width: 100%;
  }
}

/* Lazy loading para ads */
.ad-container[data-ad-id] {
  min-height: 100px;
  position: relative;
}

.ad-container[data-ad-id]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: adLoading 1.5s ease-in-out infinite;
  opacity: 0.3;
  pointer-events: none;
}

@keyframes adLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
