/* Modul D: magasin, byguider, undersøkelser, forum og infosider. Bygger på mg.css. */

/* ---------- magasin ---------- */
.ct-magnav { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 .5rem; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.ct-magnav a { flex: 0 0 auto; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--mg-line); color: var(--mg-ink); text-decoration: none; font-weight: 600; font-size: .9rem; background: #fff; white-space: nowrap; }
.ct-magnav a:hover { border-color: var(--mg-jade); color: var(--mg-jade); }
.ct-magnav a.on { background: var(--mg-jade); border-color: var(--mg-jade); color: #fff; }

.ct-season { display: block; text-decoration: none; color: #fff; border-radius: 1.2rem; padding: 2rem 1.6rem; background: var(--mg-teak) radial-gradient(900px 300px at 85% -20%, rgba(217, 174, 124, .35), transparent); box-shadow: var(--mg-shadow); }
.ct-season:hover { color: #fff; }
.ct-season h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); max-width: 30ch; }
.ct-season p { max-width: 60ch; color: rgba(255, 255, 255, .88); }
.ct-rec-card .mg-eyebrow .bi { color: var(--mg-bronze); }

.ct-card { overflow: hidden; }
.ct-thumb { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; height: auto; background: var(--mg-sand); }
.ct-card h2 a, .ct-card h3 a { font-family: var(--mg-sans); font-weight: 700; }

.ct-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: .6rem; }
.ct-year a { display: block; padding: .8rem 1rem; border: 1px solid var(--mg-line); border-radius: .9rem; text-decoration: none; color: var(--mg-ink); background: #fff; }
.ct-year a:hover { border-color: var(--mg-jade); }
.ct-year a.on { border: 2px solid var(--mg-jade); background: var(--mg-jade-l); }
.ct-year small { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: var(--mg-bronze-d); }
.ct-year b { display: block; margin-top: .2rem; font-size: .95rem; line-height: 1.3; }

/* artikkel */
.ct-article { font-size: 1.06rem; }
.ct-cover { margin: 0 0 1.5rem; }
.ct-cover img { width: 100%; height: auto; border-radius: 1rem; display: block; background: var(--mg-sand); }
.ct-body { line-height: 1.75; overflow-wrap: anywhere; }
.ct-body h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 2rem 0 .7rem; }
.ct-body h3 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; }
.ct-body ul { padding-left: 1.3rem; }
.ct-body li { margin-bottom: .4rem; }
.ct-body li::marker { color: var(--mg-bronze); }
.ct-body b { font-weight: 700; }
.ct-fact { background: var(--mg-jade-l); border-left: 4px solid var(--mg-jade); padding: 1rem 1.2rem; border-radius: .7rem; font-weight: 600; }
.ct-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: var(--mg-bronze-l); border: 1px solid #e8d4bd; border-radius: 1rem; padding: 1.1rem 1.3rem; margin-top: 1rem; }
.ct-cta > div { flex: 1 1 16rem; }
.ct-cta b { font-size: 1.08rem; }
.ct-share { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding-top: 1rem; border-top: 1px solid var(--mg-line); }

/* byguide */
.ct-rank-no { font: 700 1.6rem/1 var(--mg-serif); color: var(--mg-bronze-d); width: 2rem; text-align: center; }

