/* V16.1.20 — avgrensede rettelser på eksisterende forside */

/* Menyen tilhører menyknappen og åpnes rett under den. */
.reference-home .home-topbar {
  overflow: visible;
}

.reference-home .menu-anchor {
  position: relative;
  display: flex;
  align-items: center;
}

.reference-home .menu-anchor .menu-panel {
  position: absolute !important;
  inset: calc(100% + 8px) 0 auto auto !important;
  width: 240px;
  max-height: min(72vh, 560px);
  overflow-y: auto;
  transform-origin: top right;
}

.reference-home .menu-anchor .menu-panel.open {
  display: grid;
}

/* Logoen er uendret, men får korrekt lys variant i mørk modus. */
html[data-theme="dark"] .reference-home .top-inner .brand-link .theme-logo,
html[data-theme="dark"] .reference-home .ai-guide-brand .theme-logo {
  content: url('/assets/img/regnrbil-logo-dark.svg') !important;
}

/* Behold det opprinnelige, rene hovedfeltet uten sidekort. */
.reference-home .hero-grid {
  width: min(calc(100% - 32px), 620px) !important;
  grid-template-columns: minmax(0, 620px) !important;
  justify-content: center;
  gap: 0 !important;
}

.reference-home .float-copy,
.reference-home .hero-kicker {
  display: none !important;
}

.reference-home .hero-center {
  width: 100%;
  min-width: 0;
  transform: translateY(-10px) !important;
  filter: none !important;
}

/* Lavmælt introduksjon: mindre enn ordmerket i toppbanneret. */
.reference-home .hero-center h1 {
  max-width: 560px;
  margin: 0 auto 7px;
  font-size: clamp(19px, 1.45vw, 24px) !important;
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -.015em;
  text-shadow: 0 1px 0 rgba(255,255,255,.72), 0 8px 20px rgba(22,51,75,.16) !important;
}

.reference-home .hero-center > p {
  max-width: 520px;
  margin: 0 auto 18px;
  color: #4f687b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  text-shadow: none !important;
}

html[data-theme="dark"] .reference-home .hero-center h1 {
  color: #f5f8fb;
  text-shadow: 0 0 15px rgba(255,255,255,.16), 0 10px 22px rgba(0,0,0,.52) !important;
}

html[data-theme="dark"] .reference-home .hero-center > p {
  color: #b7c6d1;
}

/* Skiltet beholder original målestokk og får tydelig, men rolig dybde. */
.reference-home .hero-plate {
  position: relative;
  width: min(520px, calc(100vw - 32px)) !important;
  height: 78px !important;
  margin: 0 auto !important;
  grid-template-columns: 62px minmax(0, 1fr) !important;
  border-width: 3px !important;
  transform: none !important;
  box-shadow: 0 2px 0 rgba(255,255,255,.9), 0 17px 36px rgba(20,49,72,.28), 0 35px 60px rgba(20,49,72,.14) !important;
}

.reference-home .hero-plate::after {
  content: none !important;
}

.reference-home .hero-plate .plate-input::placeholder {
  color: #687680;
  font-weight: 500;
  opacity: .66;
  text-align: center;
}

html[data-theme="dark"] .reference-home .hero-plate {
  box-shadow: 0 0 0 1px rgba(255,255,255,.27), 0 14px 30px rgba(255,255,255,.08), 0 34px 62px rgba(0,0,0,.62) !important;
}

/* Tre statuser rett på bakgrunnen — ingen runding, ramme eller plate. */
.reference-home .connection-status {
  width: auto !important;
  margin: 14px auto 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4vw, 38px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.reference-home .connection-status span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 !important;
  color: #183b54;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.reference-home .connection-status i {
  width: 7px;
  height: 7px;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: #18c65a;
  box-shadow: 0 0 9px rgba(24,198,90,.78);
}

html[data-theme="dark"] .reference-home .connection-status span {
  color: #d6e2ea;
}

/* Søkeknappen skal være det tydeligste handlingspunktet. */
.reference-home .hero-center .search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(290px, calc(100vw - 48px));
  min-height: 48px;
  margin: 15px auto 0;
  border-color: rgba(0,84,166,.58);
  background: linear-gradient(180deg, #2386eb, #0969c9);
  font-weight: 750;
  box-shadow: 0 2px 0 rgba(255,255,255,.42) inset, 0 14px 26px rgba(0,75,148,.34), 0 29px 48px rgba(16,67,111,.2) !important;
}

@media (max-width: 620px) {
  .reference-home .hero-grid {
    width: 100% !important;
    padding-inline: 11px;
  }

  .reference-home .hero-center {
    transform: translateY(-8px) !important;
  }

  .reference-home .hero-center h1 {
    max-width: 350px;
    font-size: 20px !important;
    margin-bottom: 7px;
  }

  .reference-home .hero-center > p {
    max-width: 340px;
    margin-bottom: 16px;
    font-size: 10px;
  }

  .reference-home .hero-plate {
    width: min(390px, calc(100vw - 22px)) !important;
    height: 70px !important;
    grid-template-columns: 55px minmax(0, 1fr) !important;
  }

  .reference-home .hero-plate .plate-input {
    min-width: 0;
    font-size: clamp(29px, 10vw, 39px) !important;
    letter-spacing: .07em;
  }

  .reference-home .connection-status {
    gap: clamp(10px, 4.4vw, 20px) !important;
    margin-top: 13px !important;
  }

  .reference-home .connection-status span {
    gap: 5px;
    font-size: 9px;
  }

  .reference-home .connection-status i {
    width: 6px;
    height: 6px;
  }

  .reference-home .hero-center .search-btn {
    width: min(280px, calc(100vw - 50px));
    margin: 14px auto 0;
  }

  .reference-home .menu-anchor .menu-panel {
    width: min(240px, calc(100vw - 22px));
  }
}

@media (max-width: 380px) {
  .reference-home .hero-center h1 {
    font-size: 18px !important;
  }

  .reference-home .hero-center > p {
    max-width: 300px;
  }

  .reference-home .connection-status {
    gap: 10px !important;
  }
}
