/* Generell styling */
body {
  font-family: Arial, sans-serif;
  margin: 2rem;
  background-color: #f9f9f9;
}

h1 {
  position: relative;
  padding-left: 1rem;
  color: #333;
}

/* Pseudo-elementer */
h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  width: 20px;
  background-color: steelblue;
}

ul li::after {
  content: " ★";
  color: goldenrod;
  font-size: 1.1rem;
}

/* :nth-child og variasjon */
ul li:nth-child(odd) {
  background-color: #e0f7fa;
}

ul li:first-child {
  color: green;
}

ul li:last-child {
  color: darkred;
}

ul li:not(:nth-child(3)) {
  font-style: italic;
}

/* Knapp :hover */
button {
  padding: 0.5rem 1rem;
  background-color: #ddd;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #bbb;
}

/* Seksjonsspesifikk styling */
section {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

section div {
  background-color: #eee;
  padding: 1rem;
  border-radius: 6px;
  flex: 1;
}

/* Ekstra utfordring */
.highlight {
  position: relative;
  margin-top: 2rem;
  padding: 1rem;
  background-color: #fffbe6;
  border: 2px dashed #ffcc00;
}

.highlight::before,
.highlight::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid orange;
  pointer-events: none;
}

.highlight::before {
  top: -8px;
  left: -8px;
}

.highlight::after {
  bottom: -8px;
  right: -8px;
}

/* Focus-effekt på input */
.highlight input:focus {
  outline: 2px solid orange;
  background-color: #fff0cc;
}

/* Style spesifikk underseksjon */
section div:nth-of-type(2) {
  background-color: #d1f5d3;
  font-weight: bold;
}
