/*
Theme Name: Veitvet Foreldreside
Description: Uoffisielt WordPress-tema for foreldre på Veitvet SK sine guttelag G2019 (gutter født 2019).
Version: 0.7.0
Text Domain: wp-fotball-tema
*/

:root {
	--green-900: #0a2a1e;
	--green-800: #0f3d2c;
	--green-700: #15543b;
	--green-100: #e4efe9;
	--black: #0b0d0c;
	--ink: #151a17;
	--muted: #5b6761;
	--paper: #f6f8f7;
	--white: #fff;
	--accent: #ffee00;
	--header: #0f3d2c;
	--radius: 14px;
	--max: 1120px;
	--shadow: 0 6px 24px rgba(10, 42, 30, .12);
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.6;
	color: var(--ink);
	background: var(--paper);
}

img { max-width: 100%; height: auto; }
a { color: var(--green-700); }
a:hover { color: var(--green-900); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.section { padding: 3rem 0; }
.section__title { margin: 0 0 1.5rem; font-size: 1.6rem; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--white); padding: .5rem 1rem; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--header);
	color: var(--white);
	border-bottom: 3px solid var(--accent);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.site-brand { display: flex; align-items: center; gap: .75rem; color: var(--white); text-decoration: none; font-weight: 800; }
.site-brand:hover { color: var(--white); }
.site-brand__logo { height: 54px; width: auto; display: block; }
.site-brand__mark {
	display: grid; place-items: center; width: 38px; height: 38px;
	background: var(--green-700); border-radius: 50%; font-size: 1.1rem;
}
.site-brand__text small { display: block; font-weight: 500; font-size: .72rem; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }

