/* ==========================================================================
   Learnings Section — Entrance & Parallax Animations
   Campus Almkerk
   ========================================================================== */

/* Initial hidden state for all cards */
.learning-column {
  grid-row-gap: 100px;

}

.learnings-columns-wrapper {

  width: 100vw;
  max-width: 1200px;
  display: flex;
  align-items: stretch;
  grid-column-gap: 32px;

}

.learnings-central-image {
  position: absolute;
  bottom: 0;
  max-height: 95vh;
  object-fit: contain;
 
  width: 70vw;
  max-width: 850px;
  z-index: 0;
}

.learning-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, scale 0.3s ease-in-out;
  will-change: opacity, transform, scale;
  backface-visibility: hidden;
  padding: 1.5em 1em 1.5em 1.5em;
  background-color: #ebe9dcef;
  border-radius: 16px;
  box-shadow: 5px 5px 40px 0px #00000025;
  width: 80%;
  z-index: 25;
  scale: 1;
}

.learning-card:hover {
  scale: 0.95;
}




.learning-card.is-visible {
  opacity: 1;
}

/* Show cards normally inside the Breakdance editor */
.bde-is-editor .learning-card {
  opacity: 1;
  transform: none;
}

.learning-card h3 {
  color: #305538;
  padding-bottom: 4px;
}

.learning-card .bde-text {
  color: #000;
}

.learning-card.left-1,
.learning-card.right-2,
.learning-card.left-3 {
  align-self: flex-end;
}

.learning-card.right-1,
.learning-card.left-2,
.learning-card.right-3 {
  align-self: flex-start;
}


/* Entrance fade stagger — top-to-bottom per column.
   Only the opacity transition is delayed, not the transform. */
.learning-card.left-1,
.learning-card.right-1 {
  transition: opacity 0.5s ease 0s, scale 0.3s ease-in-out;
}

.learning-card.left-2,
.learning-card.right-2 {
  transition: opacity 0.5s ease 0.15s, scale 0.3s ease-in-out;
}

.learning-card.left-3,
.learning-card.right-3 {
  transition: opacity 0.5s ease 0.3s, scale 0.3s ease-in-out;
}

/* --------------------------------------------------------------------------
   Tablet landscape — max 1119px
   Tighten gaps and shrink image slightly
   -------------------------------------------------------------------------- */

/* ==========================================================================
   Responsive Breakpoints — Campus Almkerk Learnings Section
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tablet landscape — max-width: 1119px
   Tighten gaps and shrink image slightly
   -------------------------------------------------------------------------- */
@media (max-width: 1119px) {
  .learnings-columns-wrapper {
    max-width: 960px;
    grid-column-gap: 20px;
  }

  .learnings-central-image {
    width: 60vw;
    max-width: 680px;
  }

  .learning-column {
    grid-row-gap: 72px;
  }

  .learning-card {
    width: 85%;
  }
}

/* --------------------------------------------------------------------------
   Tablet portrait — max-width: 1023px
   Image on top at 85% width, all cards stacked vertically centered below
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .learnings-section .section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px 60px;
    position: relative;
    overflow: visible;
  }

  .learnings-central-image {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: 85%;
    max-width: 100%;
    max-height: none;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
    margin-bottom: 40px;
    object-fit: contain;
  }

 @media (max-width: 1023px) {
  .learnings-columns-wrapper {
    flex-direction: column;
    align-items: center;
    max-width: 560px;
    width: 100%;
    gap: 20px;
  }

  /* Each column becomes a full-width vertical strip */
  .learning-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 20px;
    grid-row-gap: 20px;
  }

  /* Override ALL align-self variations so nothing floats left or right */
  .learning-card.left-1,
  .learning-card.left-2,
  .learning-card.left-3,
  .learning-card.right-1,
  .learning-card.right-2,
  .learning-card.right-3 {
    align-self: center !important;
    width: 100% !important;
  }
}
}

/* --------------------------------------------------------------------------
   Mobile landscape — max-width: 767px
   Same vertical stack, tighter spacing
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .learnings-section .section-container {
    padding: 40px 20px 48px;
  }

  .learnings-columns-wrapper {
    max-width: 480px;
    gap: 16px;
  }

  .learning-column {
    gap: 16px;
    grid-row-gap: 16px;
  }

  .learning-card {
    padding: 1.2em 1em;
  }

  .learning-card h3 {
    font-size: 1.1em;
  }

  .learning-card .bde-text {
    font-size: 0.85em;
  }

  .learnings-central-image {
    width: 85%;
    margin-bottom: 32px;
  }
}

/* --------------------------------------------------------------------------
   Mobile portrait — max-width: 479px
   Single column, compact padding, snappier animation stagger
   -------------------------------------------------------------------------- */
@media (max-width: 479px) {
  .learnings-section .section-container {
    padding: 32px 16px 40px;
  }

  .learnings-columns-wrapper {
    max-width: 100%;
    gap: 14px;
  }

  .learning-column {
    gap: 14px;
    grid-row-gap: 14px;
  }

  .learning-card {
    padding: 1.1em 1em;
    border-radius: 12px;
  }

  .learning-card h3 {
    font-size: 0.9em;
    padding-bottom: 3px;
  }

  .learning-card .bde-text {
    font-size: 0.82em;
    line-height: 1.5;
  }

  .learnings-central-image {
    width: 85%;
    margin-bottom: 28px;
  }

  /* Snappier stagger on small screens */
  .learning-card.left-2,
  .learning-card.right-2 {
    transition: opacity 0.4s ease 0.1s, scale 0.3s ease-in-out;
  }

  .learning-card.left-3,
  .learning-card.right-3 {
    transition: opacity 0.4s ease 0.2s, scale 0.3s ease-in-out;
  }
}

@media (prefers-reduced-motion: reduce) {
  .learning-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}