/* ============================================================
   LEIELINK CALVIA OVERRIDES
   ------------------------------------------------------------
   Aktiveres ved å legge klassen "calvia" på root-elementet:
     <div class="app dark calvia">           ← innlogget
     <div class="app dark calvia pub-calvia"> ← pub-sider (med hero)

   Ingen eksisterende regler endres. Disse legges ETTER alle
   andre regler i leielink.css (eller importeres etter).

   Rollback:
     Fjern "calvia" og/eller "pub-calvia" fra app-klassen,
     eller slett denne blokken. Ingen funksjonalitet påvirkes.
   ============================================================ */

/* ---------- ROOT VARIABLER (kun under .calvia) ---------- */
.app.calvia{
  --c-bg-deep:       #0a1929;
  --c-bg-deeper:     #06111c;
  --c-bg-mid:        #11243a;
  --c-ink:           #f4ede0;
  --c-ink-dim:       rgba(244,237,224,.72);
  --c-ink-faint:     rgba(244,237,224,.45);
  --c-gold:          #d5c28f;
  --c-gold-soft:     #b8a574;
  --c-gold-glow:     rgba(213,194,143,.18);
  --c-line:          rgba(213,194,143,.18);
  --c-line-strong:   rgba(213,194,143,.32);
}

/* ---------- TYPOGRAFI ---------- */
.app.calvia,
.app.calvia body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
  color:var(--c-ink);
}
.app.calvia h1,
.app.calvia h2,
.app.calvia h3,
.app.calvia .display{
  font-family:'Cormorant Garamond',Georgia,serif;
  font-weight:300;
  letter-spacing:-.005em;
}
.app.calvia em,
.app.calvia .accent{
  font-style:italic;
  color:var(--c-gold);
  font-weight:400;
}

/* ---------- HELE APPEN: NAVY BAKGRUNN ---------- */
.app.calvia{
  background:var(--c-bg-deep) !important;
}
.app.calvia.light{
  background:#f4ede0 !important;
  --c-ink:#1a1408;
  --c-ink-dim:rgba(26,20,8,.72);
  --c-ink-faint:rgba(26,20,8,.45);
}

/* ---------- SIDEBAR (alle 4 varianter: utleier/leietaker/admin/pub) ---------- */
.app.calvia .sidebar{
  background:rgba(10,25,41,.85) !important;
  -webkit-backdrop-filter:blur(8px) saturate(1.05);
  backdrop-filter:blur(8px) saturate(1.05);
  border-right:1px solid var(--c-line) !important;
}
.app.calvia.light .sidebar{
  background:rgba(244,237,224,.92) !important;
  border-right:1px solid rgba(26,20,8,.12) !important;
}

/* Sidebar logo-area */
.app.calvia .sidebar .logo-area{
  border-bottom:1px solid var(--c-line);
  padding-top:18px;padding-bottom:18px;
}
.app.calvia .sidebar .logo-img{
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.4));
}

/* Sidebar nav-grupper */
.app.calvia .sidebar .nav-group-label,
.app.calvia .sidebar .sb-section{
  color:var(--c-ink-faint) !important;
  font-size:10px !important;
  letter-spacing:.28em !important;
  text-transform:uppercase;
}
.app.calvia.light .sidebar .nav-group-label,
.app.calvia.light .sidebar .sb-section{
  color:rgba(26,20,8,.55) !important;
}

