/* ============================================
   SISTEMA DE PUBLICIDAD - CAJAS LATERALES
   ============================================ */

.ads-layout {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 25px;
  max-width: 1700px;
  margin: 0 auto;
  padding: 20px;
}

.ads-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 0;
}


.ads-sidebar.left {
  grid-column: 1;
}

.ads-sidebar.right {
  grid-column: 3;
}

.main-content-with-ads {
  grid-column: 2;
  min-width: 0;
}

/* Caja de anuncio individual - VACÍA CON HOVER */
.ad-box {
  background: rgba(255, 255, 255, 0.8);
  border: 2px dashed rgba(232, 139, 183, 0.4);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  height: 390px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  margin-bottom: 60px;
}

.ad-box::before {
  content: 'Publícitate con nosotros';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(26, 26, 26, 0.5);
  text-align: center;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  line-height: 1.6;
  white-space: pre-line;
}

.ad-box:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--dark-pink);
  border-style: solid;
  box-shadow: 0 6px 16px rgba(232, 139, 183, 0.2);
  transform: translateY(-3px);
}

.ad-box:hover::before {
  color: var(--dark-pink);
  font-weight: 600;
  letter-spacing: 0.3px;
  font-size: 1rem;
}

/* Texto que aparece en hover */
.ad-hover-text {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.ad-hover-text::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 6px solid #1a1a1a;
  transition: all 0.3s ease;
}

.ad-box:hover .ad-hover-text {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.ad-hover-text:hover {
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}



/* Popup de publicidad */
.ad-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.ad-popup-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ad-popup {
  background: white;
  border-radius: 16px;
  max-width: 1400px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ad-popup-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  padding: 30px 35px;
  border-radius: 20px 20px 0 0;
  position: relative;
}

.ad-popup-header h2 {
  font-size: 1.6rem;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.ad-popup-header p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.ad-popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-popup-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.ad-popup-body {
  padding: 25px;
}

.ad-popup-section {
  margin-bottom: 20px;
}

.ad-popup-section:last-child {
  margin-bottom: 0;
}

.ad-popup-section h3 {
  font-size: 1.1rem;
  color: var(--elegant-black);
  margin-bottom: 12px;
  font-weight: 600;
}

.ad-popup-section-compact {
  margin-bottom: 0;
}

/* Botones en la parte superior */
.cta-buttons-top {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Info compacta en grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.info-card {
  background: rgba(245, 245, 245, 0.5);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.info-title {
  font-weight: 600;
  color: var(--elegant-black);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-list div {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.4;
}

.contact-info-compact {
  background: transparent;
  padding: 0;
}

/* Anuncios reales */
.ad-box-real {
  background: white;
  border: 1px solid rgba(232, 139, 183, 0.3);
  border-style: solid;
  padding: 0;
  overflow: hidden;
  cursor: default;
}

.ad-box-real::before {
  display: none;
}

.ad-box-real:hover {
  border-color: var(--primary-pink);
}

.ad-real-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ad-real-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.ad-real-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ad-real-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--elegant-black);
  margin: 0;
  line-height: 1.3;
}

.ad-real-description {
  font-size: 0.75rem;
  color: #666;
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

.ad-real-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-pink), var(--dark-pink));
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.ad-real-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(248, 180, 217, 0.4);
}


/* Lista de beneficios simple */
.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.benefit-item-simple {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 12px 0;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.6;
}

.benefit-bullet {
  color: var(--elegant-black);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Precios simple */
.pricing-simple {
  background: linear-gradient(135deg, rgba(245, 245, 245, 0.8), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 30px;
  margin-top: 15px;
}

.pricing-info {
  text-align: center;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 25px;
}

.pricing-text {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 10px;
}

.pricing-amount-large {
  font-size: 3rem;
  font-weight: 700;
  color: var(--elegant-black);
  margin: 15px 0 5px 0;
  letter-spacing: -1px;
}

.pricing-subtext {
  font-size: 0.9rem;
  color: #888;
}

.pricing-details {
  color: #333;
}

.pricing-details > p {
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--elegant-black);
}

.pricing-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-list li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

.pricing-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--elegant-black);
  font-weight: 700;
}

