/* =========================================================================
   LISTEN TO IT AGAIN - SEARCH & HOME PAGE STYLES
   ========================================================================= */

/* Hero Section */
.hero {
  position: relative;
  height: 60vh;
  min-height: 450px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* Fallback traffic glow if video fails */
.hero-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 10% 80%, rgba(15, 22, 36, 0.9) 0%, #080c14 100%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(8, 12, 20, 0.2) 0%, rgba(8, 12, 20, 0.6) 100%);
  z-index: 3;
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 800px;
  padding: 0 2rem;
  margin-bottom: 2rem;
}

.hero-headline {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: capitalize;
  background: linear-gradient(135deg, #ffffff 30%, #00d2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subhead {
  color: #cbd5e1; /* Always light slate grey for contrast against the dark background video overlay */
  font-size: 1.25rem;
  margin-bottom: 2rem;
  font-family: var(--font-body);
}

/* Animated Frequency Wave divider */
.hero-waveform {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 0 10%;
  overflow: hidden;
  pointer-events: none;
}

.wave-bar {
  width: 3px;
  height: 10px;
  background: linear-gradient(to top, var(--accent-amber), transparent);
  border-radius: var(--radius-sm);
  animation: wavePulse 1.2s infinite ease-in-out alternate;
}

/* Stagger animations for frequency bars */
.wave-bar:nth-child(2n) { animation-delay: 0.2s; height: 18px; }
.wave-bar:nth-child(3n) { animation-delay: 0.4s; height: 25px; }
.wave-bar:nth-child(4n) { animation-delay: 0.6s; height: 15px; }
.wave-bar:nth-child(5n) { animation-delay: 0.1s; height: 35px; }
.wave-bar:nth-child(6n) { animation-delay: 0.5s; height: 8px; }
.wave-bar:nth-child(7n) { animation-delay: 0.3s; height: 22px; }

@keyframes wavePulse {
  0% { transform: scaleY(0.4); opacity: 0.3; }
  100% { transform: scaleY(1.5); opacity: 0.9; }
}


/* Sticky Horizontal Search Filters Bar */
.filter-bar-sticky-wrapper {
  position: sticky;
  top: 80px;
  z-index: 90;
  background-color: var(--bg-deep);
  border-bottom: 1px solid var(--border-glow);
  padding: 1rem 0;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select, .filter-input {
  width: 100%;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  border: 1px solid var(--border-glow);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.filter-select:disabled {
  background-color: rgba(15, 22, 36, 0.4);
  color: var(--text-dim);
  border-color: rgba(30, 41, 59, 0.5);
  cursor: not-allowed;
}

/* Keyword Search Bar Section */
.search-input-section {
  padding: 3rem 0 2rem 0;
}

.search-bar-container {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  border: 1px solid var(--border-glow);
  padding: 1rem 1.5rem 1rem 3rem;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
  transform: translateY(-1px);
}

.search-icon-placeholder {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  pointer-events: none;
}


/* Ad Results Feed */
.results-section {
  padding-bottom: 5rem;
  scroll-margin-top: 90px;
}

.results-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Ad Card Component */
.ad-card {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-smooth);
  position: relative;
  opacity: 0;
}

.ad-card.loaded {
  opacity: 1;
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ad-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(8, 12, 20, 0.5);
}

/* Card Header Layout */
.ad-card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ad-logo-container {
  width: 60px;
  height: 60px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glow);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ad-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* Custom Play Button */
.play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-gold));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-deep);
  font-size: 1.25rem;
  transition: var(--transition-fast);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.play-btn-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent var(--bg-deep);
  margin-left: 4px;
  transition: var(--transition-fast);
}

/* Playing state button changes */
.ad-card.playing .play-btn {
  background: var(--text-primary);
  color: var(--bg-deep);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.ad-card.playing .play-btn-icon {
  width: 12px;
  height: 14px;
  border: none;
  border-left: 4px solid var(--bg-deep);
  border-right: 4px solid var(--bg-deep);
  margin-left: 0;
}

/* Brand Details */
.ad-brand-meta {
  flex-grow: 1;
}

.ad-company-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.ad-broadcast-details {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ad-broadcast-details span {
  color: var(--accent-amber);
}

/* Card Metadata Grid (Address, Phone, etc.) */
.ad-meta-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px dashed var(--border-glow);
  border-bottom: 1px dashed var(--border-glow);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ad-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.ad-meta-item-label {
  color: var(--text-dim);
  margin-top: 2px; /* Slight offset alignment for top aligned icons */
}

.ad-meta-item-value {
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.4;
}

.ad-meta-item-value a {
  color: var(--accent-amber);
}

/* Transcript Segment */
.ad-transcript-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ad-transcript-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ad-transcript-body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.ad-transcript-body.transcript-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-transcript-container .more-btn {
  font-size: 0.8rem;
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-top: 0.15rem;
  cursor: pointer;
}

.ad-transcript-container .more-btn:hover {
  text-decoration: underline;
}

/* Highlight tags */
mark {
  background-color: rgba(245, 158, 11, 0.25);
  color: var(--accent-gold);
  border-radius: 2px;
  padding: 0 4px;
  border-bottom: 1px solid var(--accent-amber);
}

/* Active audio playing wave overlay on card */
.ad-playing-waveform {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 20px;
  display: none;
  align-items: flex-end;
  justify-content: space-between;
}

.ad-card.playing .ad-playing-waveform {
  display: flex;
}

.wave-bar-small {
  width: 2px;
  height: 4px;
  background-color: var(--accent-amber);
  animation: wavePulseSmall 0.8s infinite ease-in-out alternate;
}

.wave-bar-small:nth-child(2) { animation-delay: 0.15s; height: 8px; }
.wave-bar-small:nth-child(3) { animation-delay: 0.3s; height: 12px; }
.wave-bar-small:nth-child(4) { animation-delay: 0.45s; height: 6px; }
.wave-bar-small:nth-child(5) { animation-delay: 0.2s; height: 10px; }

@keyframes wavePulseSmall {
  0% { transform: scaleY(0.5); opacity: 0.4; }
  100% { transform: scaleY(1.8); opacity: 1; }
}

/* No Results State */
.no-results-card {
  background-color: var(--bg-dark);
  border: 1px dashed var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.no-results-icon {
  font-size: 3rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.no-results-text {
  font-size: 1.25rem;
  color: var(--text-muted);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  font-family: var(--font-mono);
}

.pagination-btn {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  border: 1px solid var(--border-glow);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.pagination-btn:disabled {
  color: var(--text-dim);
  border-color: rgba(30, 41, 59, 0.4);
  cursor: not-allowed;
}

.pagination-btn.active {
  background-color: var(--accent-amber);
  color: var(--bg-deep);
  border-color: var(--accent-amber);
  font-weight: 600;
}


/* Responsive Search adjustments */
@media (max-width: 900px) {
  .filter-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .hero-headline {
    font-size: 2.2rem;
  }
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .filter-bar-sticky-wrapper {
    position: static;
  }
  .ad-card-header {
    flex-wrap: wrap;
  }
  .ad-playing-waveform {
    position: static;
    margin-top: 1rem;
  }
}

/* Share Popover & Share Buttons styles */
.share-option-btn:hover {
  background-color: var(--border-glow) !important;
  color: var(--accent-gold) !important;
}

.ad-share-btn:hover {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber) !important;
}