/* Sidebar nav-items */
.app.calvia .sidebar a,
.app.calvia .sidebar .nav-item{
  color:var(--c-ink-dim) !important;
  transition:all .25s;
}
.app.calvia .sidebar a:hover,
.app.calvia .sidebar .nav-item:hover{
  color:var(--c-ink) !important;
  background:rgba(213,194,143,.05) !important;
}
.app.calvia .sidebar a.active,
.app.calvia .sidebar .nav-item.active,
.app.calvia .sidebar a[aria-current="page"]{
  color:var(--c-gold) !important;
  background:rgba(213,194,143,.08) !important;
  border-left:2px solid var(--c-gold) !important;
}
.app.calvia.light .sidebar a,
.app.calvia.light .sidebar .nav-item{
  color:rgba(26,20,8,.78) !important;
}
.app.calvia.light .sidebar a.active,
.app.calvia.light .sidebar .nav-item.active{
  color:#8a6e2b !important;
  background:rgba(213,194,143,.18) !important;
  border-left:2px solid #8a6e2b !important;
}

/* ---------- TOPBAR ---------- */
.app.calvia .topbar{
  background:rgba(6,17,28,.72) !important;
  -webkit-backdrop-filter:blur(12px) saturate(1.1);
  backdrop-filter:blur(12px) saturate(1.1);
  border-bottom:1px solid var(--c-line) !important;
}
.app.calvia.light .topbar{
  background:rgba(248,244,236,.92) !important;
  border-bottom:1px solid rgba(26,20,8,.08) !important;
}
.app.calvia .topbar .topbar-title,
.app.calvia .topbar h1{
  font-family:'Cormorant Garamond',serif !important;
  font-weight:400 !important;
  letter-spacing:.005em;
}

/* Topbar bruker-avatar */
.app.calvia .tb-avatar,
.app.calvia .avatar{
  background:linear-gradient(145deg,var(--c-gold),var(--c-gold-soft)) !important;
  color:#1a1408 !important;
  box-shadow:0 2px 8px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.25);
}

/* ---------- KNAPPER ---------- */
.app.calvia .tb-btn,
.app.calvia .btn{
  letter-spacing:.18em;
  text-transform:uppercase;
  font-size:12px;
  transition:all .3s cubic-bezier(.2,.7,.2,1);
}
.app.calvia .tb-btn.gold,
.app.calvia .btn.gold,
.app.calvia .btn-primary{
  background:var(--c-gold) !important;
  color:#1a1408 !important;
  border:none !important;
}
.app.calvia .tb-btn.gold:hover,
.app.calvia .btn.gold:hover,
.app.calvia .btn-primary:hover{
  background:var(--c-ink) !important;
  transform:translateY(-1px);
  box-shadow:0 8px 24px rgba(213,194,143,.2);
}
.app.calvia .tb-btn.slate,
.app.calvia .btn.slate,
.app.calvia .btn-secondary{
  background:transparent !important;
  color:var(--c-ink) !important;
  border:1px solid var(--c-line-strong) !important;
}
.app.calvia .tb-btn.slate:hover,
.app.calvia .btn.slate:hover{
  border-color:var(--c-gold) !important;
  color:var(--c-gold) !important;
}

/* ---------- KORT, BADGES, FILTER-CHIPS ---------- */
.app.calvia .ll-card,
.app.calvia .card{
  background:rgba(255,255,255,.025) !important;
  border:1px solid var(--c-line) !important;
}
.app.calvia.light .ll-card,
.app.calvia.light .card{
  background:rgba(255,255,255,.65) !important;
  border:1px solid rgba(26,20,8,.08) !important;
}
.app.calvia .ll-badge,
.app.calvia .badge,
.app.calvia .pill{
  background:var(--c-gold-glow) !important;
  color:var(--c-gold) !important;
  border:1px solid var(--c-line-strong) !important;
  letter-spacing:.15em;
  text-transform:uppercase;
  font-size:10px;
}
.app.calvia .filter-chip{
  background:transparent !important;
  border:1px solid var(--c-line) !important;
  color:var(--c-ink-dim) !important;
}
.app.calvia .filter-chip:hover,
.app.calvia .filter-chip.active{
  border-color:var(--c-gold) !important;
  color:var(--c-gold) !important;
}