/* Información de contacto */
.contact-info {
  background: rgba(245, 245, 245, 0.5);
  border-radius: 8px;
  padding: 20px;
  margin-top: 15px;
}

.contact-text {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Grid de Instagram */
.ig-contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
  margin-bottom: 18px;
}

/* Perfil de Instagram */
.ig-profile-section {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  align-items: start;
}

.ig-profile-image {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(232, 139, 183, 0.3);
}

.ig-profile-info {
  flex: 1;
  min-width: 0;
}

.ig-profile-name {
  font-weight: 600;
  color: var(--elegant-black);
  font-size: 0.8rem;
  margin-bottom: 3px;
  line-height: 1.3;
}

.ig-profile-username {
  color: #666;
  font-size: 0.75rem;
  margin-bottom: 6px;
}

.ig-profile-bio {
  color: #555;
  font-size: 0.72rem;
  line-height: 1.4;
}

/* Captura de Instagram */
.ig-screenshot-section {
  background: white;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.ig-screenshot {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 280px;
}

.ig-screenshot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: #999;
}

.placeholder-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.4;
}

.placeholder-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 4px;
}

.placeholder-subtext {
  font-size: 0.7rem;
  color: #999;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.contact-label {
  font-weight: 600;
  color: var(--elegant-black);
  min-width: 85px;
  font-size: 0.85rem;
}

.contact-value {
  color: #555;
  font-family: monospace;
  font-size: 0.85rem;
}

