/* ============================================================
   Stova — Ihre Schweizer Immobiliensuche
   styles.css
   ============================================================ */

/* ----- Reset & Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green:        #2D6A4F;
  --green-dark:   #1E4D38;
  --green-light:  #E8F5EE;
  --white:        #FAFAF8;
  --grey-light:   #F5F5F3;
  --grey-mid:     #E0E0DC;
  --grey-text:    #6B6B68;
  --grey-muted:   #9B9B97;
  --text:         #1A1A18;
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.12);
  --radius:       8px;
  --font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ----- Layout helpers ----- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ----- Navigation ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--grey-mid);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.nav__brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav__tagline {
  font-size: 0.75rem;
  color: var(--grey-text);
  font-weight: 400;
  display: none;
}

@media (min-width: 480px) {
  .nav__tagline {
    display: block;
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grey-text);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav__links a:hover {
  color: var(--green);
  background: var(--green-light);
}

/* ----- Hero ----- */
.hero {
  background: var(--grey-light);
  padding: 72px 0 80px;
  text-align: center;
}

.hero__headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero__subline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--grey-text);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

/* ----- Search Form ----- */
.search-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.search-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--grey-light);
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
}

.toggle-btn {
  padding: 8px 24px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--grey-text);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.toggle-btn.active {
  background: #fff;
  color: var(--green);
  box-shadow: var(--shadow-sm);
}

.toggle-btn:hover:not(.active) {
  color: var(--text);
}

.search-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .search-fields {
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: end;
  }
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grey-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-field input,
.search-field select {
  padding: 10px 14px;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.search-field input::placeholder {
  color: var(--grey-muted);
}

.search-field input:focus,
.search-field select:focus {
  border-color: var(--green);
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--grey-text);
  pointer-events: none;
}

.btn-search {
  padding: 10px 28px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  white-space: nowrap;
  width: 100%;
}

@media (min-width: 640px) {
  .btn-search {
    width: auto;
    align-self: flex-end;
    height: 44px;
  }
}

.btn-search:hover {
  background: var(--green-dark);
}

.btn-search:active {
  transform: scale(0.97);
}

/* ----- Section titles ----- */
.section {
  padding: 72px 0;
}

.section__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.section__subtitle {
  font-size: 1rem;
  color: var(--grey-text);
  margin-bottom: 40px;
}

/* ----- Listings Grid ----- */
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ----- Listing Card ----- */
.listing-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}

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

.listing-card__image {
  width: 100%;
  height: 200px;
  background: var(--grey-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.listing-card__image svg {
  width: 64px;
  height: 64px;
  opacity: 0.25;
}

.listing-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--miete {
  background: var(--green);
  color: #fff;
}

.badge--kauf {
  background: #2563EB;
  color: #fff;
}

.listing-card__body {
  padding: 16px 20px 20px;
}

.listing-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.listing-card__location {
  font-size: 0.8125rem;
  color: var(--grey-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-card__location::before {
  content: "📍";
  font-size: 0.75rem;
}

.listing-card__price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.listing-card__details {
  font-size: 0.8125rem;
  color: var(--grey-muted);
}

/* ----- Value Proposition Strip ----- */
.value-strip {
  background: var(--grey-light);
  padding: 56px 0;
}

.value-strip__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  text-align: center;
}

@media (min-width: 640px) {
  .value-strip__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.value-item__icon {
  font-size: 2.25rem;
  line-height: 1;
}

.value-item__heading {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.value-item__text {
  font-size: 0.875rem;
  color: var(--grey-text);
  max-width: 220px;
}

/* ----- CTA Section ----- */
.cta {
  background: var(--green);
  padding: 72px 0;
  text-align: center;
}

.cta__heading {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cta__subtext {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.85);
  max-width: 480px;
  margin: 0 auto 32px;
}

.btn-cta {
  display: inline-block;
  padding: 14px 36px;
  background: #fff;
  color: var(--green);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  text-decoration: none;
}

.btn-cta:hover {
  background: var(--grey-light);
}

.btn-cta:active {
  transform: scale(0.97);
}

/* ----- Footer ----- */
.footer {
  background: var(--text);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
}

.footer__links a {
  font-size: 0.8125rem;
  color: var(--grey-muted);
  transition: color 0.15s;
}

.footer__links a:hover {
  color: #fff;
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--grey-muted);
  white-space: nowrap;
}

/* ----- 404 page ----- */
.notfound {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grey-light);
  padding: 40px 20px;
}

.notfound__box {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 56px 48px;
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.notfound__code {
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--green);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.notfound__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.notfound__text {
  font-size: 0.9375rem;
  color: var(--grey-text);
  margin-bottom: 32px;
}

.btn-back {
  display: inline-block;
  padding: 12px 32px;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font);
  text-decoration: none;
  transition: background 0.18s;
}

.btn-back:hover {
  background: var(--green-dark);
}
