/*
 * The homepage (index.php): hero search, latest listings, breed and feature sections.
 * Linked from the <head> by the page ($boPageStylesheets).
 */
.home-landing {
  /* One gap above the photo, between the photo and the search bar, and
     below the search bar, so the hero sits evenly between header and content. */
  --hero-gap: clamp(2rem, 3.6vw, 3.25rem);
  background: linear-gradient(180deg, #fbfdfc 0%, #f5faf8 72%, #ffffff 100%);
  padding: var(--hero-gap) 0;
  position: relative;
  overflow: hidden;
}

.home-landing::before {
  content: '';
  position: absolute;
  left: max(-120px, -8vw);
  top: 80px;
  width: min(640px, 45vw);
  aspect-ratio: 1;
  background: url('/img/SVG/logo-watermark.svg') no-repeat center center / contain;
  opacity: 0.38;
}

.home-landing .container {
  position: relative;
  z-index: 1;
}

.home-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: center;
}

.home-hero-copy {
  max-width: 600px;
}

.home-hero-copy h1 {
  /* Sized so "Find your next / family member." stays on two lines. */
  font-size: clamp(2.6rem, 4.9vw, 4.4rem);
  line-height: 1.02;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
  letter-spacing: 0;
  text-wrap: balance;
}

.home-hero-copy .hero-lead {
  max-width: 520px;
  font-size: clamp(1.02rem, 1.65vw, 1.2rem);
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.hero-actions .btn {
  min-width: 128px;
  justify-content: center;
}

.home-landing .hero-actions .btn,
.home-landing .home-search-button {
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none;
}

.home-landing .btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.home-landing .btn-primary:hover,
.home-landing .btn-primary:focus {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.home-landing .btn-primary::after {
  display: none;
}

.home-landing .btn-outline {
  background: #ffffff;
  box-shadow: none !important;
}

.home-landing .btn-outline:hover,
.home-landing .btn-outline:focus {
  background: var(--primary-subtle);
  box-shadow: none !important;
}

.home-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-image-mask {
  position: relative;
  width: min(100%, 620px);
  aspect-ratio: 1.15;
  overflow: hidden;
  border-radius: 18px;
  background: transparent;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.hero-image-mask picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-image-mask img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  border-radius: inherit;
}

.home-search-panel {
  margin-top: var(--hero-gap);
  padding: 0.78rem;
  border: 1px solid rgba(26, 95, 74, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 45px rgba(19, 72, 57, 0.08);
  backdrop-filter: blur(12px);
}

.home-search-fields {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(150px, 1.1fr) minmax(150px, 1fr) minmax(140px, 0.95fr) minmax(116px, 0.62fr);
  gap: 0.62rem;
  align-items: center;
}

.home-search-field {
  display: block;
  min-width: 0;
  margin: 0;
}

.home-search-field span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-search-field .form-select {
  min-height: 46px;
  border: 1px solid rgba(26, 95, 74, 0.12);
  border-radius: 8px;
  box-shadow: none;
  /* 16px: anything smaller makes iPhones zoom in when the field is tapped. */
  font-size: 1rem;
  background-color: #ffffff;
}

.home-search-button {
  min-height: 46px;
  justify-content: center;
  border-radius: 8px;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .home-hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 1fr);
    gap: clamp(1.8rem, 4vw, 3rem);
  }

  .home-search-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-search-button {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .home-landing {
    --hero-gap: var(--space-lg);
    padding: var(--space-lg) 0;
  }

  .home-landing::before {
    width: 340px;
    right: -190px;
    top: 170px;
  }

  .home-hero-shell {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .home-hero-copy h1 {
    font-size: clamp(2.3rem, 10.5vw, 3.3rem);
    margin-bottom: 0.75rem;
  }

  .home-hero-copy .hero-lead {
    font-size: 1rem;
    margin-bottom: var(--space-lg);
  }

  .hero-actions .btn {
    min-width: 118px;
  }

  .home-hero-visual {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
    justify-content: center;
  }

  .home-search-panel {
    padding: 0.72rem;
  }

  .home-search-fields {
    grid-template-columns: 1fr;
    gap: 0.58rem;
  }

  .home-search-button {
    grid-column: auto;
  }

  .section {
    padding: var(--space-2xl) 0;
  }
}
.platform-feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.platform-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: var(--space-3xl);
  align-items: center;
}

.platform-split-content {
  max-width: 620px;
}

.platform-split-content h2 {
  margin-bottom: var(--space-md);
}

.platform-search-card {
  box-shadow: var(--shadow-lg);
}

.breeder-pain-section {
  background: linear-gradient(180deg, white 0%, var(--bg-subtle) 100%);
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

.pain-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pain-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26, 95, 74, 0.15);
}

.pain-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-subtle);
  color: var(--secondary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.pain-icon i {
  font-size: 1.35rem;
}

.pain-card h4 {
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.pain-card p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: 0;
  line-height: 1.5;
}

.care-showcase {
  align-items: stretch;
}

.care-panel {
  align-self: center;
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.care-row {
  grid-template-columns: 40px minmax(0, 1fr);
  display: grid;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.care-row div {
  min-width: 0;
}

.care-row i {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-subtle);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
}

.care-row span {
  color: var(--text-primary);
  font-weight: 600;
}

.care-row strong {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.4;
}

.care-row-featured {
  background: var(--primary-subtle);
  border-color: rgba(26, 95, 74, 0.18);
}

.listing-status {
  position: absolute;
  left: var(--space-sm);
  top: var(--space-sm);
  z-index: 1;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.listing-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: 0.45rem;
}

.listing-card-topline span {
  min-width: 0;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-card-topline strong {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-size: var(--text-sm);
}

.listing-trust-row {
  display: grid;
  gap: 0.4rem;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.listing-trust-row span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.listing-trust-row i {
  color: var(--primary);
}

.listing-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-md);
  color: var(--primary-dark);
  font-size: var(--text-sm);
  font-weight: 800;
}

/* Skeleton Loading Styles */
.skeleton-card .card-image {
  background: var(--bg-muted);
}

.skeleton-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-subtle) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-title {
  height: 20px;
  width: 70%;
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-subtle) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text {
  height: 14px;
  width: 50%;
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-subtle) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

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

.skeleton-card {
  pointer-events: none;
}

.skeleton-card .card-overlay {
  display: none;
}
@media (max-width: 1024px) {
  .platform-split {
    grid-template-columns: 1fr;
  }

  .platform-search-card {
    max-width: 560px;
    margin: 0 auto;
  }

  .platform-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-2xl) 0;
  }

  .platform-feature-grid {
    grid-template-columns: 1fr;
  }

  .platform-split {
    gap: var(--space-xl);
  }
}
