/*
 * The dog and cat breed guides (views/species-breed-guide.php): trending
 * bar, alphabet navigation, popular breeds, the all-breeds grid and the
 * "choosing a breed" cards. Linked from the <head> by the page
 * ($boPageStylesheets).
 */
/* Trending Bar */
.trending-bar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: var(--space-md) 0;
  overflow: hidden;
}

.trending-bar .container {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.trending-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: white;
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  padding-right: var(--space-md);
  border-right: 1px solid rgba(255,255,255,0.2);
}

.trending-header i {
  color: #ff6b35;
  font-size: var(--text-xl);
}

.trending-breeds {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding: var(--space-xs) 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.trending-breeds::-webkit-scrollbar {
  display: none;
}

.trending-breed {
  display: block;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
  transition: all var(--transition-fast);
}

.trending-breed:hover {
  border-color: var(--primary);
  transform: scale(1.1);
}

.trending-breed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Hero Compact */
.hero-compact {
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.hero-compact .hero-content.centered {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-compact h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: var(--space-md);
}

.hero-compact .hero-lead {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xl);
}

/* Hero Search */
.hero-search {
  max-width: 500px;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper i {
  position: absolute;
  left: var(--space-lg);
  color: var(--text-muted);
  font-size: 1.25rem;
}

.search-input {
  width: 100%;
  padding: var(--space-md) var(--space-lg) var(--space-md) 3.5rem;
  font-size: var(--text-lg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-body);
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 95, 74, 0.1);
}

.breed-search-status {
  min-height: 1.5em;
  margin: var(--space-sm) 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.breed-search-status a {
  font-weight: 600;
}

/* Alphabet Bar */
.alphabet-bar {
  background: var(--primary-dark);
  padding: var(--space-md) 0;
  position: sticky;
  top: 80px;
  z-index: 100;
}

.alphabet-nav {
  display: flex;
  gap: 2px;
  justify-content: center;
  flex-wrap: wrap;
}

.alpha-btn {
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 36px;
}

.alpha-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.alpha-btn.active {
  background: var(--primary);
  color: white;
}

.alpha-btn.disabled {
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
}

/* Popular Breeds Grid */
.popular-breeds-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.popular-breed-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-body);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.popular-breed-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.breed-card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.breed-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform var(--transition-slow);
}

.popular-breed-card:hover .breed-card-image img {
  transform: scale(1.05);
}

.breed-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.popular-breed-card:hover .breed-card-overlay {
  opacity: 1;
}

.view-breed {
  color: white;
  font-weight: 500;
  font-size: var(--text-sm);
}

.breed-card-content {
  padding: var(--space-md);
}

.breed-card-content h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0 0 var(--space-xs);
}

.breed-listings {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* All Breeds Grid */
.section-subtle {
  background: var(--bg-subtle);
}

.breeds-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-md);
}

.breed-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: var(--space-md);
  background: var(--bg-body);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.breed-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.breed-card.hidden {
  display: none;
}

.breed-card-thumb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--space-sm);
  box-shadow: var(--shadow-sm);
}

.breed-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.breed-card-name {
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

/* No Results */
.no-results {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.no-results i {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: var(--space-md);
}

.no-results h3 {
  margin-bottom: var(--space-sm);
}

.no-results p {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* Info Cards Stack */
.info-cards-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 400px;
}

.info-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-body);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.info-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.info-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The pale tint: the icon was green on mid green. */
  background: var(--primary-subtle);
  color: var(--primary);
  border-radius: var(--radius-md);
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.info-card-content h3 {
  font-size: var(--text-base);
  color: var(--primary);
  margin: 0 0 var(--space-xs);
}

.info-card-content p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

/* Feature List Enhancement */
.feature-list li {
  margin-bottom: var(--space-sm);
}

.feature-list li strong {
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1200px) {
  .popular-breeds-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .breeds-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {
  .popular-breeds-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .breeds-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .trending-bar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .trending-header {
    border-right: none;
    padding-right: 0;
  }

  .hero-compact {
    padding: var(--space-2xl) 0 var(--space-xl);
  }

  /* The A-Z bar keeps its top: 80px here too: the fixed header is 80px
     tall at every width (60px hid the top of the letters under it). */

  .alphabet-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-sm);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .alphabet-nav::-webkit-scrollbar {
    display: none;
  }

  .alpha-btn {
    padding: 0.5rem 0.625rem;
    min-width: 32px;
    font-size: 0.8125rem;
  }

  .popular-breeds-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .breeds-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .info-cards-stack {
    margin: var(--space-xl) auto 0;
  }
}

@media (max-width: 480px) {
  .breeds-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .breed-card-thumb {
    width: 64px;
    height: 64px;
  }

  .breed-card-name {
    font-size: 0.75rem;
  }
}
