/* =========================================================
   PROJEKTER - HERO
========================================================= */

.projects-page-hero {
  position: relative;

  padding: 80px 8% 55px;

  background: var(--background);

  text-align: center;

  overflow: hidden;
}

.projects-page-hero__eyebrow {
  margin-bottom: 20px;

  color: var(--accent);

  font-family: var(--font-primary);
  font-size: var(--eyebrow-size);
  font-weight: var(--eyebrow-weight);
  letter-spacing: var(--eyebrow-spacing);

  text-transform: uppercase;
}

.projects-page-hero h1 {
  max-width: 760px;

  margin: 0 auto;

  color: var(--text);

  font-family: "Manrope", sans-serif;
  font-size: clamp(3.8rem, 6vw, 6.2rem);
  font-weight: 700;

  line-height: 0.98;
  letter-spacing: -0.055em;
}

.projects-page-hero__line {
  width: 46px;
  height: 1px;

  margin: 34px auto 28px;

  background: var(--accent);
}

.projects-page-hero__text {
  max-width: 650px;

  margin: 0 auto;

  color: var(--text-soft);

  font-size: 1.05rem;
  line-height: 1.8;
}

/* =========================================================
   PROJEKTFILTER
========================================================= */

.projects-filter {
  padding: 0 8% 60px;

  background: var(--background);
}

.projects-filter__inner {
  display: flex;

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

  flex-wrap: wrap;

  gap: 12px;

  max-width: 1240px;

  margin: 0 auto;
}

.projects-filter__button {
  padding: 10px 18px;

  background: transparent;

  color: var(--text-soft);

  border: 1px solid var(--border);
  border-radius: 999px;

  font-family: var(--font-primary);

  font-size: 0.82rem;
  font-weight: 600;

  cursor: pointer;

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

.projects-filter__button:hover {
  color: var(--accent);

  border-color: var(--accent);
}

.projects-filter__button.is-active {
  background: var(--accent);

  color: #ffffff;

  border-color: var(--accent);
}

/* =========================================================
   PROJEKTOMRÅDE
========================================================= */

.projects-area {
  width: 100%;

  padding: 70px 8% 100px;

  background: var(--background);

  border-top: 1px solid var(--border);
}

.projects-grid {
  display: grid;

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

  gap: 32px;

  width: 100%;
  max-width: 1240px;

  margin: 0 auto;
}

/* =========================================================
   PROJEKTKORT
========================================================= */

.project-card {
  display: flex;

  flex-direction: column;

  width: 100%;

  overflow: hidden;

  background: var(--background);

  border: 1px solid var(--border);
  border-radius: 30px;

  box-shadow: 0 10px 30px rgba(44, 35, 31, 0.035);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);

  box-shadow: 0 18px 40px rgba(44, 35, 31, 0.07);
}

/* =========================================================
   BILLEDFELT
========================================================= */

.project-card__image {
  position: relative;

  display: flex;

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

  width: 100%;
  height: 320px;

  padding: 28px;

  background: var(--surface);

  overflow: hidden;
}

/*
  VIGTIG:
  Billedet får IKKE width: 85%.
  Det må i stedet fylde så meget som muligt,
  uden at blive beskåret.
*/

