/*
Skrevet av: Morten Tollefsen med god hjelp fra ChatGPT
Sist oppdatert: 15.10.25
*/

/* Fonts */
@font-face { font-family: mtBraille; src: url(/css/Braille6dot.ttf); }
@font-face {
  font-family: 'Inter';
  src: url('/css/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

/* Universell utforming (inkl. demo) */
.braille { font-family: mtBraille; }
.atkinson { font-family: Atkinson; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Standardtagger */
body {
  font-family: Inter, Verdana, Sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  background-color: #fff;
  color: #333;
  line-height: 1.6;
  padding: 0; margin: 0;
}

a { color: #0066cc; text-decoration: none; transition: color 0.3s; }
a:hover, a:focus { color: #004999; text-decoration: underline; }

header, footer {
  background-color: #f5f5f5; padding: 1rem; width: 100vw;
  margin-left: calc(-50vw + 50%); position: relative;
}
header { border-bottom: 1px solid #ddd; }
footer { border-top: 1px solid #ddd; }

main { padding: 2rem; max-width: 65ch; margin: 0 auto; }

h1 { color: #19452B; font-size: 2rem; font-weight: 900; margin-bottom: .5rem; }
h2 { font-size: 1.5rem; font-weight: 900; line-height: 1.4rem; margin-top: 2em; margin-bottom: .5rem; color: #19452B; }
h3 { color: #333; font-size: 1.2rem; font-weight: 900; margin-bottom: .5rem; }
h4, h5, h6 { color: #333; font-weight: 900; }

p { margin-bottom: 1rem; }

ul, ol { padding-left: 3.5rem; margin-bottom: 1rem; }
li { margin-bottom: .5rem; }

img { max-width: 100%; display: block; }

input[type="text"], input[type="tel"], input[type="email"], textarea {
  padding: 10px; border: 1px solid #ddd; width: 80%; overflow: hidden;
  display: block; box-sizing: border-box; margin-bottom: 10px; transition: border-color .3s;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus { border-color: #0066cc; }

input[type="number"] {
  padding: 10px; border: 1px solid #ddd; width: 100%;
  box-sizing: border-box; margin-bottom: 10px; transition: border-color .3s;
}
input[type="number"]:focus { border-color: #0066cc; }

button, input[type="submit"], input[type="button"], input[type="reset"] {
  background-color: #0066cc; color: #fff; border: none; padding: 10px 20px;
  cursor: pointer; transition: background-color .3s;
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover, input[type="reset"]:hover { background-color: #004999; }
button:active, input[type="submit"]:active, input[type="button"]:active, input[type="reset"]:active { background-color: #002d66; }
button:focus, input[type="submit"]:focus, input[type="button"]:focus, input[type="reset"]:focus {
  outline: 2px solid #004999; outline-offset: -2px;
}

dl { margin-bottom: 1rem; padding-left: 1.3rem; }
dt { font-weight: bold; color: #333; margin-bottom: .5rem; }
dd { margin-bottom: .5rem; margin-left: 1.3rem; }

/* Lister */
.vertical-list {
  list-style-type: none; padding: 3rem; display: flex; flex-direction: column; align-items: flex-start;
}
.vertical-list li {
  margin: 10px 0; border: 1px solid #ddd; border-radius: 5px; transition: border-color .3s; align-items: center;
}
.vertical-list a {
  text-decoration: none; color: #19452B; padding: 4px 9px; border-radius: 4px; transition: background-color .3s;
}
.vertical-list a:hover, .vertical-list a:focus {
  background-color: #eee; border: none; box-shadow: 0 2px 6px rgba(0,0,0,.2); outline: none; font-weight: bold;
}
.vertical-list li:hover, .vertical-list li:focus-within { border-color: #333; }

.horizontal-list { list-style-type: none; padding: 0; display: flex; justify-content: space-around; }
.horizontal-list li {
  margin: 0 10px; border: 1px solid #ddd; border-radius: 5px; transition: border-color .3s; align-items: center;
}
.horizontal-list a { text-decoration: none; color: #333; padding: 4px 9px; border-radius: 4px; transition: background-color .3s; }
.horizontal-list a:hover, .horizontal-list a:focus {
  background-color: #eee; border: none; box-shadow: 0 2px 6px rgba(0,0,0,.2); outline: none; font-weight: bold;
}
.horizontal-list li:hover, .horizontal-list li:focus-within { border-color: #333; }

/* Diverse */
.artikkelinfo { font-size: .9rem; }
.borderparagraph { border-top: 2px solid black; border-bottom: 2px solid black; padding: 5px; }
.underlined-link { text-decoration: underline; color: #0066cc; transition: color .3s, text-decoration-color .3s; }
.underlined-link:hover, .underlined-link:focus {
  color: #004999; text-decoration-color: #004999; text-decoration-thickness: 2px;
}
.visible-message {
  font-size: 1.2rem; color: #333; background-color: #f0f0f0; padding: 10px 20px; margin-top: 20px;
  border-radius: 5px; border: 1px solid #ddd; box-shadow: 0 2px 4px rgba(0,0,0,.1); display: inline-block; width: auto; text-align: center;
}

/* Video */
.skalerbar-video { max-width: 100%; height: auto; display: block; margin: 1.5rem auto; }
.video-wrapper { position: relative; width: 100vw; margin-left: 50%; transform: translateX(-50%); aspect-ratio: 16 / 9; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Eksperimentelt - ikke i bruk */
.background-image {
  background-image: url('/bilder-pynt/disabled-teddy-bears.png');
  background-size: cover; background-position: center center;
  background-repeat: no-repeat; background-attachment: fixed;
}

/* Media queries – basis */
@media only screen and (min-width: 45rem) {
  body { margin: 0 auto; }
}
@media (max-width: 768px) {
  .horizontal-list { flex-direction: column; align-items: flex-start; }
  .horizontal-list li { margin: 10px 0; }
}

