/*
Theme Name: Værdikuponer
Theme URI: https://værdikuponer.dk/
Author: Claude for Værdikuponer.dk
Description: Let, hurtigt tema til Værdikuponer.dk med kupon-design til rabatkoder. Kræver pluginet vk-automatik for koder og butikker.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: vk
*/

:root {
	--ink: #13233a;
	--ink-2: #34465d;
	--muted: #66768a;
	--paper: #f7f4ee;
	--card: #ffffff;
	--line: #e7e1d6;
	--accent: #e4572e;
	--accent-dark: #c2421d;
	--accent-soft: #fdeee8;
	--green: #0f7a4a;
	--green-soft: #e6f4ec;
	--gold: #f3b73b;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(19, 35, 58, .06), 0 6px 20px rgba(19, 35, 58, .06);
	--wrap: 1160px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 16px/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 1.6em 0 .55em; font-weight: 800; color: var(--ink); }
h1 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -.025em; }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; color: #fff; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }
.brand-name { font-weight: 850; font-size: 21px; letter-spacing: -.03em; }
.brand-name span { color: var(--accent); }
.custom-logo { max-height: 44px; width: auto; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--ink); }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; gap: 4px; align-items: center; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 15px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { background: var(--accent-soft); color: var(--accent-dark); }
.main-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.main-nav .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 230px; padding: 8px;
	background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a { font-weight: 550; padding: 8px 10px; }
.nav-cta { background: var(--accent) !important; color: #fff !important; }
.nav-cta:hover { background: var(--accent-dark) !important; }

@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 68px); overflow: auto; }
	.main-nav.is-open { display: block; }
	.main-nav > ul { flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 0; }
	.main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 14px; min-width: 0; }
	.main-nav .menu-item-has-children > a::after { display: none; }
}

