/* ==========================================================================
   Hundeportalen.com - hovedstilark
   Palett: skogsgronn (tillit/natur) + varm amber (energi/hund) paa lys bakgrunn
   ========================================================================== */

:root {
  --brand:        #2F5D50;   /* skogsgronn */
  --brand-d:      #244a40;
  --brand-l:      #3c7565;
  --accent:       #E8884C;   /* varm amber */
  --accent-h:     #d4732f;
  --accent-soft:  #FCEFE3;
  --blue:         #3E7CB1;
  --bg:           #F5F3EE;   /* varm offwhite */
  --bg-2:         #EFEBE2;
  --white:        #FFFFFF;
  --text:         #232b29;
  --text-light:   #6b746f;
  --border:       #E3DFD5;
  --good:         #4F9D69;
  --warn:         #E0A33B;
  --star:         #E8884C;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --shadow: 0 2px 8px rgba(35,43,41,0.06), 0 8px 24px rgba(35,43,41,0.05);
  --shadow-lg: 0 10px 40px rgba(35,43,41,0.12);
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--text); background: var(--white); line-height: 1.65; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

h1,h2,h3,h4 { font-weight: 700; line-height: 1.2; color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin-bottom: 1rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.2rem; }
.narrow { max-width: 760px; }

.section { padding: 3.2rem 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 2.2rem; }
.section-head .eyebrow { color: var(--accent); font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.section-head h2 { margin: .4rem 0 .6rem; }
.section-head p { color: var(--text-light); font-size: 1.05rem; }

/* ---------- Topp-nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: .55rem 1.2rem; display: flex; align-items: center; gap: 1.2rem; }
.nav-logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.18rem; color: var(--brand); letter-spacing: -.02em; }
.nav-logo:hover { color: var(--brand); }
.nav-logo-icon { width: 34px; height: 34px; background: var(--brand); color: #fff; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; }
.nav-logo-text span { color: var(--accent); }
.nav-menu { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.nav-link { padding: .5rem .8rem; border-radius: var(--r-sm); font-size: .93rem; font-weight: 600; color: var(--text); cursor: pointer; }
.nav-link:hover { background: var(--bg); color: var(--brand); }
.nav-cta { background: var(--accent); color: #fff !important; padding: .55rem 1rem; border-radius: var(--r-sm); font-weight: 700; }
.nav-cta:hover { background: var(--accent-h); }

.nav-dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%) translateY(8px); background: var(--white); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1.4rem; min-width: 540px; opacity: 0; visibility: hidden; transition: .18s; }
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-col h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-light); margin-bottom: .55rem; }
.dropdown-col a { display: block; padding: .26rem 0; font-size: .9rem; color: var(--text); font-weight: 500; }
.dropdown-col a:hover { color: var(--accent); }
.dropdown-col a.more { color: var(--accent); font-weight: 700; }

.btn-search-icon { background: none; border: none; padding: .45rem; cursor: pointer; color: var(--text-light); font-size: 1.15rem; border-radius: var(--r-sm); }
.btn-search-icon:hover { background: var(--bg); color: var(--brand); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); padding: .2rem .4rem; }

/* ---------- Knapper ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.5rem; border-radius: var(--r-sm); font-weight: 700; font-size: .98rem; cursor: pointer; border: 2px solid transparent; transition: .15s; }
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(232,136,76,.4); }
.btn-brand { background: var(--brand); color: #fff !important; }
.btn-brand:hover { background: var(--brand-d); transform: translateY(-1px); }
.btn-ghost { background: var(--white); color: var(--brand) !important; border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); background: var(--bg); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(135deg, var(--brand-d), var(--brand-l)); color: #fff; overflow: hidden; }
.hero::after { content:""; position:absolute; inset:0; background-image: var(--hero-img); background-size: cover; background-position: center; opacity:.22; mix-blend-mode: luminosity; }
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 4.5rem 1.2rem 4rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.hero-inner.hero-solo { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.hero-inner.hero-solo > div { max-width: 680px; }
.hero-inner.hero-solo .hero-actions { justify-content: center; }
.hero-inner.hero-solo p.lead { margin-left: auto; margin-right: auto; }
.welcome-article { text-align: left; }
.welcome-article h3 { margin: 1.8rem 0 .6rem; }
.welcome-article p { margin: 0 0 1rem; line-height: 1.7; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p.lead { font-size: 1.18rem; color: rgba(255,255,255,.92); margin-bottom: 1.6rem; max-width: 30rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-card { background: rgba(255,255,255,.97); color: var(--text); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--shadow-lg); }
.hero-card h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.hero-card p { font-size: .92rem; color: var(--text-light); margin-bottom: 1rem; }
.hero-mini { display: flex; gap: .6rem; flex-wrap: wrap; }
.hero-mini a { font-size: .82rem; background: var(--bg); padding: .35rem .7rem; border-radius: 999px; font-weight: 600; color: var(--brand); }
.hero-mini a:hover { background: var(--accent-soft); color: var(--accent-h); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--bg); border-bottom: 1px solid var(--border); font-size: .85rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem 0; align-items: center; }
.breadcrumb li { color: var(--text-light); }
.breadcrumb li a { color: var(--text-light); }
.breadcrumb li a:hover { color: var(--accent); }
.breadcrumb li::after { content: "/"; margin-left: .4rem; color: var(--border); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb li:last-child { color: var(--text); font-weight: 600; }

/* ---------- Seksjons-kort (hovedmeny paa forsiden) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 1.2rem; }
.scard { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 1.5rem; box-shadow: var(--shadow); transition: .18s; display: block; }
.scard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.scard .ico { font-size: 1.7rem; margin-bottom: .6rem; }
.scard h3 { margin-bottom: .35rem; color: var(--text); }
.scard p { font-size: .9rem; color: var(--text-light); margin: 0; }

/* ---------- Rasekort (grid) ---------- */
.breed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 1.3rem; }
.breed-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column; }
.breed-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.breed-card .ph { aspect-ratio: 4/3; background: var(--bg-2); background-size: cover; background-position: center; }
.breed-card .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.breed-card h3 { font-size: 1.08rem; margin-bottom: .15rem; }
.breed-card .grp { font-size: .76rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.breed-card .desc { font-size: .87rem; color: var(--text-light); flex: 1; }
.breed-card .tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem; }
.tag { font-size: .72rem; background: var(--bg); color: var(--text-light); padding: .2rem .55rem; border-radius: 999px; font-weight: 600; }

