/* =========================================================
   🧱 UNDERSIDA-KORT (GRID / WRAPPER)
   ---------------------------------------------------------
   Layout för alla undersida-kort
   ========================================================= */

.undersidor-kort-wrapper {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin: var(--spacing-md) 0;
  justify-content: flex-start;
}


/* =========================================================
   🧱 ENSKILT KORT
   ---------------------------------------------------------
   Själva kortets design (bild + hover + form)
   ========================================================= */

.underside-kort {
  flex: 0 0 calc(16.666% - var(--spacing-sm));
  max-width: calc(16.666% - var(--spacing-sm));
  height: 100px;

  background-size: cover;
  background-position: center;

  border-radius: var(--radius-md);
  position: relative;
  text-decoration: none;
  color: var(--color-bg);

  box-shadow: var(--shadow-sm);
  overflow: hidden;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


/* =========================================================
   ✨ HOVER EFFECT
   ---------------------------------------------------------
   Lätt lyft + djup för bättre UX
   ========================================================= */

.underside-kort:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}


/* =========================================================
   👁️ DOLDA KORT (visa fler)
   ---------------------------------------------------------
   Används när kort ska döljas initialt
   ========================================================= */

.underside-kort.hidden-undersida {
  display: none;
  opacity: 0;
}


/* =========================================================
   🏷️ TITEL OVERLAY
   ---------------------------------------------------------
   Gradient + text ovanpå bild
   ========================================================= */

.underside-titel {
  position: absolute;
  bottom: 0;
  width: 100%;

  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);

  padding: var(--spacing-xs) var(--spacing-sm);

  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.3;

  color: var(--color-bg);

  backdrop-filter: blur(2px);
}


/* =========================================================
   📱 RESPONSIVITET – TABLET
   ---------------------------------------------------------
   3 kolumner istället för 6
   ========================================================= */

@media (max-width: 1023px) {
  .underside-kort {
    flex: 0 0 calc(33.333% - var(--spacing-sm));
    max-width: calc(33.333% - var(--spacing-sm));
    height: 100px;
  }
}


/* =========================================================
   📱 RESPONSIVITET – MOBIL
   ---------------------------------------------------------
   2 kolumner + sista fullbredd
   ========================================================= */

@media (max-width: 600px) {
  .underside-kort {
    flex: 0 0 calc(50% - var(--spacing-xs));
    max-width: calc(50% - var(--spacing-xs));
    height: 90px;
  }

  .underside-kort:nth-last-child(1):nth-child(odd) {
    flex-basis: 100%;
    max-width: 100%;
  }
}


/* =========================================================
   🔘 VISA-FLER KNAPP
   ---------------------------------------------------------
   CTA kopplad till undersida-kort
   ========================================================= */

.visa-fler-wrapper {
  text-align: center;
  margin-top: var(--spacing-lg);
}

.visa-fler-knapp {
  display: inline-block;

  background: var(--color-accent);
  color: var(--color-bg);

  padding: var(--spacing-sm) var(--spacing-md);

  border: none;
  border-radius: var(--radius-sm);

  font-weight: 600;
  font-family: var(--font-body);

  cursor: pointer;

  transition: background 0.3s ease, transform 0.2s ease;
}


/* =========================================================
   🔘 HOVER – KNAPP
   ---------------------------------------------------------
   Liten interaktion + tydlighet
   ========================================================= */

.visa-fler-knapp:hover {
  transform: translateY(-1px);
  filter: brightness(0.9);
}