/* Grundinställningar */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #ffffff;
  color: #1a1a1a;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Header */

header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  background-color: #19382b;
  color: #ffffff;
}

header > img {
  width: 80px;
  margin: 10px 20px;
}

header > p {
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
}

header nav {
  grid-column: 1 / -1;
}

header nav li {
  border-top: 1px solid #ffffff;
}

header nav a {
  display: block;
  padding: 6px;
  text-align: center;
  font-weight: bold;
  text-decoration: none;
}

/* Gemensamt för sidans sektioner */

.hero,
.introduktion,
.planera {
  background-color: #19382b;
}

.aktiviteter {
  background-color: #0d1914;
}

.hero,
.introduktion,
.aktiviteter,
.planera {
  color: #ffffff;
  border-bottom: 1px solid #ffffff;
}

.hero-content,
.introduktion,
.aktiviteter,
.planera {
  padding: 1.5rem;
}

.hero h1,
.introduktion h2,
.aktiviteter > h2,
.planera h2 {
  font-size: 1.25rem;
  text-align: center;
}

/* Hero */

.hero > img {
  height: 300px;
  object-fit: cover; /* Beskär bilden utan att förvränga proportionerna */
}

.hero-content {
  text-align: left;
}

/* Knappar */

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background-color: #0d1914;
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
}

.hero-content .button,
.planera .button {
  display: block;
  width: fit-content;
  margin: 1rem auto 0;
}

/* Aktivitetskort */

.aktiviteter article {
  margin-bottom: 1.5rem;
  background-color: #19382b;
}

.aktiviteter article:last-child {
  margin-bottom: 0;
}

.aktiviteter article img {
  height: 220px;
  object-fit: cover;
}

.aktiviteter article h3 {
  margin: 0;
  padding: 1rem 1rem 0;
}

.aktiviteter article p {
  margin: 0;
  padding: 0.5rem 1rem 1rem;
}

/* Footer */

footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 1rem;
  padding: 2rem 1.5rem;
  background-color: #0d1914;
  color: #ffffff;
}

.footer-brand {
  grid-column: 1 / -1;
  text-align: center;
}

.footer-brand img {
  width: 100px;
  margin: 0 auto 1rem;
}

.footer-brand p {
  margin-bottom: 0.25rem;
}

.footer-brand p:first-of-type {
  font-weight: bold;
}

footer h2 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.footer-contact p {
  margin-bottom: 0.4rem;
}

.footer-links li {
  margin-bottom: 0.25rem;
}

/* Desktop */
/* Sätter specifika regler för större skärmar */
@media (min-width: 768px) {
  /* Header */

  header {
    grid-template-columns: auto auto 1fr;
    padding: 0 10%;
  }

  header > img {
    margin-left: 0;
  }

  header nav {
    grid-column: auto;
    justify-self: end;
  }

  header nav ul {
    display: flex;
    gap: 2rem;
  }

  header nav li {
    border: 0;
  }

  header nav a {
    padding: 1rem 0;
  }

  /* Hero */

  .hero {
    position: relative;
  }

  .hero > img {
    height: 500px;
  }

  .hero-content {
    position: absolute;
    top: 50%;
    left: 10%;
    width: 360px;
    padding: 0;
    transform: translateY(-50%);
  }

  .hero-content h1 {
    font-size: 2rem;
    text-align: left;
  }

  .hero-content .button {
    display: inline-block;
    width: auto;
    margin: 1rem 0 0;
     /* Ljusare färg i desktopversion eftersom den mörkare smälte in i bakgrunden */
    background-color: #19382b;
  }

  /* Introduktion */

  .introduktion {
    padding: 2.5rem 10%;
    text-align: center;
  }

  .introduktion p {
    max-width: 800px;
    margin: 0 auto 1rem;
  }

  .introduktion p:last-child {
    margin-bottom: 0;
  }

  /* Aktivitetskort */

  .aktiviteter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2.5rem 10%;
  }

  .aktiviteter > h2 {
    grid-column: 1 / -1; /* Lägger rubriken över de tre aktivitetskorten */
    margin-bottom: 0;
  }

  .aktiviteter article {
    margin-bottom: 0;
  }

  /* Planera ditt besök */

  .planera {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2.5rem 10%;
  }

  .planera h2 {
    grid-column: 1;
    margin-bottom: 0.5rem;
    text-align: left;
  }

  .planera p {
    grid-column: 1;
    max-width: 650px;
    margin-bottom: 0;
  }

  .planera .button {
    grid-column: 2;
    grid-row: 1 / 3; /* Sätter knappen bredvid rubrik och text */
    justify-self: end;
    width: auto;
    margin: 0;
  }

  /* Footer */

  footer {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    align-items: start;
    padding: 3rem 10%;
  }

  .footer-brand {
    grid-column: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    text-align: left;
  }

  .footer-brand img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 90px;
    margin: 0;
  }

  .footer-brand p:first-of-type {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin-bottom: 0.25rem;
  }

  .footer-brand p:last-of-type {
    grid-column: 2;
    grid-row: 2;
    margin-bottom: 0;
  }

  .footer-contact {
    justify-self: center;
  }

  .footer-links {
    justify-self: end;
  }
}