/* ---------- Egenskapsbarer ---------- */
.traits { display: grid; gap: .7rem; }
.trait { display: grid; grid-template-columns: 130px 1fr 28px; align-items: center; gap: .7rem; font-size: .88rem; }
.trait .lbl { color: var(--text); font-weight: 600; }
.trait .bar { height: 9px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.trait .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-l), var(--accent)); border-radius: 999px; }
.trait .val { font-size: .8rem; color: var(--text-light); text-align: right; font-weight: 700; }

/* ---------- Hundevelger ---------- */
.velger { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.velger-head { background: var(--brand); color: #fff; padding: 1.4rem 1.6rem; }
.velger-head h2 { color: #fff; margin: 0; }
.velger-head p { color: rgba(255,255,255,.85); font-size: .92rem; margin: .3rem 0 0; }
.velger-body { padding: 1.6rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; }
.q { }
.q .qhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.q .qhead label { font-weight: 700; font-size: .95rem; }
.q .qhead .hint { font-size: .78rem; color: var(--text-light); }
.q .opts { display: flex; gap: .4rem; flex-wrap: wrap; }
.q .opts button { flex: 1; min-width: 0; padding: .5rem .35rem; border: 1.5px solid var(--border); background: var(--white); border-radius: var(--r-sm); font-size: .75rem; font-weight: 600; color: var(--text-light); cursor: pointer; transition: .12s; white-space: nowrap; }
.q .opts button:hover { border-color: var(--brand-l); }
.q .opts button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.q .weight { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; font-size: .76rem; color: var(--text-light); }
.q .weight input { flex: 1; accent-color: var(--accent); }
.velger-foot { padding: 1.2rem 1.6rem; border-top: 1px solid var(--border); display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; background: var(--bg); }
.velger-foot .spacer { flex: 1; }

.results { margin-top: 1.6rem; display: grid; gap: 1rem; }
.result-card { display: grid; grid-template-columns: 90px 1fr auto; gap: 1rem; align-items: center; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: .9rem 1.1rem; box-shadow: var(--shadow); }
.result-card .ph { width: 90px; height: 70px; border-radius: var(--r-sm); background: var(--bg-2); background-size: cover; background-position: center; }
.result-card h3 { font-size: 1.05rem; margin-bottom: .15rem; }
.result-card .meta { font-size: .82rem; color: var(--text-light); }
.match { text-align: center; min-width: 78px; }
.match .pct { font-size: 1.5rem; font-weight: 800; color: var(--brand); line-height: 1; }
.match .ring { font-size: .7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .06em; }
.match-bar { height: 6px; background: var(--bg-2); border-radius: 999px; margin-top: .3rem; overflow: hidden; }
.match-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--good)); }

