/* ==================================================
   FORSIDE
   ================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #fffaf4;
  color: #000;
}

.home {
  background-color: #fffaf4;
  min-height: 100vh;
}

.home-hero {
  position: relative;
  min-height: 530px;
  overflow: hidden;
  background-color: #fff3e7;
  border-radius: 0 0 32px 32px;
}

.home-hero__logo {
  position: relative;
  z-index: 2;
  width: 135px;
  margin-top: 28px;
  margin-left: 32px;
}

.home-hero__content {
  position: relative;
  z-index: 2;
  width: 58%;
  margin-left: 32px;
  margin-top: 12px;
}

.home-hero__content h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 800;
  color: #000;
}

.home-hero__content p {
  margin: 14px 0 20px;
  font-size: 16px;
  line-height: 1.15;
  color: #000;
}

.home-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-btn {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 235px;
  min-height: 48px;
  padding: 0 16px;

  border-radius: 999px;

  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.hero-btn__icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.hero-btn__arrow {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.hero-btn--primary {
  background-color: #b51d17;
  color: #fff;
}

.hero-btn--secondary {
  background-color: transparent;
  color: #b51d17;
  border: 1.5px solid #b51d17;
}

.home-hero__image {
  position: absolute;
  z-index: 1;
  top: 0;
  right: -240px;
  height: 92%;
  width: auto;
  max-width: none;
}

/* ---------- Populære spil ---------- */

.popular-games {
  padding: 20px 16px 24px;
}

.popular-games__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.popular-games__header h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
  font-weight: 700;
}

.popular-games__link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #c91c16;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.popular-games__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.popular-card {
  min-width: 0;
  background-color: #f8eadc;
  border-radius: 16px;
  padding: 10px;
}

.popular-card__image-wrap {
  position: relative;
  width: 100%;
  height: 110px;
  overflow: hidden;
  border-radius: 10px;
  background: #f5ebdc;

  display: flex;
  align-items: center;
  justify-content: center;
}

.popular-card__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.popular-card__favorite {
  position: absolute;
  top: 8px;
  right: 8px;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #fff;
  color: #000;

  border: 1px solid #ddd;
  border-radius: 50%;

  padding: 0;

  font-size: 16px;
  line-height: 1;
  cursor: pointer;

  z-index: 2;
}

.popular-card__favorite.active {
  color: #b51d17;
  border-color: #b51d17;
}

.popular-card h3 {
  margin: 8px 0 5px;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 700;

  min-height: 32px;
}

.popular-card__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;

  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.popular-card__info span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* =========================================
   FIND DET RETTE SPIL
========================================= */

.game-finder {
  margin: 0 16px 24px;
  padding: 18px 16px;
  min-height: 110px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  background: #f4ded3;
  border-radius: 12px;
}

.game-finder__content {
  flex: 1;
}

.game-finder h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 800;
}

.game-finder p {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.3;
}

.game-finder__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 9px 14px;

  background: #b51f17;
  color: #fff;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.game-finder__illustration {
  flex-shrink: 0;
  width: 80px;

  font-size: 54px;
  text-align: center;

  margin-right: 35px;
}

/* ==================================================
   RESPONSIVT DESIGN
   ================================================== */

/* Tablet */
@media (min-width: 600px) {
  .home-hero {
    min-height: 460px;
  }

  .home-hero__logo {
    width: 135px;
    margin-top: 28px;
    margin-left: 48px;
  }

  .home-hero__content {
    width: 48%;
    margin-left: 48px;
    margin-top: 28px;
  }

  .home-hero__content h1 {
    font-size: 48px;
  }

  .home-hero__content p {
    font-size: 17px;
  }

  .home-hero__image {
    right: -100px;
    height: 100%;
  }

  .popular-games {
    padding: 28px 32px;
  }

  .popular-games__grid {
    gap: 16px;
  }

  .popular-card {
    padding: 14px;
  }

  .popular-card__image-wrap {
    height: 160px;
  }

  .popular-card h3 {
    font-size: 16px;
  }

  .popular-card__info {
    font-size: 13px;
  }

  .game-finder {
    margin: 0 32px 32px;
    padding: 24px 28px;
    min-height: 150px;
  }

  .game-finder h2 {
    font-size: 26px;
  }

  .game-finder p {
    font-size: 14px;
  }

  .game-finder__button {
    padding: 11px 18px;
    font-size: 14px;
  }

  .game-finder__illustration {
    width: 120px;
    font-size: 70px;
    margin-right: 45px;
  }
}

/* Større tablet / lille desktop */
@media (min-width: 900px) {
  .home-hero {
    min-height: 520px;
  }

  .home-hero__logo {
    width: 150px;
    margin-left: 48px;
    margin-top: 32px;
  }

  .home-hero__content {
    width: 44%;
    margin-left: 48px;
    margin-top: 28px;
  }

  .home-hero__content h1 {
    font-size: 54px;
  }

  .home-hero__content p {
    font-size: 17px;
    max-width: 340px;
  }

  .home-hero__image {
    right: 0;
    height: 100%;
  }

  .popular-games {
    padding: 32px 48px;
  }

  .popular-games__header h2 {
    font-size: 28px;
  }

  .popular-games__grid {
    gap: 18px;
  }

  .popular-card {
    padding: 16px;
  }

  .popular-card__image-wrap {
    height: 190px;
  }

  .popular-card h3 {
    font-size: 17px;
  }

  .popular-card__info {
    font-size: 14px;
  }

  .game-finder {
    margin: 0 48px 40px;
    padding: 28px 32px;
    min-height: 165px;
  }

  .game-finder h2 {
    font-size: 28px;
  }

  .game-finder p {
    font-size: 14px;
  }

  .game-finder__illustration {
    width: 140px;
    font-size: 76px;
    margin-right: 45px;
  }
}

/* =========================================
   DESKTOP – 1200PX+
========================================= */

@media (min-width: 1200px) {
  .popular-games,
  .game-finder {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }

  .popular-card__image-wrap {
    height: 280px;
  }

  .home-hero__logo {
    margin-left: 8%;
  }

  .home-hero__content {
    margin-left: 8%;
  }
}