/* ---------- TABELLER (ll-table) ---------- */
.app.calvia .ll-table thead{
  border-bottom:1px solid var(--c-line-strong) !important;
}
.app.calvia .ll-table th{
  color:var(--c-ink-faint) !important;
  font-size:10px !important;
  letter-spacing:.2em !important;
  text-transform:uppercase;
}
.app.calvia .ll-table tbody tr{
  border-bottom:1px solid var(--c-line) !important;
}
.app.calvia .ll-table tbody tr:hover{
  background:rgba(213,194,143,.04) !important;
}

/* ---------- LINKER (gull aksent på hover) ---------- */
.app.calvia a:not(.sidebar a):not(.btn):not(.tb-btn):not(.nav-item){
  color:var(--c-gold);
  transition:opacity .2s;
}
.app.calvia a:not(.sidebar a):not(.btn):hover{
  opacity:.8;
}

/* ---------- THEME-SWITCH (i sidebar bunn) ---------- */
.app.calvia .theme-toggle,
.app.calvia .theme-switch{
  background:rgba(213,194,143,.12) !important;
}
.app.calvia .theme-toggle::after,
.app.calvia .theme-switch::after{
  background:var(--c-gold) !important;
}

/* ---------- Aa-FLOATING (tilgjengelighet) ---------- */
.app.calvia .a11y-toggle,
.app.calvia .aa-btn{
  background:linear-gradient(145deg,var(--c-gold),var(--c-gold-soft)) !important;
  color:#1a1408 !important;
  box-shadow:0 2px 12px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.3);
}

/* ---------- COOKIE-BANNER ---------- */
.app.calvia .cookie-banner,
.app.calvia .cookie-consent{
  background:rgba(6,17,28,.95) !important;
  border-top:1px solid var(--c-line) !important;
  color:var(--c-ink-dim);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}
.app.calvia .cookie-banner button,
.app.calvia .cookie-consent button{
  background:var(--c-gold) !important;
  color:#1a1408 !important;
  border:none !important;
  font-weight:500;
}

/* ---------- PAGE-FOOTER ---------- */
.app.calvia .page-footer{
  background:var(--c-bg-deeper) !important;
  border-top:1px solid var(--c-line) !important;
  color:var(--c-ink-faint);
  letter-spacing:.08em;
}

/* ============================================================
   PUB-SIDER (.app.calvia.pub-calvia) — hero-bilde + topbar med
   Logg inn / Registrer-knapper istedenfor sidetittel
   ============================================================ */

/* Hero-seksjon: roterende Norge-bilder med to lag for kryss-fade */
.app.calvia.pub-calvia .pub-hero,
.app.calvia.pub-calvia .lp-hero{
  position:relative;
  min-height:calc(100vh - 54px);
  background:#0a1929;
  display:flex;
  align-items:center;
  padding:0 80px;
  overflow:hidden;
}
/* Bilde-lag (to lag for kryss-fade hvert 25. sekund) */
.app.calvia.pub-calvia .pub-hero-image{
  position:absolute;
  inset:0;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  opacity:0;
  transition:opacity 2s ease-in-out;
  z-index:0;
}
.app.calvia.pub-calvia .pub-hero-image.is-active{
  opacity:1;
}
/* Overlay-gradient over bildene for tekstlesbarhet */
.app.calvia.pub-calvia .pub-hero-overlay{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:
    linear-gradient(95deg,
      rgba(6,17,28,.82) 0%,
      rgba(10,25,41,.62) 35%,
      rgba(10,25,41,.15) 65%,
      rgba(10,25,41,.05) 100%),
    linear-gradient(180deg,
      rgba(6,17,28,0) 60%,
      rgba(6,17,28,.55) 100%);
}
.app.calvia.pub-calvia .pub-hero-inner{
  position:relative;
  max-width:780px;
  z-index:5;
}
.app.calvia.pub-calvia .pub-eyebrow{
  font-size:11px;
  letter-spacing:.35em;
  text-transform:uppercase;
  color:var(--c-gold);
  margin-bottom:32px;
  display:inline-block;
}
.app.calvia.pub-calvia .pub-eyebrow::before{
  content:"";
  display:inline-block;
  width:36px;height:1px;
  background:var(--c-gold);
  vertical-align:middle;
  margin-right:18px;
  margin-bottom:3px;
}
.app.calvia.pub-calvia .pub-hero h1,
.app.calvia.pub-calvia .lp-h1{
  font-family:'Cormorant Garamond',serif !important;
  font-weight:300 !important;
  font-size:clamp(48px,6.5vw,88px) !important;
  line-height:1.02 !important;
  letter-spacing:-.01em !important;
  margin-bottom:36px;
}
.app.calvia.pub-calvia .pub-hero h1 em{
  display:block;
  font-style:italic;
  color:var(--c-gold);
  font-weight:400;
}
.app.calvia.pub-calvia .pub-hero p,
.app.calvia.pub-calvia .lp-lead{
  font-size:17px !important;
  line-height:1.65 !important;
  color:var(--c-ink-dim) !important;
  max-width:540px;
  margin-bottom:48px;
  font-weight:300;
}