.project-card__image img {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 100%;

  margin: auto;

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

/* =========================================================
   INDHOLD
========================================================= */

.project-card__content {
  display: flex;

  flex-direction: column;

  flex: 1;

  width: 100%;

  padding: 28px 30px 32px;

  background: var(--background);
}

/* ---------- TOP ---------- */

.project-card__top {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 20px;

  margin-bottom: 18px;
}

.project-card__number {
  color: var(--accent);

  font-family: var(--font-display);

  font-size: 2rem;
  font-style: italic;

  line-height: 1;
}

.project-card__category {
  flex-shrink: 0;

  padding: 7px 11px;

  background: #eef3f8;

  color: var(--accent);

  border-radius: 999px;

  font-size: 0.7rem;
  font-weight: 700;

  letter-spacing: 1px;

  text-transform: uppercase;
}

/* ---------- OVERSKRIFT ---------- */

.project-card h2 {
  margin-bottom: 14px;

  color: var(--text);

  font-family: var(--font-primary);

  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  font-weight: 700;

  line-height: 1.08;
  letter-spacing: -0.04em;
}

/* ---------- BESKRIVELSE ---------- */

.project-card__description {
  margin-bottom: 22px;

  color: var(--text-soft);

  font-size: 0.95rem;

  line-height: 1.7;
}

/* =========================================================
   TAGS
========================================================= */

.project-card__tags {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin: 0 0 24px;

  padding: 0;

  list-style: none;
}

.project-card__tags li {
  padding: 7px 12px;

  background: #eef3f8;

  color: var(--text);

  border-radius: 999px;

  font-size: 0.75rem;
  font-weight: 600;
}

/* =========================================================
   KNAPPER
========================================================= */

.project-card__actions {
  display: flex;

  align-items: center;

  flex-wrap: wrap;

  gap: 22px;

  margin-top: auto;
}

/* ---------- PRIMÆR KNAP ---------- */

.project-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content; /* eller width: auto; */

  padding: 13px 20px;

  background: var(--accent);
  color: #fff;

  border: none;
  border-radius: 999px;

  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;

  text-decoration: none;
  cursor: pointer;

  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.project-card__button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

/* ---------- SEKUNDÆRT LINK ---------- */

.project-card__link {
  position: relative;

  color: var(--text);

  font-size: 0.88rem;
  font-weight: 600;

  text-decoration: none;
}

.project-card__link::after {
  content: "";

  position: absolute;

  right: 0;
  bottom: -5px;
  left: 0;

  height: 1px;

  background: var(--accent);

  transform: scaleX(0.35);

  transform-origin: left;

  transition: transform 0.3s ease;
}

.project-card__link:hover::after {
  transform: scaleX(1);
}

/* =========================================================
   CARLSBERG GALLERI
========================================================= */

.project-gallery {
  position: fixed;
  inset: 0;

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

  padding: 40px 90px;

  background: rgba(32, 29, 27, 0.92);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;

  z-index: 99999;
}

.project-gallery.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- INDHOLD ---------- */

.project-gallery__content {
  width: min(1050px, 100%);
}

.project-gallery__header {
  display: flex;
  justify-content: space-between;
  align-items: end;

  gap: 30px;

  margin-bottom: 18px;
}

.project-gallery__eyebrow {
  margin-bottom: 6px;

  color: #a7bedc;

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 2px;
  text-transform: uppercase;
}

.project-gallery__header h2 {
  margin: 0;

  color: #ffffff;

  font-family: var(--font-primary);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;

  letter-spacing: -0.04em;
}

.project-gallery__counter {
  color: rgba(255, 255, 255, 0.65);

  font-size: 0.85rem;
}

/* ---------- BILLEDE ---------- */

.project-gallery__image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  height: min(68vh, 700px);

  padding: 30px;

  background: #f7f3ed;

  border-radius: 24px;

  overflow: hidden;
}

.project-gallery__image-wrapper img {
  display: block;

  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.project-gallery__caption {
  margin-top: 14px;

  color: rgba(255, 255, 255, 0.72);

  font-size: 0.86rem;
}

/* ---------- LUK ---------- */

.project-gallery__close {
  position: absolute;

  top: 28px;
  right: 35px;

  width: 48px;
  height: 48px;

  background: transparent;

  color: #ffffff;

  border: 0;

  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;
}

/* ---------- PILE ---------- */

.project-gallery__arrow {
  position: absolute;
  top: 50%;

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

  width: 50px;
  height: 50px;

  background: rgba(255, 255, 255, 0.1);

  color: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;

  font-size: 1.3rem;

  cursor: pointer;

  transform: translateY(-50%);

  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.project-gallery__arrow:hover {
  background: rgba(255, 255, 255, 0.18);

  transform: translateY(-50%) scale(1.05);
}

.project-gallery__arrow--prev {
  left: 25px;
}

.project-gallery__arrow--next {
  right: 25px;
}

/* ==========================================
   DEKORATIVE ORGANISKE FORMER - HERO
========================================== */

.projects-page-hero::before,
.projects-page-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: blur(1px);
}

.projects-page-hero::before {
  width: 170px;
  height: 170px;
  background: #eef3f8; /* lyseblå */
  border-radius: 58% 42% 64% 36% / 39% 58% 42% 61%;
  left: 55px;
  bottom: 55px;
  opacity: 0.9;
}

.projects-page-hero::after {
  width: 115px;
  height: 115px;
  background: #f8f2e8; /* creme */
  border-radius: 64% 36% 47% 53% / 54% 42% 58% 46%;
  right: 95px;
  bottom: 85px;
  opacity: 0.95;
}

/* =========================================================
   GALLERI - MOBIL
========================================================= */

@media (max-width: 700px) {
  .project-gallery {
    padding: 70px 18px 25px;
  }

  .project-gallery__image-wrapper {
    height: 60vh;

    padding: 18px;
  }

  .project-gallery__header {
    align-items: center;
  }

  .project-gallery__arrow {
    top: auto;
    bottom: 25px;

    transform: none;
  }

  .project-gallery__arrow:hover {
    transform: scale(1.05);
  }

  .project-gallery__arrow--prev {
    left: calc(50% - 65px);
  }

  .project-gallery__arrow--next {
    right: calc(50% - 65px);
  }

  .project-gallery__caption {
    padding-bottom: 70px;
  }

  .project-gallery__close {
    top: 15px;
    right: 15px;
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 850px) {
  .projects-page-hero {
    padding: 65px 6% 45px;
  }

  .projects-filter {
    padding: 0 6% 50px;
  }

  .projects-area {
    padding: 60px 6% 80px;
  }

  .projects-grid {
    grid-template-columns: 1fr;

    gap: 28px;
  }

  .project-card__image {
    height: 300px;

    padding: 24px;
  }
}

@media (max-width: 550px) {
  .projects-page-hero h1 {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .project-card__image {
    height: 240px;

    padding: 18px;
  }

  .project-card__content {
    padding: 24px 22px 28px;
  }
}