/* ---------- Hero ---------- */
.hero {
	position: relative; overflow: hidden;
	background: var(--ink);
	color: #fff;
	padding: 64px 0 72px;
}
.hero::before {
	content: ""; position: absolute; inset: 0; opacity: .5;
	background:
		radial-gradient(circle at 85% 20%, rgba(228, 87, 46, .55), transparent 40%),
		radial-gradient(circle at 10% 110%, rgba(243, 183, 59, .35), transparent 45%);
}
.hero .wrap { position: relative; }
.hero h1 { color: #fff; margin: 0 0 14px; max-width: 760px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p.lead { font-size: 19px; color: #d6deea; max-width: 640px; margin-bottom: 26px; }
.searchbar { display: flex; gap: 8px; max-width: 620px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.searchbar input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 17px; padding: 10px 12px; color: var(--ink); background: transparent; }
.searchbar input:focus { outline: none; }
.searchbar button { border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 750; padding: 10px 20px; border-radius: 10px; cursor: pointer; }
.searchbar button:hover { background: var(--accent-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips a { color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; }
.chips a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.trustline { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: 14px; color: #c3cedc; }
.trustline span::before { content: "✓"; color: var(--gold); font-weight: 800; margin-right: 7px; }

.page-hero { background: var(--ink); color: #fff; padding: 40px 0 44px; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; opacity: .45; background: radial-gradient(circle at 92% 0%, rgba(228, 87, 46, .6), transparent 45%); }
.page-hero .wrap { position: relative; }
.page-hero h1 { color: #fff; margin: 6px 0 8px; font-size: clamp(28px, 3.6vw, 40px); }
.page-hero .sub { color: #d0d9e6; margin: 0; max-width: 720px; }
.crumbs { font-size: 13px; color: #aebbd0; }
.crumbs a { color: #d6deea; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 6px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
a.card { display: block; text-decoration: none; color: var(--ink); transition: transform .15s ease, border-color .15s ease; }
a.card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Sæson-billetter */
.ticket {
	position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
	min-height: 128px; padding: 18px 20px; border-radius: var(--radius);
	background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none;
	box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease;
}
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.ticket::before { left: -10px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -10px; clip-path: inset(0 50% 0 0); }
.ticket:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.ticket .t-date { font-size: 13px; font-weight: 700; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .05em; }
.ticket .t-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.ticket .t-more { font-size: 14px; color: var(--muted); border-top: 2px dashed var(--line); padding-top: 8px; }
.ticket.is-hot { background: linear-gradient(135deg, #fff 0%, var(--accent-soft) 100%); border-color: #f4c3b3; }
.ticket .t-badge { position: absolute; top: 14px; right: 16px; font-size: 11px; font-weight: 800; background: var(--accent); color: #fff; padding: 3px 8px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Kupon (rabatkode) ---------- */
.vk-liste { display: grid; gap: 14px; margin: 1.2em 0; }
.vk-kupon {
	position: relative;
	display: grid; grid-template-columns: 128px 1fr auto; align-items: stretch;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); overflow: visible;
}
.vk-rabat {
	position: relative;
	display: flex; align-items: center; justify-content: center; text-align: center;
	padding: 18px 12px; border-right: 2px dashed var(--line);
	background: var(--accent-soft); border-radius: var(--radius) 0 0 var(--radius);
	color: var(--accent-dark); font-weight: 900; font-size: 22px; line-height: 1.1; letter-spacing: -.02em;
	word-break: break-word;
}
/* udstansede huller ved perforeringen */
.vk-rabat::before, .vk-rabat::after {
	content: ""; position: absolute; right: -11px; width: 20px; height: 20px; border-radius: 50%;
	background: var(--paper); border: 1px solid var(--line);
}
.vk-rabat::before { top: -11px; clip-path: inset(50% 0 0 0); }
.vk-rabat::after { bottom: -11px; clip-path: inset(0 0 50% 0); }
.vk-info { padding: 16px 18px; min-width: 0; }
.vk-butik { font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.vk-butik a { color: inherit; text-decoration: none; }
.vk-butik a:hover { color: var(--accent-dark); }
.vk-titel { font-weight: 750; font-size: 17px; line-height: 1.35; margin: 2px 0 4px; }
.vk-meta { font-size: 13px; color: var(--muted); }
.vk-meta::before { content: "✓ "; color: var(--green); font-weight: 800; }
.vk-vilkaar { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.vk-vilkaar summary { cursor: pointer; font-size: 13px; font-weight: 650; color: var(--muted); }
.vk-vilkaar p { margin: 6px 0 0; }
.vk-cta { display: flex; align-items: center; padding: 16px 18px 16px 0; }

.vk-knap {
	position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 150px; padding: 13px 20px; border-radius: 10px;
	background: var(--accent); color: #fff !important; font-weight: 800; text-decoration: none; white-space: nowrap;
	transition: background .15s ease;
}
.vk-knap:hover { background: var(--accent-dark); }
/* "Vis kode" med kodens hjørne der titter frem */
.vk-vis-kode { padding-right: 58px; overflow: hidden; }
.vk-vis-kode .vk-peek {
	position: absolute; right: 0; top: 0; bottom: 0; width: 48px;
	display: flex; align-items: center; justify-content: center;
	background: #fff; color: var(--ink); border: 2px dashed var(--accent); border-left-style: solid; border-radius: 0 10px 10px 0;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 800; letter-spacing: .04em;
}
.vk-vis-kode .vk-peek::before { content: ""; position: absolute; left: -9px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: var(--accent); transform: rotate(45deg); }
.vk-vis-kode:hover .vk-peek::before { background: var(--accent-dark); }
/* afsløret kode */
.vk-kodeboks {
	display: inline-flex; align-items: center; gap: 10px; min-width: 150px; justify-content: space-between;
	padding: 10px 12px 10px 16px; border: 2px dashed var(--green); border-radius: 10px; background: var(--green-soft);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; font-size: 17px; letter-spacing: .06em; color: var(--ink);
}
.vk-kodeboks button { font: 700 13px var(--font); letter-spacing: 0; border: 0; border-radius: 8px; padding: 6px 10px; background: var(--green); color: #fff; cursor: pointer; }
.vk-kodeboks button.is-done { background: var(--ink); }
.vk-knap-off { background: #c9c3b8; cursor: default; }
.vk-udloebet { opacity: .6; filter: grayscale(.6); }
.vk-tom {
	background: #fff; border: 2px dashed var(--line); border-radius: var(--radius);
	padding: 22px 24px; color: var(--ink-2);
}
.vk-opdateret { display: inline-block; font-size: 14px; color: var(--green); background: var(--green-soft); padding: 4px 12px; border-radius: 999px; font-weight: 650; }
.vk-oplysning { font-size: 13px; color: var(--muted); }
.vk-antal { font-size: 12px; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 1px 8px; border-radius: 999px; margin-left: 6px; }

@media (max-width: 680px) {
	.vk-kupon { grid-template-columns: 96px 1fr; }
	.vk-rabat { font-size: 18px; grid-row: span 2; }
	.vk-info { padding: 14px 14px 6px; }
	.vk-cta { padding: 4px 14px 14px; }
	.vk-cta .vk-knap, .vk-cta .vk-kodeboks { width: 100%; }
}

/* A–Å */
.vk-az { columns: 3 220px; column-gap: 28px; }
.vk-az h3 { break-after: avoid; margin: 14px 0 6px; font-size: 22px; color: var(--accent-dark); }
.vk-az ul { list-style: none; margin: 0 0 8px; padding: 0; break-inside: avoid; }
.vk-az li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.vk-az a { color: var(--ink); text-decoration: none; font-weight: 600; }
.vk-az a:hover { color: var(--accent-dark); }
.filterbox { width: 100%; max-width: 420px; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 14px; }

/* Kategorier */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills a { display: inline-block; padding: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: 15px; }
.pills a:hover { border-color: var(--accent); color: var(--accent-dark); }

/* Sådan virker det */
.steps { counter-reset: s; }
.steps .card { position: relative; padding-top: 52px; }
.steps .card::before { counter-increment: s; content: counter(s); position: absolute; top: 16px; left: 20px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }

/* ---------- Indhold (sider og indlæg) ---------- */
.content-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding: 40px 0 64px; }
.content-wrap.single-col { grid-template-columns: minmax(0, 820px); justify-content: center; }
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 44px); box-shadow: var(--shadow); }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1em 0; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--paper); font-weight: 750; }
.prose figure.wp-block-table { margin: 0; overflow-x: auto; }
.prose blockquote { margin: 1em 0; padding: 4px 18px; border-left: 4px solid var(--accent); color: var(--ink-2); }
.prose details { background: var(--paper); border-radius: 10px; padding: 10px 14px; }
.sidebar .card + .card { margin-top: 16px; }
.sidebar h3 { margin-top: 0; font-size: 16px; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border: 0; }
.sidebar a { text-decoration: none; color: var(--ink); font-weight: 600; }
.sidebar a:hover { color: var(--accent-dark); }
.sidebar .card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.sidebar .card.dark h3, .sidebar .card.dark a { color: #fff; }
.sidebar .card.dark p { color: #cfd8e5; font-size: 14px; }
@media (max-width: 960px) { .content-wrap { grid-template-columns: 1fr; } }

.post-list { display: grid; gap: 14px; }
.post-item { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); }
.post-item:hover { border-color: var(--accent); color: var(--ink); }
.post-item h2 { font-size: 20px; margin: 0 0 4px; }
.post-item p { margin: 0; color: var(--muted); font-size: 15px; }
.post-item time { font-size: 13px; color: var(--muted); }
.pagination { margin-top: 20px; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Formular */
.vk-form label { display: block; font-weight: 650; margin: 12px 0 4px; }
.vk-form input, .vk-form textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vk-form textarea { min-height: 150px; }
.vk-form .hp { position: absolute; left: -9999px; }
.vk-form button { margin-top: 14px; border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 750; padding: 12px 22px; border-radius: 10px; cursor: pointer; }
.notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; }
.notice.ok { background: var(--green-soft); color: var(--green); }
.notice.err { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- Footer ---------- */
.site-footer { background: #0e1a2c; color: #b9c4d3; margin-top: 40px; padding: 48px 0 28px; font-size: 15px; }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: #dfe6ef; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid .brand { color: #fff; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 32px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: #8d9bb0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.alignleft { float: left; margin: 0 1em 1em 0; } .alignright { float: right; margin: 0 0 1em 1em; } .aligncenter { display: block; margin: 0 auto 1em; }
