/* Journey Home */
.jh {
  position: relative;
  width: 100%;
}

/* Two Column Grid */
.jh-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  align-items: stretch;
}

/* Tablet: keep the grid stacked (copy above, cards below) but widen the
   gap. The 2-col side layout (copy-left/cards-right) doesn't kick in here
   because at tablet widths the cards-right column would force the cards to
   stack inside it — which is the layout we explicitly don't want. */
@media (min-width: 768px) and (max-width: 1023px) {
  .jh-grid {
    gap: var(--space-2xl);
  }
}

/* Desktop: switch to 2-col layout (copy left, cards row right). */
@media (min-width: 1024px) {
  .jh-grid {
    flex-direction: row;
    gap: var(--space-2xl);
    align-items: center;
  }
}

/* Left Column: Copy */
.jh-copy {
  width: 100%;
}

@media (min-width: 1024px) {
  .jh-copy {
    flex: 1;
    min-width: 0;
  }
}

/* Scroll Animation */
.jh-copy,
.jh-cards {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.jh.is-visible .jh-copy {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.jh.is-visible .jh-cards {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}

/* Copy Typography */
.jh-heading {
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  line-height: 1.2;
  hyphens: none;
}

.jh-subhead {
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  line-height: 1.6;
  white-space: pre-line;
  hyphens: none;
}

.jh-body {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.7;
  white-space: pre-line;
  hyphens: none;
}

/* Heading/subhead/body are richtext blocks rendered into a .rte wrapper;
   strip the inner element's default margins so the layout stays tight. */
.jh-heading > :last-child,
.jh-subhead > :last-child,
.jh-body > :last-child {
  margin: 0;
}

/* Right Column: Cards */
.jh-cards {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Tablet: cards go side-by-side (with copy now stacked above them rather
   than to the left). Cards never stack while there's still 2-col room to
   place them. */
@media (min-width: 768px) and (max-width: 1023px) {
  .jh-cards {
    flex-direction: row;
    gap: var(--space-lg);
    align-items: stretch;
  }
}

/* Desktop: cards side-by-side */
@media (min-width: 1024px) {
  .jh-cards {
    flex: 1;
    min-width: 0;
    flex-direction: row;
    gap: var(--space-lg);
  }
}

/* Card */
.jh-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  flex: 1;
  overflow: hidden;
}

.jh-card-image-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .jh-card-image-wrapper {
    height: 200px;
  }
}

@media (min-width: 1024px) {
  .jh-card-image-wrapper {
    height: 240px;
  }
}

.jh-card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.jh-card-content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.jh-card-heading {
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  line-height: 1.3;
  letter-spacing: 0.05em;
  hyphens: none;
}

.jh-card-body {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.6;
  white-space: pre-line;
  hyphens: none;
  flex: 1;
}

.jh-card-button {
  margin-top: var(--space-md);
}

.jh-card-button .btn {
  cursor: pointer;
}

/* Touch target: ensure buttons meet 44px minimum on mobile/tablet */
@media (max-width: 1023px) {
  .jh-card-button .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