.nav-toggle {
	display: none; background: none; border: 1px solid #ffffff55; color: var(--white);
	border-radius: 8px; padding: .5rem .8rem; font-size: 1rem; cursor: pointer;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.lang-switch { display: flex; gap: .15rem; align-items: center; margin-left: .25rem; font-size: .8rem; }
.lang-switch a { color: #e8efeb; opacity: .7; text-decoration: none; font-weight: 700; padding: .25rem .45rem; border-radius: 6px; letter-spacing: .04em; }
.lang-switch a:hover { opacity: 1; background: var(--green-900); }
.lang-switch a[aria-current] { opacity: 1; background: var(--green-900); box-shadow: inset 0 -2px 0 var(--accent); }
.main-nav a {
	display: block; padding: .6rem .9rem; border-radius: 8px;
	color: #e8efeb; text-decoration: none; font-weight: 600;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { background: var(--green-900); color: var(--white); }
.main-nav li { position: relative; }
.main-nav .sub-menu {
	display: none; position: absolute; flex-direction: column; background: var(--green-800);
	border: 1px solid var(--green-900); border-radius: 10px; padding: .4rem; min-width: 180px;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav li:last-child > .sub-menu { right: 0; top: 100%; min-width: 0; width: max-content; padding: .2rem; }
.main-nav .sub-menu a { padding: .3rem .8rem; font-size: .88rem; white-space: nowrap; }

@media (max-width: 800px) {
	.nav-toggle { display: block; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--header); padding: .5rem 1rem 1rem; border-bottom: 3px solid var(--accent); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav .sub-menu { display: flex; position: static; border: 0; padding-left: 1rem; }
}

/* Hero */
.hero {
	background:
		radial-gradient(circle at 85% 20%, #1d6a4a55, transparent 45%),
		linear-gradient(135deg, var(--green-900), var(--black));
	color: var(--white);
	padding: 4rem 0 5rem;
}
.hero__eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; }
.hero h1 { font-size: clamp(1.5rem, 4.6vw, 3.4rem); margin: .4rem 0 1rem; text-wrap: balance; }
.hero p { max-width: 38rem; color: #cfe0d7; font-size: 1.1rem; margin: 0; }
.hero--small { padding: 2.5rem 0; }
.hero--small h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: .3rem 0 0; }

/* Cards */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.team-cards { margin-top: -3rem; position: relative; }

.panel { background: var(--white); border-radius: var(--radius); padding: 1.5rem; border: 1px solid #dbe5df; }
.panel--wheel { box-shadow: var(--shadow); border-top: 6px solid var(--accent); padding: 1rem 1.5rem 2rem; }
.panel--wheel .arshjul { margin-top: 0; }

/* Posts */
.post-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid #dbe5df; }
.post-card__body { padding: 1.25rem; }
.post-card__meta { color: var(--muted); font-size: .85rem; }
.post-card h3 { margin: .3rem 0 .5rem; font-size: 1.15rem; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--green-700); }

.content { max-width: 760px; margin-inline: auto; }
.content > * + * { margin-top: 1em; }
.content iframe { width: 100%; border: 0; border-radius: 10px; }
.entry-meta { color: var(--muted); font-size: .9rem; }

/* Årshjul */
.arshjul { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem 2rem; align-items: start; margin-top: 1.5rem; }
.arshjul__bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 1rem; }
.arshjul__year { font-size: 1.4rem; min-width: 4ch; text-align: center; }
.arshjul__nav {
	width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--black); color: var(--white); font-size: 1.3rem; line-height: 1;
}
.arshjul__nav:hover:not(:disabled) { background: var(--green-700); }
.arshjul__nav:disabled { opacity: .3; cursor: default; }

.arshjul__wheel svg { width: 100%; height: auto; display: block; }
.arshjul__month { fill: var(--black); stroke: var(--paper); stroke-width: 2; }
.arshjul__month.is-odd { fill: var(--green-800); }
.arshjul__month.is-current { fill: var(--green-700); stroke: var(--accent); stroke-width: 3; }
.arshjul__mlabel { fill: var(--white); font-size: 22px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.arshjul__center { fill: var(--white); stroke: #dbe5df; stroke-width: 2; }
.arshjul__cyear { font-size: 64px; font-weight: 800; text-anchor: middle; fill: var(--green-800); }
.arshjul__csub { font-size: 22px; text-anchor: middle; fill: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.arshjul__today { stroke: var(--black); stroke-width: 2.5; stroke-dasharray: 6 5; }
.arshjul__arc { fill: none; stroke-width: 9; stroke-linecap: round; opacity: .55; }
.arshjul__marker { stroke: var(--white); stroke-width: 2.5; transition: transform .12s; transform-box: fill-box; transform-origin: center; }
.arshjul__num { fill: var(--white); font-size: 15px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.arshjul__event.is-active .arshjul__marker { transform: scale(1.35); }
.arshjul__event.is-active .arshjul__arc { opacity: 1; }

.arshjul__legend { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: center; font-size: .85rem; color: var(--muted); }
.arshjul__dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; }

.arshjul__list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.arshjul__item { display: flex; gap: .85rem; padding: .8rem 1rem; background: var(--white); border: 1px solid #dbe5df; border-radius: 12px; }
.arshjul__item.is-active { border-color: var(--green-700); background: var(--green-100); }
.arshjul__item.is-past { opacity: .55; }
.arshjul__badge { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--white); font-size: .8rem; font-weight: 700; }
.arshjul__date { font-size: .85rem; color: var(--muted); font-weight: 600; }
.arshjul__title { font-weight: 700; }
.arshjul__info { font-size: .9rem; color: var(--muted); }
.arshjul__empty { padding: 1.5rem; background: var(--white); border-radius: 12px; border: 1px dashed #b8c8bf; color: var(--muted); }

.arshjul__tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; }
.arshjul__chip { padding: .35rem .95rem; border: 1px solid #b8c8bf; border-radius: 999px; background: var(--white); color: var(--green-800); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.arshjul__chip:hover { border-color: var(--green-700); }
.arshjul__chip.is-active { background: var(--green-800); border-color: var(--green-800); color: var(--white); }
.arshjul__add { padding: .4rem 1.1rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--black); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.arshjul__add:hover { filter: brightness(.95); }
.arshjul__cal { padding: .35rem .95rem; border: 1px dashed #b8c8bf; border-radius: 999px; background: transparent; color: var(--green-800); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.arshjul__cal:hover { border-color: var(--green-700); background: var(--white); }
.arshjul-dlg a.arshjul-dlg__btn { text-decoration: none; display: inline-block; }
.arshjul__body { flex: 1; min-width: 0; }
.arshjul__edit { flex: none; align-self: center; padding: .3rem .8rem; border: 1px solid #b8c8bf; border-radius: 8px; background: var(--white); color: var(--green-800); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.arshjul__edit:hover { background: var(--green-100); }

.arshjul-dlg { width: min(520px, calc(100vw - 2rem)); max-height: 90vh; padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); color: var(--ink); }
.arshjul-dlg::backdrop { background: rgba(0, 0, 0, .5); }
.arshjul-dlg__in { display: grid; gap: .9rem; padding: 1.3rem 1.5rem; }
.arshjul-dlg__in h3 { margin: 0; }
.arshjul-dlg__field { display: grid; gap: .25rem; font-weight: 600; font-size: .9rem; }
.arshjul-dlg__field input, .arshjul-dlg__field select { width: 100%; padding: .55rem .7rem; border: 1px solid #b8c8bf; border-radius: 8px; font: inherit; font-weight: 400; background: var(--white); }
.arshjul-dlg__field input:focus, .arshjul-dlg__field select:focus { outline: 2px solid var(--green-700); outline-offset: 1px; }
.arshjul-dlg__row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.arshjul-cal__sum { padding: .55rem .75rem; background: var(--green-100); border-radius: 8px; font-weight: 700; font-size: .92rem; color: var(--green-800); }
.arshjul-cal { padding: .5rem; border: 1px solid #dbe5df; border-radius: 12px; }
.arshjul-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.arshjul-cal__nav { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--green-800); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.arshjul-cal__nav:hover { background: var(--green-100); }
.arshjul-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.arshjul-cal__wd { text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); padding: .2rem 0; }
.arshjul-cal__day { position: relative; aspect-ratio: 1; min-height: 38px; border: 0; border-radius: 8px; background: #eef4f0; color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; }
.arshjul-cal__day:hover { background: #cfe3d8; }
.arshjul-cal__day.is-today { box-shadow: inset 0 0 0 2px var(--black); }
.arshjul-cal__day.is-mid { background: #8fc4a6; border-radius: 0; }
.arshjul-cal__day.is-start, .arshjul-cal__day.is-end { background: var(--green-700); color: var(--white); }
.arshjul-cal__dot { position: absolute; left: 50%; bottom: 4px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--white); }
.arshjul-dlg__lag { margin: 0; padding: .6rem .9rem; border: 1px solid #dbe5df; border-radius: 10px; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.arshjul-dlg__lag legend { padding: 0 .3rem; font-weight: 600; font-size: .9rem; }
.arshjul-dlg__chk { font-size: .95rem; cursor: pointer; }
.arshjul-dlg__hint { flex-basis: 100%; margin: 0; font-size: .82rem; color: var(--muted); }
.arshjul-dlg__msg { margin: 0; color: #b3261e; font-size: .9rem; font-weight: 600; }
.arshjul-dlg__msg:empty { display: none; }
.arshjul-dlg__btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.arshjul-dlg__btn { padding: .55rem 1.1rem; border: 0; border-radius: 8px; background: var(--green-700); color: var(--white); font: inherit; font-weight: 700; cursor: pointer; }
.arshjul-dlg__btn:disabled { opacity: .5; cursor: default; }
.arshjul-dlg__btn--light { background: var(--green-100); color: var(--green-800); }
.arshjul-dlg__btn--danger { margin-left: auto; background: #b3261e; }

@media (max-width: 800px) {
	.arshjul { grid-template-columns: 1fr; }
}

/* Treningsøkter */
.okt-source { color: var(--muted); font-size: .95rem; }
.okt-group__title { margin: 2rem 0 1rem; font-size: 1.3rem; }
.okt-empty { padding: 1.5rem; background: var(--white); border-radius: 12px; border: 1px dashed #b8c8bf; color: var(--muted); }
.okt-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; background: var(--white); border: 1px solid #dbe5df; border-radius: var(--radius); border-top: 4px solid var(--green-700); }
.okt-card h3 { margin: 0; font-size: 1.1rem; }
.okt-card__tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.okt-tag { padding: .15rem .6rem; border-radius: 999px; background: var(--black); color: var(--white); font-size: .75rem; font-weight: 700; }
.okt-tag--age { background: var(--green-100); color: var(--green-800); }
.okt-card__info { margin: 0; color: var(--muted); font-size: .92rem; }
.okt-card__link { margin-top: auto; font-weight: 700; }

/* Fotballsensor */
.sensor-intro p { margin: 0; }
.sensor-intro p + p { margin-top: .8rem; }
.sensor-title { margin-top: 3rem; }
.sensor-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.sensor-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .sensor-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .sensor-grid, .sensor-grid--4 { grid-template-columns: 1fr; } }
.sensor-card { display: block; padding: 1.25rem; background: var(--white); border: 1px solid #dbe5df; border-radius: var(--radius); border-left: 5px solid var(--green-700); color: var(--ink); text-decoration: none; }
.sensor-card h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.sensor-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.sensor-card--link:hover { border-left-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.sensor-specs { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 0; }
.sensor-specs dt { font-weight: 700; color: var(--green-800); }
.sensor-specs dd { margin: 0; }
.sensor-privacy { margin-top: 3rem; padding: 1.5rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--green-900), var(--black)); color: var(--white); }
.sensor-privacy h2 { margin: 0 0 .8rem; font-size: 1.3rem; }
.sensor-privacy ul { margin: 0 0 1rem; padding-left: 1.2rem; color: #cfe0d7; }
.sensor-privacy p { margin: 0; color: #cfe0d7; }

/* Footer */
.site-footer { background: var(--black); color: #b9c8c0; padding: 2.5rem 0; margin-top: 3rem; border-top: 3px solid var(--green-700); }
.site-footer a { color: var(--accent); }
.site-footer small { display: block; margin-top: .75rem; color: #7f8e86; }