/* Pub-topbar: ingen sidetittel, kun Logg inn + Registrer */
.app.calvia.pub-calvia .topbar{
  justify-content:flex-end;
  gap:14px;
  background:rgba(6,17,28,.4) !important;
}
.app.calvia.pub-calvia .topbar .topbar-title,
.app.calvia.pub-calvia .topbar h1,
.app.calvia.pub-calvia .topbar .tb-user{
  display:none;
}
.app.calvia.pub-calvia .topbar .pub-actions{
  display:flex;
  gap:12px;
  align-items:center;
}

/* Feature-grid: redaksjonell 3×2 med nummerering */
.app.calvia.pub-calvia .pub-features{
  background:var(--c-bg-deep);
  padding:120px 80px;
}
.app.calvia.pub-calvia .pub-features-header{
  display:flex;
  justify-content:space-between;
  align-items:end;
  margin-bottom:72px;
  padding-bottom:28px;
  border-bottom:1px solid var(--c-line);
}
.app.calvia.pub-calvia .pub-features-title{
  font-family:'Cormorant Garamond',serif;
  font-weight:300;
  font-size:clamp(30px,3.2vw,44px);
  line-height:1.1;
  max-width:560px;
}
.app.calvia.pub-calvia .pub-features-title em{
  font-style:italic;
  color:var(--c-gold);
}
.app.calvia.pub-calvia .pub-feature-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1px;
  background:var(--c-line);
}
.app.calvia.pub-calvia .pub-feature{
  background:var(--c-bg-deep);
  padding:44px 32px;
  transition:background .4s;
}
.app.calvia.pub-calvia .pub-feature:hover{
  background:var(--c-bg-mid);
}
.app.calvia.pub-calvia .pub-feature-num{
  font-family:'Cormorant Garamond',serif;
  font-style:italic;
  font-size:14px;
  color:var(--c-gold);
  margin-bottom:22px;
  letter-spacing:.05em;
}
.app.calvia.pub-calvia .pub-feature-name{
  font-family:'Cormorant Garamond',serif;
  font-weight:400;
  font-size:24px;
  margin-bottom:14px;
  line-height:1.2;
}
.app.calvia.pub-calvia .pub-feature-desc{
  font-size:14px;
  line-height:1.6;
  color:var(--c-ink-dim);
  font-weight:300;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:900px){
  .app.calvia.pub-calvia .pub-hero{
    padding:0 24px;
    min-height:calc(100vh - 54px);
  }
  .app.calvia.pub-calvia .pub-features{
    padding:64px 24px;
  }
  .app.calvia.pub-calvia .pub-feature-grid{
    grid-template-columns:1fr;
  }
  .app.calvia.pub-calvia .pub-features-header{
    flex-direction:column;
    align-items:start;
    gap:16px;
  }
}
