/* ===== RESET & TOKENS ===== */
:root {
  --green: #2d7a3a;
  --lime: #7cbf5e;
  --dark: #0f1f0f;
  --cream: #f0ede8;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--cream); color: var(--dark); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

/* ===== SEARCH PAGE ===== */
.search-page {
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 120px 24px 120px;
  background: var(--cream);
}
.sp-logo { display: flex; align-items: center; margin-bottom: 16px; }
.sp-logo-svg { height: 40px; width: auto; vertical-align: middle; margin-right: 12px; fill: var(--green); }
.sp-logo-text { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--dark); letter-spacing: -0.5px; }
.sp-tagline { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: rgba(26,46,26,0.5); margin-bottom: 32px; text-align: center; }
.sp-trust { display: flex; gap: 24px; margin-top: 20px; font-size: 13px; color: rgba(26,46,26,0.45); flex-wrap: wrap; justify-content: center; }
.sp-trust span { display: flex; align-items: center; gap: 6px; }
.sp-trust i { color: var(--green); }

/* ===== SEARCH CARD – søkebar + panel i ett ===== */
.hero-search-wrap { max-width: 860px; width: 90%; }

.search-card {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.1);
  width: 100%;
}

/* ===== AIRBNB BAR ===== */
.konteiner-bar {
  display: flex; align-items: center;
  background: #fff;
  padding: 8px 8px 8px 24px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  width: 100%;
}
.konteiner-bar.has-results { border-bottom-color: #ebe8e3; }

.kb-segment {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 8px 16px; cursor: pointer; border-radius: 80px;
  transition: background 0.2s;
}
.kb-segment:hover { background: #f5f5f5; }
.kb-addr { flex: 2; }
.kb-label { font-size: 11px; font-weight: 700; color: #222; letter-spacing: 0.3px; margin-bottom: 2px; }
.kb-value { font-size: 14px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-input { border: none; outline: none; font-size: 14px; color: #333; background: transparent; width: 100%; font-family: var(--font-body); }
.kb-input::placeholder { color: #aaa; }
.kb-date-input { cursor: pointer; color: #888; }
.kb-date-input::-webkit-calendar-picker-indicator { opacity: 0.4; }
.kb-divider { width: 1px; height: 36px; background: #e0e0e0; flex-shrink: 0; }
.kb-search-btn {
  background: var(--green); color: #fff; border: none;
  border-radius: 100px; padding: 14px 24px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: background 0.2s; white-space: nowrap; flex-shrink: 0; margin-left: 8px;
}
.kb-search-btn:hover { background: #235f2d; }

/* Progressive disclosure */
.kb-segment.dim { opacity: 0.4; pointer-events: none; }
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(45,122,58,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(45,122,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(45,122,58,0); }
}
.kb-search-btn.ready { animation: pulse-green 1.4s ease infinite; }

/* Type dropdown */
.kb-type { position: relative; }
.kb-dropdown { position: absolute; top: calc(100% + 12px); left: 0; background: #fff; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); min-width: 220px; padding: 8px; z-index: 500; display: none; }
.kb-dropdown.open { display: block; }
.kb-option { padding: 12px 16px; border-radius: 10px; cursor: pointer; font-size: 14px; color: #333; display: flex; align-items: center; gap: 10px; transition: background 0.12s; }
.kb-option:hover { background: #f0f7f1; }
.kb-opt-size { background: #e8f4e8; color: var(--green); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 100px; }

/* Autocomplete */
.autocomplete-wrap { position: relative; flex: 2; }
.autocomplete-list { position: absolute; top: calc(100% + 20px); left: -24px; width: calc(100% + 40px); z-index: 600; background: #fff; border-radius: 16px; box-shadow: 0 12px 32px rgba(0,0,0,0.12); max-height: 280px; overflow-y: auto; display: none; }
.ac-item { padding: 14px 16px; cursor: pointer; border-bottom: 1px solid #f5f5f5; display: flex; align-items: center; gap: 12px; transition: background 0.12s; }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: #f0f7f1; }
.ac-icon { color: var(--green); font-size: 15px; flex-shrink: 0; }
.ac-addr { font-weight: 600; color: #1a2e1a; font-size: 14px; }
.ac-post { font-size: 12px; color: #888; margin-top: 2px; }

/* ===== SEARCH PANEL ===== */
#searchPanel {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.45s cubic-bezier(0.32,0.72,0,1), opacity 0.3s ease;
}
#searchPanel.open { max-height: 700px; opacity: 1; pointer-events: all; }




/* Panel innhold */
#spInner { font-family: var(--font-body); }
.sp-heading { padding: 16px 20px 8px; font-size: 11px; font-weight: 700; color: #aaa; letter-spacing: 1px; text-transform: uppercase; }
.sp-prov { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-radius: 14px; cursor: pointer; transition: background 0.15s; margin: 2px 8px; }
.sp-prov:hover { background: #f5faf5; }
.sp-prov-logo { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; flex-shrink: 0; }
.sp-prov-info { flex: 1; min-width: 0; }
.sp-prov-name { font-weight: 700; font-size: 15px; color: #1a2e1a; margin-bottom: 2px; }
.sp-prov-meta { font-size: 12px; color: #888; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sp-prov-meta i { color: var(--green); }
.sp-prov-price { text-align: right; flex-shrink: 0; }
.sp-prov-kr { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: #1a2e1a; }
.sp-prov-label { font-size: 11px; color: #aaa; }
.sp-best { display: inline-block; font-size: 10px; font-weight: 700; background: var(--green); color: #fff; padding: 2px 10px; border-radius: 100px; margin-bottom: 4px; }
.sp-divider { height: 1px; background: #f0ede8; margin: 2px 20px; }
.sp-back { background: none; border: none; color: var(--green); font-size: 13px; font-weight: 600; cursor: pointer; padding: 14px 20px 8px; display: block; }
.sp-back:hover { text-decoration: underline; }

/* Booking */
.sp-booking { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 8px 20px 20px; }
.sp-booking-summary { background: #f7f6f3; border-radius: 16px; padding: 16px; }
.sp-bs-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 13px; color: #333; }
.sp-bs-row:last-child { border: none; font-weight: 700; font-size: 15px; color: var(--green); }
.sp-bs-key { color: #999; }
.sp-booking-form { display: flex; flex-direction: column; gap: 10px; }
.sp-bf-title { font-weight: 700; font-size: 14px; color: #1a2e1a; }
.sp-bf-input { padding: 12px 14px; border: 1.5px solid #e8e8e8; border-radius: 12px; font-size: 14px; font-family: var(--font-body); outline: none; transition: border-color 0.2s; width: 100%; }
.sp-bf-input:focus { border-color: var(--green); }
.sp-bf-submit { background: var(--green); color: #fff; border: none; border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.2s; width: 100%; }
.sp-bf-submit:disabled { background: #ccc; cursor: not-allowed; }
.sp-bf-submit:not(:disabled):hover { background: #235f2d; }

/* Betaling-steg */
.sp-payment { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.sp-pay-summary { background: #f7f6f3; border-radius: 14px; padding: 12px 16px; }

/* Sorteringsregler */
.sp-rules-box { background: #fffbf0; border: 1.5px solid #f0d080; border-radius: 14px; padding: 16px; font-size: 13px; }
.sp-rules-title { font-weight: 700; font-size: 13px; color: #8a6000; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.sp-rules-title i { color: #e6a800; }
.sp-rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.sp-rules-ok { background: #f0faf0; border: 1px solid #b8ddb8; border-radius: 10px; padding: 10px 12px; }
.sp-rules-no { background: #fff5f5; border: 1px solid #f0b8b8; border-radius: 10px; padding: 10px 12px; }
.sp-rules-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 8px; }
.sp-ok { color: #2d7a3a; }
.sp-no { color: #c0392b; }
.sp-rules-ok ul, .sp-rules-no ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sp-rules-ok li, .sp-rules-no li { font-size: 12px; color: #444; display: flex; align-items: center; gap: 6px; }
.sp-rules-ok li::before { content: '✓'; color: #2d7a3a; font-weight: 700; flex-shrink: 0; }
.sp-rules-no li::before { content: '✗'; color: #c0392b; font-weight: 700; flex-shrink: 0; }
.sp-rules-warning { background: #fff3cd; border: 1px solid #ffc107; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #6b4c00; display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; line-height: 1.5; }
.sp-rules-warning i { color: #e6a800; font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.sp-rules-warning strong { color: #c0392b; }
.sp-rules-accept { display: flex; align-items: flex-start; gap: 12px; background: #f7f6f3; border: 2px solid #e0e0e0; border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color 0.2s, background 0.2s; line-height: 1.5; font-size: 12px; color: #555; }
.sp-rules-accept:hover { border-color: var(--green); }
.sp-rules-accept.accepted { border-color: var(--green); background: #f0faf0; }
.sp-rules-check { width: 22px; height: 22px; min-width: 22px; border-radius: 6px; background: #fff; border: 2px solid #ccc; display: flex; align-items: center; justify-content: center; transition: all 0.2s; margin-top: 1px; }
.sp-rules-check i { color: #fff; font-size: 13px; display: none; }
.sp-rules-check.checked { background: var(--green); border-color: var(--green); }
.sp-rules-check.checked i { display: block; }

/* Suksess */
.sp-success { padding: 36px 24px; text-align: center; }
.sp-success-icon { font-size: 52px; margin-bottom: 12px; }
.sp-success-h { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--green); margin-bottom: 6px; }
.sp-success-sub { color: #888; font-size: 14px; margin-bottom: 20px; }

/* ===== STATS ===== */
.stats { background: #0a180a; padding: 40px 24px; }
.stats-inner { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: repeat(4,1fr); }
.stat { padding: 20px 32px; border-right: 1px solid rgba(255,255,255,0.07); text-align: center; }
.stat:last-child { border-right: none; }
.stat-n { font-family: var(--font-display); font-size: 44px; font-weight: 800; color: var(--lime); line-height: 1; margin-bottom: 6px; }
.stat-l { font-size: 13px; color: rgba(255,255,255,0.4); }

/* ===== HOW IT WORKS ===== */
.how { padding: 100px 24px; background: var(--cream); }
.how-inner { max-width: 1140px; margin: 0 auto; }
.section-tag { display: inline-block; background: #e8f3e8; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; padding: 6px 14px; border-radius: 100px; margin-bottom: 20px; }
.section-title { font-family: var(--font-display); font-size: clamp(36px,4vw,54px); font-weight: 800; letter-spacing: -1px; line-height: 1.05; margin-bottom: 60px; color: var(--dark); }
.how-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.how-step { background: #fff; border-radius: 20px; padding: 32px 28px; border: 1px solid rgba(26,46,26,0.1); transition: transform 0.25s, box-shadow 0.25s; }
.how-step:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(26,46,26,0.08); }
.step-n { font-family: var(--font-display); font-size: 56px; font-weight: 800; color: #e8f3e8; line-height: 1; margin-bottom: 16px; }
.step-icon { font-size: 28px; margin-bottom: 14px; display: block; }
.step-h { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-p { font-size: 14px; color: rgba(26,46,26,0.55); line-height: 1.6; }

/* ===== PROVIDERS ===== */
.providers { padding: 100px 24px; background: #e8e4de; }
.prov-inner { max-width: 1140px; margin: 0 auto; }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 1px; background: rgba(26,46,26,0.1); border: 1px solid rgba(26,46,26,0.1); border-radius: 20px; overflow: hidden; margin-top: 48px; }
.prov-tile { background: #fff; padding: 32px 28px; display: flex; flex-direction: column; gap: 10px; transition: background 0.2s; }
.prov-tile:hover { background: #f0f8eb; }
.ptile-icon { font-size: 32px; }
.ptile-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.ptile-region { font-size: 12px; color: rgba(26,46,26,0.55); }
.ptile-tag { display: inline-block; background: #e8f3e8; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; width: fit-content; }

/* ===== FOOTER ===== */
footer { background: #0a180a; padding: 48px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-logo { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: #fff; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.25); }

/* ===== MOBIL ===== */
@media(max-width:900px) { .stats-inner, .how-steps { grid-template-columns: repeat(2,1fr); } }
@media(max-width:768px) {
  .search-page { padding: 32px 16px 80px; }
  .hero-search-wrap { width: 100%; }
  .konteiner-bar { flex-direction: column; padding: 16px; gap: 4px; }
  .kb-segment { padding: 10px 8px; width: 100%; }
  .kb-divider { width: 100%; height: 1px; margin: 2px 0; }
  .kb-search-btn { width: 100%; justify-content: center; margin-left: 0; margin-top: 8px; border-radius: 14px; }
  .autocomplete-list { left: 0; width: 100%; }
  .sp-booking { grid-template-columns: 1fr; }
  .sp-trust { gap: 12px; font-size: 12px; }
  input, select, textarea { font-size: 16px !important; }
}
@media(max-width:600px) {
  .stats-inner { grid-template-columns: repeat(2,1fr); }
  .stat { padding: 16px 12px; }
  .stat-n { font-size: 34px; }
  .how { padding: 64px 16px; }
  .how-steps { grid-template-columns: 1fr; gap: 12px; }
  .providers { padding: 64px 16px; }
  .prov-grid { grid-template-columns: 1fr 1fr; }
  footer { flex-direction: column; text-align: center; }
}

.konteiner-bar { border-radius: 28px; transition: border-radius 0.2s; }
.konteiner-bar.has-results { border-radius: 28px 28px 0 0; }
#searchPanel { border-radius: 0 0 28px 28px; overflow: hidden; }
@media(max-width:768px) {
  .konteiner-bar { border-radius: 20px; }
  .konteiner-bar.has-results { border-radius: 20px 20px 0 0; }
  #searchPanel { border-radius: 0 0 20px 20px; }
}

/* ===== CTA LEVERANDØRER ===== */
.cta-prov { background: #1a2e1a; padding: 100px 24px; }
.cta-prov-inner { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.cta-prov-h { font-family: var(--font-display); font-size: clamp(32px,3.5vw,48px); font-weight: 800; color: #fff; letter-spacing: -1px; line-height: 1.1; margin: 16px 0 20px; }
.cta-prov-p { font-size: 16px; color: rgba(255,255,255,0.55); line-height: 1.7; margin-bottom: 28px; }
.cta-prov-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cta-prov-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255,255,255,0.8); }
.cta-prov-list i { color: var(--lime); font-size: 16px; flex-shrink: 0; }
.cta-prov-card { background: #fff; border-radius: 24px; padding: 36px; }
.cta-prov-card-h { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.cta-prov-card-p { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 24px; }
.cta-prov-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--green); color: #fff; border-radius: 14px; padding: 16px 24px; font-size: 16px; font-weight: 700; font-family: var(--font-display); transition: background 0.2s; text-decoration: none; }
.cta-prov-btn:hover { background: #235f2d; }
.cta-prov-card-note { text-align: center; font-size: 12px; color: #aaa; margin-top: 12px; }

.cta-prov .section-tag { background: rgba(124,191,94,0.15); color: var(--lime); }

@media(max-width:768px) {
  .cta-prov { padding: 64px 24px; }
  .cta-prov-inner { grid-template-columns: 1fr; gap: 40px; }
}
.sp-bf-label { font-size: 12px; font-weight: 600; color: #888; margin-bottom: -4px; }

/* ===== HERO BAKGRUNNSMØNSTER ===== */
.search-page {
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23a8a49c' fill-opacity='0.08'%3E%3Crect x='0' y='0' width='5' height='40' rx='2.5'/%3E%3Crect x='10' y='0' width='5' height='40' rx='2.5'/%3E%3Crect x='20' y='0' width='5' height='40' rx='2.5'/%3E%3Crect x='30' y='0' width='5' height='40' rx='2.5'/%3E%3Crect x='40' y='0' width='5' height='40' rx='2.5'/%3E%3Crect x='0' y='45' width='45' height='5' rx='2.5'/%3E%3Crect x='0' y='55' width='45' height='5' rx='2.5'/%3E%3C/g%3E%3C/svg%3E");
}
