/* =========================================================
   SNEDKER-PROJEKTER – SIDEKOMPONENTER
   ========================================================= */

/* =========================================================
   SEKTION 1 – Projektgalleri
   Shortcode: [ng_project_gallery]
   Placering: Snedker-projekter → hele siden
   Elementor widget-id (oprindelig): 615d453
   ========================================================= */
.project-gallery-page {
  font-family: "Times New Roman", Times, serif;
  color: #021326;
  overflow-x: hidden;
}

.gallery-hero,
.gallery-section {
  width: 100vw;

  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ================================
   HERO
================================ */

.gallery-hero {
  position: relative;
  min-height: 540px;
  background-image: url("https://nielsgroth.dk/wp-content/uploads/2026/05/120e8bb3-f71c-4a21-9d4c-f9c3a6499fdc_2_90_0_0_4920_3280_1920_1280_40914f3e.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 24px;
  overflow: hidden;
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(2, 19, 38, 0.42),
    rgba(2, 19, 38, 0.76)
  );
  z-index: 1;
}

.gallery-hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  text-align: center;
  color: #fff;
}

.gallery-kicker {
  display: inline-block;
  margin-bottom: 18px;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #e3c19c;
  font-weight: 700;
}

.gallery-hero h1 {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.95;
  font-weight: 700;
  color: #fff;
}

.gallery-hero p {
  max-width: 660px;
  margin: 24px auto 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

/* ================================
   GALLERY SECTION
================================ */

.gallery-section {
  background: #f7f5f1;
  padding: 110px 24px 120px;
}

.gallery-inner {
  width: min(1400px, 100%);
  margin: 0 auto;
}

.gallery-heading-row {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 42px;
}

.subpage-label {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(118, 82, 56, 0.10);
  color: #765238;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.gallery-heading-row h2 {
  margin: 0;
  max-width: 620px;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(38px, 4vw, 64px);
  line-height: 0.98;
  color: #004073;
  font-weight: 700;
}

.gallery-heading-row p {
  max-width: 620px;
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.8;
  color: #19324a;
}

/* ================================
   FILTERS
================================ */

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.gallery-filter {
  appearance: none;
  border: 1px solid rgba(2, 19, 38, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: #19324a;
  border-radius: 999px;
  padding: 11px 16px;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gallery-filter:hover,
.gallery-filter.active {
  background: #071D2E;
  color: #fff;
  border-color: #071D2E;
}

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

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 240px;
  gap: 18px;
}

.project-gallery-item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  background: #ddd;
  cursor: pointer;
  box-shadow: 0 22px 48px rgba(2, 19, 38, 0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.25s ease;
}

.project-gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.project-gallery-item.wide {
  grid-column: span 2;
}

.project-gallery-item.tall {
  grid-row: span 2;
}

.project-gallery-item img,
.project-gallery-item video {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s ease, filter 0.35s ease;
}

.project-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(2, 19, 38, 0.2);
}

.project-gallery-item:hover img,
.project-gallery-item:hover video {
  transform: scale(1.06);
  filter: brightness(0.78);
}

.project-gallery-item.video-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(2, 19, 38, 0.04),
    rgba(2, 19, 38, 0.34)
  );
  pointer-events: none;
}

.gallery-play-icon {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(247, 245, 241, 0.92);
  color: #004073;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, background 0.25s ease;
}

.project-gallery-item:hover .gallery-play-icon {
  transform: scale(1.08);
  background: #fff;
}

.gallery-item-overlay {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.35s ease;
}

.project-gallery-item:hover .gallery-item-overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item-overlay span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(247, 245, 241, 0.96);
  color: #765238;
  font-family: "Times New Roman", Times, serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.gallery-item-overlay strong {
  color: #fff;
  font-family: "Times New Roman", Times, serif;
  font-size: 26px;
  line-height: 1.05;
  text-align: left;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.35);
}

.project-gallery-item.is-hidden {
  display: none;
}

/* ================================
   LIGHTBOX
================================ */

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: rgba(2, 19, 38, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.project-lightbox.is-open {
  display: flex;
}

.lightbox-content {
  position: relative;
  width: min(1100px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-media {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-image,
.lightbox-video {
  width: auto;
  max-width: 100%;
  max-height: 76vh;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  background: #111;
}

.lightbox-video {
  width: min(100%, 1100px);
}

.lightbox-caption {
  margin-top: 18px;
  text-align: center;
  color: #fff;
}

.lightbox-category {
  display: inline-block;
  margin-bottom: 8px;
  font-family: "Times New Roman", Times, serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e3c19c;
}

.lightbox-title {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  color: #fff;
}

.lightbox-close,
.lightbox-arrow {
  appearance: none;
  border: none;
  cursor: pointer;
  color: #fff;
  transition: all 0.25s ease;
}

.lightbox-close {
  position: fixed;
  top: 26px;
  right: 30px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 38px;
  line-height: 1;
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  font-size: 28px;
}

.lightbox-prev {
  left: 32px;
}

.lightbox-next {
  right: 32px;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: #004073;
  transform: scale(1.05);
}

.lightbox-arrow:hover {
  transform: translateY(-50%) scale(1.05);
}

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

@media (max-width: 1180px) {
  .project-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .gallery-heading-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 230px;
  }
}

@media (max-width: 767px) {
  .gallery-hero {
    min-height: 440px;
    padding: 100px 20px 80px;
  }

  .gallery-hero h1 {
    font-size: clamp(40px, 12vw, 54px);
  }

  .gallery-hero p {
    font-size: 15px;
    line-height: 1.6;
  }

  .gallery-section {
    padding: 75px 20px 80px;
  }

  .gallery-heading-row {
    margin-bottom: 32px;
  }

  .gallery-heading-row h2 {
    font-size: 38px;
  }

  .gallery-heading-row p {
    font-size: 15px;
  }

  .gallery-filters {
    gap: 8px;
    margin-bottom: 26px;
  }

  .gallery-filter {
    padding: 10px 13px;
    font-size: 12px;
  }

  .project-gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 16px;
  }

  .project-gallery-item,
  .project-gallery-item.large,
  .project-gallery-item.wide,
  .project-gallery-item.tall {
    grid-column: span 1;
    grid-row: span 1;
    height: 320px;
  }

  .gallery-item-overlay {
    opacity: 1;
    transform: none;
    inset: auto 14px 14px 14px;
  }

  .gallery-item-overlay strong {
    font-size: 23px;
  }

  .gallery-play-icon {
    width: 46px;
    height: 46px;
    font-size: 16px;
    top: 14px;
    right: 14px;
  }

  .project-lightbox {
    padding: 22px;
  }

  .lightbox-image,
  .lightbox-video {
    max-height: 68vh;
  }

  .lightbox-close {
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    font-size: 32px;
  }

  .lightbox-arrow {
    top: auto;
    bottom: 24px;
    width: 46px;
    height: 46px;
    font-size: 24px;
    transform: none;
  }

  .lightbox-prev {
    left: 24px;
  }

  .lightbox-next {
    right: 24px;
  }

  .lightbox-arrow:hover {
    transform: scale(1.05);
  }

  .lightbox-caption {
    margin-bottom: 58px;
  }
}
