/*
 * Løpefest – ny artikkel-seksjon + bildegalleri (append nederst på page 3021).
 * Stiler scopet under .lopefest-extra for å ikke kollidere med eksisterende
 * inline-HTML i post_content (.budor-hero-wrap, .budor-stats-strip osv.) eller
 * Uncode-temaet.
 *
 * Fargepalett matcher Fjellhytta: #0d3984 / #93c119 / #f38d00.
 */

.lopefest-extra {
  --lf-blue: #0d3984;
  --lf-lime: #93c119;
  --lf-orange: #f38d00;
  --lf-grey: #f7f7f7;
  --lf-text: #303133;
  --lf-muted: #7a7d80;
  color: var(--lf-text);
  font-size: 16px;
  line-height: 1.6;
}
.lopefest-extra *,
.lopefest-extra *::before,
.lopefest-extra *::after { box-sizing: border-box; }
.lopefest-extra img { display: block; max-width: 100%; }

.lopefest-extra .lopefest-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ARTIKKEL-SEKSJON */
.lopefest-articles {
  background: #fff;
  padding: 64px 0;
}
.lopefest-articles__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 38px;
}
.lopefest-articles__title {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 800;
  color: var(--lf-blue);
  margin: 0 0 6px;
  line-height: 1.2;
}
.lopefest-articles__subtitle {
  margin: 0;
  font-weight: 400;
  color: var(--lf-muted);
}
.lopefest-articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.lopefest-extra .lopefest-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(20, 22, 24, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lopefest-extra .lopefest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 22, 24, .10);
}
.lopefest-extra .lopefest-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.lopefest-extra .lopefest-card__media {
  aspect-ratio: 4 / 3;
  background: var(--lf-grey);
  overflow: hidden;
}
.lopefest-extra .lopefest-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.lopefest-extra .lopefest-card__media--placeholder {
  background:
    linear-gradient(135deg, var(--lf-blue) 0%, #1b4ea0 60%, var(--lf-lime) 100%);
}
.lopefest-extra .lopefest-card__body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.lopefest-extra .lopefest-card__title {
  font-size: 19px;
  font-weight: 800;
  color: var(--lf-blue);
  margin: 0 0 8px;
  line-height: 1.3;
}
.lopefest-extra .lopefest-card__excerpt {
  font-size: 15px;
  color: var(--lf-text);
  margin: 0 0 16px;
  flex: 1;
}
.lopefest-extra .lopefest-card__cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--lf-blue);
  letter-spacing: .2px;
}
.lopefest-extra .lopefest-card__link:hover .lopefest-card__cta {
  text-decoration: underline;
}

/* GALLERI */
.lopefest-gallery {
  background: var(--lf-grey);
  padding: 64px 0;
}
.lopefest-gallery__head {
  text-align: center;
  margin-bottom: 32px;
}
.lopefest-gallery__title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--lf-blue);
  margin: 0;
  line-height: 1.2;
}
.lopefest-gallery__grid {
  display: grid;
  gap: 14px;
}
.lopefest-gallery__grid--1 { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }
.lopefest-gallery__grid--2 { grid-template-columns: repeat(2, 1fr); }
.lopefest-gallery__grid--3 { grid-template-columns: repeat(3, 1fr); }
.lopefest-gallery__grid--4 { grid-template-columns: repeat(4, 1fr); }
.lopefest-gallery__grid--5,
.lopefest-gallery__grid--6 { grid-template-columns: repeat(3, 1fr); }

.lopefest-extra .lopefest-gallery__item {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: #e9eaec;
}
.lopefest-extra .lopefest-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}
.lopefest-extra .lopefest-gallery__item:hover img {
  transform: scale(1.03);
}

@media (max-width: 900px) {
  .lopefest-articles { padding: 48px 0; }
  .lopefest-gallery { padding: 48px 0; }
  .lopefest-articles__grid { grid-template-columns: 1fr; }
  .lopefest-gallery__grid--3,
  .lopefest-gallery__grid--4,
  .lopefest-gallery__grid--5,
  .lopefest-gallery__grid--6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .lopefest-gallery__grid--2,
  .lopefest-gallery__grid--3,
  .lopefest-gallery__grid--4,
  .lopefest-gallery__grid--5,
  .lopefest-gallery__grid--6 { grid-template-columns: 1fr; }
}
