/**
 * MASONRY STRONG Network Section Styles
 * GIF areas and brand badges
 */

/* Main Image */
.masonry-strong-main-image {
  width: 100%;
  max-height: 400px; /* Reduce height - was too tall */
  height: auto !important; /* Override parent img styles */
  object-fit: cover !important; /* Crop to fit max-height */
  border-radius: 1rem;
  margin-bottom: 0;
}

/* Override media container for MASONRY STRONG to allow vertical content */
.feature-block-image-left .feature-block-media {
  overflow: visible; /* Allow GIFs to show below main image */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center vertically */
  align-items: center; /* Center horizontally (optional but keeps alignment) */
}

/* GIF Areas Grid */
.masonry-strong-gifs {
  margin-top: 1rem;
}

.masonry-strong-gifs-top {
  margin-top: 0;
  margin-bottom: 1rem;
}

.masonry-strong-gifs-bottom {
  margin-top: 1rem;
}

.gif-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--map-surface-secondary, #f5f5f5);
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid var(--map-border-subtle, rgba(0, 0, 0, 0.1));
}

.gif-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dark mode support */
:root[data-bs-theme="dark"] .gif-placeholder {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Brand Badges */
.masonry-strong-brands {
  margin-top: 2rem;
}

.brand-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.brand-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--map-color-brand, #eb0029);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.25rem;
  border: 2px solid var(--map-color-brand, #eb0029);
  white-space: nowrap;
  transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
}

.brand-badge:hover {
  background: var(--map-color-brand, #eb0029);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Dark mode brand badges */
:root[data-bs-theme="dark"] .brand-badge {
  background: transparent;
  color: var(--map-color-brand, #eb0029);
  border-color: var(--map-color-brand, #eb0029);
}

:root[data-bs-theme="dark"] .brand-badge:hover {
  background: var(--map-color-brand, #eb0029);
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .video-thumbnail-placeholder {
    height: 70px; /* Slightly smaller on tablets */
  }
  
  .video-thumbnail-placeholder .play-icon {
    font-size: 1.75rem;
  }
  
  .brand-badge {
    font-size: 0.813rem;
    padding: 0.4rem 0.875rem;
  }
}

/* Responsive Styles */
@media (max-width: 991.98px) {
  .masonry-strong-gifs .row {
    row-gap: 0.5rem;
  }
}

@media (max-width: 767.98px) {
  .masonry-strong-gifs {
    margin-top: 0.75rem;
  }
  
  .masonry-strong-gifs .row {
    gap: 0.5rem;
  }
  
  .brand-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .brand-badge {
    transition: none;
  }
  
  .brand-badge:hover {
    transform: none;
  }
  
  /* Pause GIF animations for reduced motion users */
  .gif-placeholder img {
    animation-play-state: paused;
  }
}