.cta-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.cta-btn {
  flex: 1;
  padding: 14px 28px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.cta-btn-primary {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

.cta-btn-secondary {
  background: white;
  color: var(--elegant-black);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.cta-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

/* Responsive popup */
@media (max-width: 768px) {
  .ad-popup {
    max-width: 95%;
    margin: 10px;
  }
  
  .ad-popup-header {
    padding: 20px;
  }
  
  .ad-popup-header h2 {
    font-size: 1.4rem;
  }
  
  .ad-popup-body {
    padding: 20px;
  }
  
  .pricing-amount-large {
    font-size: 2.5rem;
  }
  
  .pricing-simple {
    padding: 20px;
  }
  
  .ig-contact-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .ig-profile-section {
    flex-direction: row;
    align-items: start;
    text-align: left;
  }
  
  .ig-profile-image {
    width: 60px;
    height: 60px;
  }
  
  .ig-screenshot-section {
    min-height: 250px;
  }
  
  .contact-method {
    flex-direction: column;
    align-items: start;
    gap: 6px;
  }
  
  .contact-label {
    min-width: auto;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-buttons-top {
    flex-direction: column;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}



/* Responsive */
@media (max-width: 1400px) {
  .ads-layout {
    grid-template-columns: 220px 1fr 220px;
    gap: 20px;
  }
  
  .ads-sidebar {
    top: 80px;
    gap: 0;
  }
  
  .ad-box {
    height: 200px;
    margin-bottom: 55px;
  }
  
  .ad-box::before {
    font-size: 0.9rem;
  }
  
  .ad-hover-text {
    bottom: -45px;
    font-size: 0.85rem;
    padding: 10px 20px;
  }
}

@media (max-width: 1200px) {
  .ads-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .ads-sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 60px;
    scroll-snap-type: x mandatory;
  }
  
  .ads-sidebar.left {
    grid-column: 1;
    order: 1;
  }
  
  .main-content-with-ads {
    grid-column: 1;
    order: 2;
  }
  
  .ads-sidebar.right {
    grid-column: 1;
    order: 3;
  }
  
  .ad-box {
    min-width: 240px;
    height: 160px;
    flex-shrink: 0;
    scroll-snap-align: start;
    margin-bottom: 0;
  }
  
  .ad-box::before {
    font-size: 0.85rem;
  }
  
  .ad-hover-text {
    bottom: -45px;
    font-size: 0.8rem;
    padding: 10px 18px;
  }
  
  /* Ocultar scrollbar pero mantener funcionalidad */
  .ads-sidebar::-webkit-scrollbar {
    height: 6px;
  }
  
  .ads-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
  }
  
  .ads-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-pink);
    border-radius: 10px;
  }
}

/* MÓVILES: Anuncios en posición fija y controlada */
@media (max-width: 768px) {
  .ads-layout {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }
  
  /* Anuncios en columna vertical, no flotantes */
  .ads-sidebar {
    position: static;
    flex-direction: column;
    padding-bottom: 0;
    gap: 20px;
    overflow-x: visible;
    scroll-snap-type: none;
  }
  
  .ads-sidebar.left {
    order: 1;
    margin-bottom: 20px;
  }
  
  .main-content-with-ads {
    order: 2;
  }
  
  .ads-sidebar.right {
    order: 3;
    margin-top: 20px;
  }
  
  /* Anuncios con tamaño fijo y centrados */
  .ad-box {
    min-width: 100%;
    max-width: 100%;
    height: 200px;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    position: relative;
  }
  
  .ad-box::before {
    font-size: 0.85rem;
  }
  
  /* Texto hover ajustado para móvil */
  .ad-hover-text {
    font-size: 0.75rem;
    padding: 8px 16px;
    bottom: -42px;
    white-space: normal;
    max-width: 90%;
    text-align: center;
  }
  
  /* Anuncios reales en móvil */
  .ad-box-real {
    height: auto;
    min-height: 200px;
  }
  
  .ad-real-image {
    height: 150px;
  }
  
  /* Anuncios de imagen en móvil */
  .ad-box-image {
    height: 250px;
  }
  
  .ad-image-full {
    object-fit: contain;
  }
}

/* MÓVILES PEQUEÑOS: Anuncios aún más compactos */
@media (max-width: 480px) {
  .ads-layout {
    padding: 10px;
    gap: 10px;
  }
  
  .ads-sidebar {
    gap: 15px;
  }
  
  .ad-box {
    height: 180px;
    border-radius: 8px;
    padding: 15px;
  }
  
  .ad-box::before {
    font-size: 0.8rem;
    line-height: 1.5;
  }
  
  .ad-hover-text {
    font-size: 0.7rem;
    padding: 6px 12px;
    bottom: -38px;
  }
  
  .ad-box-real {
    min-height: 180px;
  }
  
  .ad-real-image {
    height: 120px;
  }
  
  .ad-real-info {
    padding: 10px;
  }
  
  .ad-real-title {
    font-size: 0.85rem;
  }
  
  .ad-real-description {
    font-size: 0.7rem;
  }
  
  .ad-real-cta {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  
  .ad-box-image {
    height: 220px;
  }
}




/* Anuncios de solo imagen (clickeables) */
.ad-box-image {
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(232, 139, 183, 0.3);
  border-style: solid;
  background: white;
  display: flex;
  flex-direction: column;
  position: relative;
}

.ad-box-image::before {
  display: none;
}

.ad-box-image:hover {
  border-color: var(--primary-pink);
  box-shadow: 0 6px 16px rgba(232, 139, 183, 0.25);
  transform: translateY(-3px);
}

/* Link de la imagen ocupa todo el espacio disponible */
.ad-image-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  overflow: hidden;
  flex: 1;
  position: relative;
}

/* El texto hover SÍ se muestra en anuncios con imagen */
.ad-box-image .ad-hover-text {
  display: block;
  cursor: pointer;
}

.ad-image-full {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.ad-box-image:hover .ad-image-full {
  transform: scale(1.02);
}