/* ---------- Artikkelinnhold ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 2.4rem 1.2rem 3.5rem; }
.article p, .article ul, .article ol { font-size: 1.04rem; color: #34403c; }
.article ul, .article ol { margin: 0 0 1.2rem 1.3rem; }
.article li { margin-bottom: .4rem; }
.article h2 { margin: 2rem 0 .8rem; }
.article h3 { margin: 1.5rem 0 .5rem; }
.article figure { margin: 1.5rem 0; }
.article figure img { border-radius: var(--r); width: 100%; }
.article figcaption { font-size: .8rem; color: var(--text-light); margin-top: .5rem; text-align: center; }
.lead-img { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: var(--r-lg); margin-bottom: 1.6rem; }

/* Bildekreditt under rasebildet */
.img-credit { font-size: .76rem; color: var(--text-light); margin: -1rem 0 1.4rem; }
.img-credit a { color: var(--text-light); text-decoration: underline; }
.img-credit a:hover { color: var(--accent); }

/* Redaksjonelt bilde i hundehold-artikler */
.article-figure { margin: .5rem 0 1.6rem; }
.article-figure img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--r-lg); display: block; }
.article-figure figcaption { font-size: .85rem; color: var(--text-light); margin-top: .5rem; text-align: center; }
.article-figure .img-credit { display: block; font-size: .72rem; margin: .25rem 0 0; }

/* Lang raseartikkel nederst i raseportrettet */
.breed-artikkel { margin-top: 2.6rem; padding-top: 1.8rem; border-top: 1px solid var(--border); }
.breed-artikkel h2:first-child { margin-top: 0; }