/* ---------- undersøkelser ---------- */
.ct-poll fieldset { display: grid; gap: .45rem; }
.ct-opt { display: block; border: 1.5px solid var(--mg-line); border-radius: .7rem; padding: .6rem .9rem; cursor: pointer; font-weight: 600; background: #fff; }
.ct-opt:hover { border-color: var(--mg-jade); }
.btn-check:checked + .ct-opt { border-color: var(--mg-jade); background: var(--mg-jade-l); color: var(--mg-jade-d); }
.btn-check:focus-visible + .ct-opt { outline: 3px solid rgba(31, 90, 68, .35); outline-offset: 2px; }
.mg-errbox .ct-opt { border-color: #E8A39A; }
.ct-res { display: grid; gap: .6rem; }
.ct-res-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; font-size: .95rem; }
.ct-res-row.mine span::after { content: ' ✓'; color: var(--mg-jade); font-weight: 700; }
.ct-bar { grid-column: 1 / -1; height: .55rem; border-radius: 999px; background: var(--mg-sand); overflow: hidden; }
.ct-bar span { display: block; height: 100%; background: var(--mg-jade); border-radius: 999px; }
.ct-check { list-style: none; padding: 0; }
.ct-check li { position: relative; padding-left: 1.7rem; margin-bottom: .5rem; }
.ct-check li::before { content: '\F26E'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 0; color: var(--mg-jade); font-weight: 700; }

/* ---------- infosider ---------- */
.ct-legal { line-height: 1.7; }
.ct-legal h2 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); margin: 2rem 0 .6rem; }
.ct-legal h2:first-child { margin-top: 0; }
.ct-toc { position: sticky; top: 96px; }
.ct-toc a { display: block; padding: .3rem .6rem; border-radius: .5rem; color: var(--mg-ink); text-decoration: none; font-size: .92rem; }
.ct-toc a:hover { background: var(--mg-sand); }
.ct-faq .accordion-button { font-weight: 700; font-family: var(--mg-sans); font-size: 1rem; }
.ct-faq .accordion-button:not(.collapsed) { background: var(--mg-jade-l); color: var(--mg-jade-d); box-shadow: none; }
.ct-faq .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(31, 90, 68, .25); }
.ct-badge { max-width: 26rem; width: 100%; height: auto; }
.ct-portal { border-radius: 1.2rem; }
.ct-portal .mg-ico { width: 3.4rem; height: 3.4rem; }
.ct-steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 1rem; }
.ct-steps > li { counter-increment: s; position: relative; padding: 1.1rem 1.2rem 1.1rem 4rem; background: #fff; border: 1px solid var(--mg-line); border-radius: 1rem; }
.ct-steps > li::before { content: counter(s); position: absolute; left: 1.1rem; top: 1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--mg-jade); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ct-steps h3 { font: 700 1.05rem var(--mg-sans); margin: 0 0 .2rem; }
.ct-plan { border-radius: 1.2rem; }
.ct-plan.is-hl { border: 2px solid var(--mg-jade); box-shadow: var(--mg-shadow); }
.ct-plan .ct-price { font: 700 2rem/1.1 var(--mg-serif); }
.ct-plan ul { padding-left: 0; list-style: none; font-size: .94rem; }
.ct-plan li { padding: .25rem 0 .25rem 1.5rem; position: relative; }
.ct-plan li .bi { position: absolute; left: 0; top: .35rem; }
.ct-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* jobb */
.ct-job section + section { margin-top: 1rem; }
.ct-repeat { border: 1px solid var(--mg-line); border-radius: .8rem; padding: .9rem; background: var(--mg-sand); }
.ct-repeat + .ct-repeat { margin-top: .6rem; }
.ct-areas { max-height: 16rem; overflow-y: auto; border: 1px solid var(--mg-line); border-radius: .7rem; padding: .6rem .8rem; }
.ct-avatar { width: 8rem; height: 9.5rem; object-fit: cover; border-radius: .9rem; background: var(--mg-sand); }

/* ---------- forum ---------- */
.fm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .8rem; }
.fm-cat { display: flex; gap: 1rem; align-items: flex-start; text-decoration: none; color: var(--mg-ink); padding: 1.1rem; height: 100%; }
.fm-cat:hover { color: var(--mg-ink); }
.fm-cat h3 { font: 700 1.08rem var(--mg-sans); margin: 0 0 .2rem; }
.fm-cat .mg-ico { width: 3rem; height: 3rem; font-size: 1.25rem; }
.fm-row { display: flex; gap: 1rem; align-items: center; padding: .85rem 1rem; }
.fm-row + .fm-row { margin-top: .5rem; }
.fm-row .fm-t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.fm-num { flex: 0 0 4.2rem; text-align: center; line-height: 1.1; }
.fm-num b { display: block; font-size: 1.05rem; }
.fm-num small { color: var(--mg-muted); font-size: .75rem; }
.fm-tag { font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: var(--mg-sand); color: var(--mg-ink); border: 1px solid var(--mg-line); white-space: nowrap; }
.fm-tag.ok { background: var(--mg-jade-l); color: var(--mg-jade-d); border-color: #b6d3c5; }
.fm-tag.sold { background: #FDECEA; color: #7A1C10; border-color: #E8A39A; }
.fm-listing { overflow: hidden; }
.fm-listing .fm-ph { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; height: auto; background: var(--mg-sand); display: block; }
.fm-price { font-size: 1.25rem; font-weight: 800; }
.fm-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .5rem; }
.fm-facts > div { background: var(--mg-sand); border-radius: .6rem; padding: .55rem .75rem; }
.fm-facts small { display: block; color: var(--mg-muted); font-size: .78rem; }
.fm-facts b { overflow-wrap: anywhere; }
.fm-post .fm-body { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.65; }
.fm-av { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--mg-jade-l); color: var(--mg-jade-d); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.fm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: .6rem; }
.fm-gallery figure { margin: 0; }
.fm-gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .7rem; background: var(--mg-sand); display: block; }
.fm-gallery figcaption { font-size: .85rem; color: var(--mg-muted); margin-top: .25rem; overflow-wrap: anywhere; }
.fm-upl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .7rem; }
.fm-upl .card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(1rem - 1px) calc(1rem - 1px) 0 0; }
.fm-bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; border-bottom: 1px solid var(--mg-line); }
.fm-bars span { flex: 1 1 0; background: var(--mg-jade); border-radius: 3px 3px 0 0; min-height: 2px; }
.fm-bars.bronze span { background: var(--mg-bronze); }
.fm-hbar { height: .5rem; border-radius: 999px; background: var(--mg-sand); overflow: hidden; min-width: 4rem; }
.fm-hbar span { display: block; height: 100%; background: var(--mg-jade); }

@media (max-width: 575.98px) {
  .fm-row { flex-wrap: wrap; }
  .fm-row .fm-t { flex-basis: 100%; }
  .fm-num { flex: 0 0 auto; text-align: left; display: flex; gap: .3rem; align-items: baseline; }
  .ct-season { padding: 1.5rem 1.2rem; }
  .ct-steps > li { padding-left: 3.6rem; }
}
