.hero {
  position: relative;
  padding: 6rem 0 13rem;
  background-image: linear-gradient(
      135deg,
      rgba(28, 78, 128, 0.4),
      rgba(28, 78, 128, 0.25)
    ),
    url("/static/img/site/grosshause-hero.jpg");
  background-size: cover, cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll, scroll;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.3) 80%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
}

@media (max-width: 600px) {
  .hero {
    padding: 4rem 0 6rem;
  }
}

.hero + .overlap-section {
  margin-top: -6rem;
  position: relative;
  z-index: 2;
}

.overlap-section .container {
  background: var(--color-surface);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.section-title {
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.section-subtitle {
  margin: 0;
  color: var(--color-muted);
  font-size: 1rem;
  max-width: 520px;
}

.agents-highlight {
  padding: 4rem 0;
}

.agents-highlight__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.agents-highlight__cta {
  align-self: center;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  border: 1px solid rgba(92, 106, 196, 0.35);
  font-weight: 600;
  color: var(--color-secondary);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.agents-highlight__cta:hover,
.agents-highlight__cta:focus {
  background: var(--color-secondary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(92, 106, 196, 0.25);
}

.listings-grid__item--hidden {
  display: none;
}

.listings-grid__item--hidden-mobile {
  display: none;
}

.listings-grid__more-btn {
  margin: 2rem auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2.75rem;
  border: none;
  border-radius: 999px;
  background: var(--color-primary);
  color: #1f1f1f;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.listings-grid__more-btn:hover,
.listings-grid__more-btn:focus {
  background: var(--color-primary-dark);
  box-shadow: 0 18px 36px rgba(246, 206, 79, 0.45);
  transform: translateY(-2px);
}

.listings-grid__more-btn--mobile-only {
  display: inline-flex;
}

@media (min-width: 768px) {
  .listings-grid__item--hidden-mobile {
    display: block;
  }

  .listings-grid__more-btn--mobile-only {
    display: none;
  }
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0));
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

@media (min-width: 960px) {
  .agents-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.agent-card {
  position: relative;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(248, 249, 255, 0.96) 45%,
    rgba(247, 200, 67, 0.12) 100%
  );
  background-size: 180% 180%;
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 26px rgba(31, 38, 92, 0.08);
  overflow: hidden;
  transform: translateZ(0);
  transition: background-position 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease, border-color 0.35s ease;
}

.agent-card::before {
  content: "";
  position: absolute;
  inset: -35% -45% -45%;
  background: radial-gradient(
      circle at 18% 20%,
      rgba(247, 200, 67, 0.35),
      transparent 60%
    ),
    radial-gradient(
      circle at 80% 15%,
      rgba(92, 106, 196, 0.28),
      transparent 55%
    );
  opacity: 0;
  transform: rotate(3deg) scale(0.8);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.agent-card:nth-child(-n + 3) {
  border-top: none;
}

.agent-card:nth-child(3n + 1) {
  border-left: none;
}

.agent-card:hover {
  background-position: 100% 100%;
  box-shadow: 0 30px 48px rgba(31, 38, 92, 0.18);
  border-color: rgba(0, 0, 0, 0.08);
}

.agent-card:hover::before {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.agent-card__wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.75rem 2.15rem;
  gap: 1.75rem;
  min-height: 100%;
  position: relative;
  z-index: 1;
}

.agent-card__avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease;
}

.agent-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-card:hover .agent-card__avatar {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.25);
}

.agent-card__body {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

@media (prefers-reduced-motion: reduce) {
  .agent-card,
  .agent-card::before,
  .agent-card__avatar {
    transition: none;
  }
}

.agent-card__body h3 {
  margin: 0;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
}

.agent-card__title {
  font-weight: 600;
  color: var(--color-muted);
}

.agent-card__body p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.55;
}

.agent-card__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.agent-card__languages {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(26, 26, 26, 0.55);
}

.agent-card__link {
  color: var(--color-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.agent-card__link:hover,
.agent-card__link:focus {
  color: var(--color-primary-dark);
}

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0 6rem;
    background-attachment: scroll, scroll;
  }

  .hero__filters {
    grid-template-columns: 1fr;
  }

  .hero + .overlap-section {
    margin-top: -4rem;
  }

  .agents-highlight__header {
    flex-direction: column;
    align-items: flex-start;
  }
}
