
/* ==========================================
   BOX800 - NÁMSKEIÐ
   ========================================== */


/* ==========================================
   KYNNING
   ========================================== */

.course-hero {
  padding: 85px 24px 70px;
  text-align: center;
  color: #f5f6f7;

  background: radial-gradient(
    ellipse at 50% 100%,
    #303b47 0%,
    #12171c 42%,
    #090b0d 78%
  );
}

.course-eyebrow {
  color: #c6ccd6;
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  margin: 0;
}

.course-hero h1 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(54px, 9vw, 115px);
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.08;
  margin: 20px 0;
}

.course-intro {
  max-width: 600px;
  margin: 0 auto;
  color: #d3d7dd;
  font-family: "Inter", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}


/* ==========================================
   NÁMSKEIÐAHLUTI
   ========================================== */

.courses-section {
  background: #0b0b0b;
  color: #ffffff;
  padding: 75px 22px;
}

.courses-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.courses-section h2 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.015em;
  margin: 0 0 35px;
  color: #ffffff;
}


/* ==========================================
   GRID
   ========================================== */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}


/* ==========================================
   NÁMSKEIÐASPJÖLD
   ========================================== */

.course-card {
  display: flex;
  flex-direction: column;

  min-width: 0;
  min-height: 0;

  background: #202124;
  border: 1px solid #383d42;

  overflow: hidden;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.course-card:hover {
  transform: translateY(-4px);
  border-color: #c6ccd6;
}

.course-card.is-expanded {
  border-color: #c6ccd6;
}


/* ==========================================
   HEITI NÁMSKEIÐS
   ========================================== */

.course-card > h3 {
  order: 2;

  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.015em;

  color: #ffffff;

  margin: 24px 28px 0;
}


/* ==========================================
   MYNDIR
   ========================================== */

.course-image-wrap {
  order: 1;

  width: 100%;
  height: 230px;

  overflow: hidden;
  background: #15191d;
}

.course-image-wrap img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  transition: transform 0.35s ease;
}

.course-card:hover .course-image-wrap img {
  transform: scale(1.04);
}


/* ==========================================
   TEXTASVÆÐI
   ========================================== */

.course-content {
  order: 3;

  display: flex;
  flex-direction: column;
  flex: 1;

  width: 100%;
  min-width: 0;
  min-height: 0;

  padding: 15px 28px 28px;

  overflow: visible;
}

.course-short {
  color: #c6ccd6;

  font-family: "Inter", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;

  margin: 0 0 24px;
}


/* ==========================================
   TVEIR HNAPPAR HLIÐ VIÐ HLIÐ
   ========================================== */

.course-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

  gap: 10px;
  width: 100%;

  margin-top: 0;

  flex-shrink: 0;
}

.course-actions a,
.course-actions button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-width: 0;
  min-height: 48px;

  padding: 12px 8px;

  font-family: "Inter", Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.2px;

  text-align: center;
  text-decoration: none;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}


/* ==========================================
   LESA MEIRA
   ========================================== */

.course-read-btn {
  color: #ffffff;
  background: transparent;
  border: 1px solid #69727b;

  appearance: none;
  -webkit-appearance: none;
}

.course-read-btn:hover {
  background: #30363c;
  border-color: #c6ccd6;
}


/* ==========================================
   KAUPA NÁMSKEIÐ
   ========================================== */

.course-buy-btn {
  color: #111111;
  background: #c6ccd6;
  border: 1px solid #c6ccd6;
}

.course-buy-btn:hover {
  color: #111111;
  background: #ffffff;
  border-color: #ffffff;
}

.course-actions a:focus-visible,
.course-actions button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}


/* ==========================================
   ÍTARLEG LÝSING
   ========================================== */

.course-details-content {
  width: 100%;

  height: auto;
  max-height: none;
  min-height: 0;

  margin-top: 22px;
  padding-top: 20px;

  border-top: 1px solid #41474e;

  font-family: "Inter", Arial, sans-serif;

  overflow: visible;
  flex: none;
}

.course-details-content[hidden] {
  display: none !important;
}

.course-details-content p {
  color: #c6ccd6;
  font-size: 13px;
  line-height: 1.75;
  margin: 0 0 14px;
}

.course-details-content h4 {
  margin: 22px 0 12px;

  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.7px;
}

.course-details-content ul {
  padding-left: 19px;
  margin: 0 0 18px;
}

