/* krapp.is – blár haus og fótur (fastir efst og neðst), hvítt efnisspjald á ljósum grunni */
:root {
  --blue: #22519a;
  --blue-dark: #183c74;
  --blue-light: #e9f0fa;
  --accent: #7ee07e;
  --bg: #eef2f7;
  --text: #2b3440;
  --heading: #14233a;
  --muted: #5f6b7a;
  --line: #e3e8ef;
  --radius: 14px;
  --header-h: 76px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; color: var(--text);
  background: linear-gradient(180deg, #e4ebf5 0, var(--bg) 320px) no-repeat, var(--bg);
  font: 17px/1.7 Lato, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Haus: fastur efst */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 12px rgba(16, 40, 80, .25);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 32px; min-height: var(--header-h); padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; flex-shrink: 0; }
.brand img { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.brand strong { color: #fff; display: block; font-size: 26px; line-height: 1.1; letter-spacing: .02em; font-weight: 800; }
.brand small { display: block; font-size: 14px; opacity: .9; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 16px; }
.nav a { color: #fff; text-decoration: none; padding: 7px 14px; border-radius: 999px; transition: background-color .15s; white-space: nowrap; }
.nav a:hover, .nav a:focus-visible { background: rgba(255,255,255,.14); outline: none; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.2); font-weight: 600; }
.nav .lang { margin-left: 6px; border: 1px solid rgba(255,255,255,.5); color: #fff; display: inline-flex; align-items: center; gap: 9px; }
.nav .lang img { flex: none; width: 21px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.nav .lang:hover { background: #fff; color: var(--blue); }

/* Efni */
main.wrap { flex: 1; padding-top: 40px; padding-bottom: 48px; }
.card {
  background: #fff; padding: 48px 56px; border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 40, 80, .05), 0 8px 30px rgba(16, 40, 80, .07);
  overflow-wrap: anywhere;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card p, .card li { max-width: 76ch; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; }
h1 { font-size: 34px; margin: 0 0 28px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 25px; margin: 44px 0 14px; font-weight: 700; }
h3 { font-size: 22px; margin: 40px 0 12px; font-weight: 700; color: var(--blue-dark); }
p { margin: 0 0 1.1em; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-dark); text-decoration-thickness: 2px; }
strong { color: var(--heading); }
img { max-width: 100%; height: auto; vertical-align: middle; }
hr { border: 0; height: 1px; background: var(--line); margin: 40px 0; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin: .25em 0; }
li::marker { color: var(--blue); }
li > p { margin: .2em 0 .7em; }

.card p img, .card li img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(16, 40, 80, .10); margin: 6px 0 4px; }

/* Myndaraðir: app-merki og skjámyndir */
.gallery { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-start; max-width: none !important; margin: 24px 0 32px; }
.gallery a { display: inline-block; border-radius: 10px; transition: transform .15s, box-shadow .15s; }
.gallery a:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16, 40, 80, .18); }
.gallery a img { height: 56px; width: auto; border-radius: 10px; border: 0; box-shadow: none; margin: 0; }
.gallery > img { margin: 0; width: calc(25% - 15px); min-width: 140px; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(16, 40, 80, .12); }

/* Töflur */
.table-scroll { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 14px; text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: var(--blue-light); color: var(--heading); }

/* Fótur: fastur neðst */
.site-footer {
  position: sticky; bottom: 0; z-index: 10;
  background: var(--blue-dark); color: rgba(255,255,255,.9); font-size: 14px;
  box-shadow: 0 -2px 12px rgba(16, 40, 80, .2);
}
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 24px; padding-top: 12px; padding-bottom: 12px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .card { padding: 36px 32px; }
  .gallery > img { width: calc(50% - 10px); }
}

@media (max-width: 640px) {
  :root { --header-h: 0px; }
  body { font-size: 16px; }
  .wrap { padding: 0 14px; }
  .site-header .wrap { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  .brand img { width: 40px; height: 40px; border-radius: 9px; }
  .brand strong { font-size: 21px; }
  .brand small { font-size: 13px; }
  /* Valmyndin í einni línu sem má fletta til hliðar, svo hausinn haldist lágur */
  .nav { overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; font-size: 15px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 5px 11px; }
  main.wrap { padding-top: 16px; padding-bottom: 24px; }
  .card { padding: 24px 18px; border-radius: 12px; }
  h1 { font-size: 27px; margin-bottom: 20px; }
  h2 { font-size: 22px; }
  h3 { font-size: 20px; margin-top: 32px; }
  .gallery { gap: 10px; }
  .gallery a img { height: 46px; }
  .gallery > img { width: calc(50% - 5px); min-width: 0; border-radius: 12px; }
  .site-footer .wrap { padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
}