.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: var(--r-sm); padding: 1.1rem 1.3rem; margin: 1.5rem 0; }
.callout.green { background: #eaf3ee; border-color: var(--good); }
.callout.blue { background: #eaf1f7; border-color: var(--blue); }
.callout.warn { background: #fbf3e2; border-color: var(--warn); }
.callout p:last-child { margin: 0; }
.callout strong { color: var(--text); }
.forbud-liste { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .5rem; }
.forbud-liste li { background: var(--bg); border: 1px solid var(--border); border-left: 4px solid var(--warn); border-radius: var(--r-sm); padding: .7rem 1rem; }
.om-liste { list-style: none; padding: 0; margin: 1.1rem 0 1.8rem; display: grid; gap: .7rem; }
.om-liste li { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: .8rem 1.1rem; }
.om-liste a { color: var(--text); }
.om-liste a:hover { color: var(--accent); }

.factbox { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 1.3rem 1.5rem; margin: 1.5rem 0; }
.factbox h3 { margin-bottom: .8rem; font-size: 1.05rem; }
.factbox dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .92rem; }
.factbox dt { color: var(--text-light); font-weight: 600; }
.factbox dd { font-weight: 600; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.pros-cons > div { border-radius: var(--r); padding: 1.1rem 1.3rem; }
.pros { background: #eaf3ee; }
.cons { background: #fbeeea; }
.pros h4, .cons h4 { margin-bottom: .6rem; }
.pros-cons ul { list-style: none; margin: 0; }
.pros-cons li { font-size: .9rem; padding-left: 1.4rem; position: relative; margin-bottom: .45rem; }
.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.cons li::before { content: "✕"; position: absolute; left: 0; color: #c4553b; font-weight: 800; }

/* ---------- Sammenligningstabell ---------- */
.compare-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--white); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.compare-table th, .compare-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.compare-table thead th { background: var(--brand); color: #fff; }
.compare-table tbody tr:nth-child(even) { background: var(--bg); }
.compare-table td.lbl { font-weight: 700; color: var(--text-light); }

/* ---------- Intern lenking ---------- */
.related { background: var(--bg); border-top: 1px solid var(--border); }
.related h2 { text-align: center; margin-bottom: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: .45rem 1rem; font-size: .88rem; font-weight: 600; color: var(--brand); }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Rutenett med like store felt - brukt for sammenligningslisten */
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .7rem; }
.cmp-card { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 66px; padding: .7rem 1rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: .9rem; font-weight: 600; color: var(--brand); line-height: 1.3; transition: .15s; }
.cmp-card:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-d); color: rgba(255,255,255,.8); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem; }
.footer-brand .nav-logo { color: #fff; margin-bottom: .8rem; }
.footer-brand .nav-logo-icon { background: var(--accent); }
.footer-brand p { font-size: .88rem; color: rgba(255,255,255,.7); max-width: 22rem; }
.footer-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .8rem; }
.footer-col a { display: block; color: rgba(255,255,255,.75); font-size: .9rem; padding: .22rem 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2.2rem; padding-top: 1.3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .82rem; color: rgba(255,255,255,.6); }

/* ---------- Søk-modal ---------- */
.search-modal { position: fixed; inset: 0; background: rgba(35,43,41,.55); backdrop-filter: blur(3px); z-index: 200; display: none; padding: 8vh 1rem 0; }
.search-modal.open { display: block; }
.search-box { max-width: 600px; margin: 0 auto; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.search-box-head { display: flex; align-items: center; padding: .5rem .5rem .5rem 1.2rem; border-bottom: 1px solid var(--border); }
.search-box input { flex: 1; border: none; outline: none; font-size: 1.05rem; padding: .8rem .5rem; }
.search-box .close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-light); padding: .5rem .8rem; }
.search-res { max-height: 50vh; overflow-y: auto; padding: .6rem; }
.search-res a { display: block; padding: .6rem .8rem; border-radius: var(--r-sm); }
.search-res a:hover, .search-res a.sel { background: var(--bg); }
.search-res .t { font-weight: 600; color: var(--text); }
.search-res .s { font-size: .8rem; color: var(--text-light); }
.search-res .empty { padding: 1rem; color: var(--text-light); font-size: .9rem; }

/* ---------- Hjelpere ---------- */
.center { text-align: center; }
.mt2 { margin-top: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.muted { color: var(--text-light); }
.pill { display:inline-block; background: var(--accent-soft); color: var(--accent-h); font-weight: 700; font-size: .78rem; padding: .25rem .7rem; border-radius: 999px; }

/* ---------- Responsivt / mobil ---------- */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .velger-body { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-menu { position: fixed; inset: 56px 0 auto 0; background: var(--white); flex-direction: column; align-items: stretch; padding: 1rem; gap: .2rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); display: none; max-height: calc(100vh - 56px); overflow-y: auto; }
  .nav-menu.open { display: flex; }
  .nav-link { padding: .8rem; border-radius: var(--r-sm); }
  .dropdown-menu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding: .3rem 0 .6rem 1rem; min-width: 0; display: block; }
  .nav-dropdown:hover .dropdown-menu { transform: none; }
  .dropdown-col { margin-bottom: .6rem; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-cta { text-align: center; }
  .grid-2, .pros-cons { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .result-card { grid-template-columns: 70px 1fr; }
  .result-card .match { grid-column: 2; text-align: left; display: flex; align-items: center; gap: .6rem; }
  .compare-table { font-size: .82rem; }
  .compare-table th, .compare-table td { padding: .55rem .6rem; }
  .trait { grid-template-columns: 110px 1fr 26px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 2.4rem 0; }
}