.course-details-content li {
  color: #c6ccd6;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.course-details-content .course-details-note {
  padding: 13px 15px;
  margin: 16px 0 0;

  background: #2b3036;
  border-left: 3px solid #c6ccd6;

  color: #ffffff;
  font-size: 12px;
  line-height: 1.7;
}


/* ==========================================
   TÖLVUR - HNAPPAR Í SÖMU HÆÐ
   ========================================== */

@media (min-width: 901px) {

  .courses-grid {
    align-items: stretch;
  }

  .course-card {
    height: auto;
    min-height: 0;
  }

  .course-content {
    display: flex;
    flex-direction: column;
    flex: 1;

    min-height: 0;
    overflow: visible;
  }

  /*
    Sama lágmarkshæð á stuttu
    lýsingunni í öllum spjöldum.
  */

  .course-short {
    min-height: 72px;
    margin-bottom: 18px;
  }

  /*
    Hnappar haldast á sínum stað.
    Ítarleg lýsing kemur fyrir neðan.
  */

  .course-actions {
    margin-top: 0;
    flex-shrink: 0;
  }

  /*
    Enginn lítill skrun-gluggi.
    Allur textinn birtist.
  */

  .course-details-content {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    flex: none;
  }

}


/* ==========================================
   SPJALDTÖLVUR
   ========================================== */

@media (max-width: 900px) {

  .courses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-image-wrap {
    height: 220px;
  }

}


/* ==========================================
   FARSÍMAR
   ========================================== */

@media (max-width: 600px) {

  .course-hero {
    padding: 55px 18px 50px;
  }

  .course-hero h1 {
    font-size: 60px;
  }

  .course-intro {
    font-size: 15px;
  }

  .courses-section {
    padding: 45px 16px;
  }

  .courses-section h2 {
    font-size: 38px;
    margin-bottom: 24px;
  }

  .courses-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }


  /* SPJÖLD */

  .course-card {
    display: flex;
    flex-direction: column;

    padding: 22px 18px 20px;
  }

  .course-card:hover {
    transform: none;
  }


  /* HEITI EFST */

  .course-card > h3 {
    order: 1;

    width: 100%;

    margin: 0 0 16px;

    font-size: 30px;
    line-height: 1.1;
    text-align: center;
  }


  /* LÍTIL MYND Í MIÐJU */

  .course-image-wrap {
    order: 2;

    width: 100%;

    height: auto;
    aspect-ratio: 16 / 10;
    min-height: 0;

    margin: 0 0 17px;

    overflow: hidden;
  }

  .course-image-wrap img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
  }

  .course-card:hover .course-image-wrap img {
    transform: none;
  }


  /* STUTT LÝSING */

  .course-content {
    order: 3;

    display: flex;
    flex-direction: column;

    width: 100%;
    padding: 0;
  }

  .course-short {
    min-height: 0;

    margin: 0 0 18px;

    color: #c6ccd6;

    font-size: 13px;
    line-height: 1.6;
    text-align: center;
  }


  /* HNAPPAR HLIÐ VIÐ HLIÐ */

  .course-actions {
    display: grid;

    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr);

    gap: 9px;

    width: 100%;
    margin: 0;
  }

  .course-actions a,
  .course-actions button {
    width: 100%;
    min-width: 0;

    min-height: 46px;

    padding: 10px 5px;

    font-size: 10px;
    line-height: 1.25;

    white-space: normal;
  }


  /* OPNUÐ LÝSING */

  .course-details-content {
    height: auto;
    max-height: none;

    margin-top: 20px;
    padding-top: 18px;

    overflow: visible;
  }

  .course-details-content p,
  .course-details-content li {
    font-size: 13px;
    line-height: 1.7;
  }

}


/* ==========================================
   MJÖG LITLIR SÍMAR
   ========================================== */

@media (max-width: 380px) {

  .course-card {
    padding: 20px 14px;
  }

  .course-card > h3 {
    font-size: 27px;
  }

  .course-actions {
    gap: 7px;
  }

  .course-actions a,
  .course-actions button {
    font-size: 9px;
    padding: 10px 4px;
  }

}


/* ==========================================
   MINNKA HREYFINGU EF ÓSKAÐ ER
   ========================================== */

@media (prefers-reduced-motion: reduce) {

  .course-card,
  .course-image-wrap img,
  .course-actions a,
  .course-actions button {
    transition: none;
  }

}
