/* === JM Hero Banner — v1.0 === */

/* ── Container ── */
.jmhb {
  position: relative;
  display: flex;
  align-items: flex-end;        /* desktop: content at bottom */
  justify-content: center;
  min-height: var(--jmhb-min-h, 555px);
  overflow: hidden;
  width: 100%;
}

/* ── Background image ── */
.jmhb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* ── Overlay gradient ── */
.jmhb__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Desktop: dark gradient from bottom */
  background: linear-gradient(to top, rgb(0, 0, 0) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: var(--jmhb-overlay-opacity, 0.40);
  pointer-events: none;
}

/* ── Content wrapper ── */
.jmhb__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 40px 24px;
  box-sizing: border-box;
  gap: 20px;
}

/* ── Heading ── */
.jmhb__heading {
  margin: 0;
  text-align: var(--jmhb-h-align, center);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--jmhb-h-gap, 8px);
}

.jmhb__line {
  display: block;
  font-size: var(--jmhb-line-fs, 24px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* ── Buttons ── */
.jmhb__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--jmhb-btn-gap, 10px);
  justify-content: var(--jmhb-btn-align, center);
  align-items: center;
}

.jmhb__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--jmhb-btn-py, 10px) var(--jmhb-btn-px, 20px);
  border-radius: var(--jmhb-btn-radius, 12px);
  background: var(--jmhb-btn-bg, #8e7140);
  color: var(--jmhb-btn-color, #fff) !important;
  font-size: var(--jmhb-btn-fs, 18px);
  font-weight: var(--jmhb-btn-fw, 600);
  line-height: 1.2;
  text-decoration: none !important;
  border: 1px solid var(--jmhb-btn-bg, #8e7140);
  box-sizing: border-box;
  transition: transform 0.14s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  will-change: transform, box-shadow, background-color;
  text-align: center;
}

.jmhb__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  background: var(--jmhb-btn-hover-bg, var(--jmhb-btn-bg, #8e7140));
  border-color: var(--jmhb-btn-hover-bg, var(--jmhb-btn-bg, #8e7140));
  color: var(--jmhb-btn-color, #fff) !important;
}

.jmhb__btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* ══════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .jmhb {
    min-height: var(--jmhb-min-h-m, 500px);
    /* Mobile: content spreads top-to-bottom */
    align-items: stretch;
  }

  /* Flip the overlay gradient: dark at the top on mobile */
  .jmhb__overlay {
    background: linear-gradient(to bottom, rgb(0, 0, 0) 0%, rgba(255, 255, 255, 0) 60%);
  }

  .jmhb__content {
    justify-content: space-between;
    min-height: var(--jmhb-min-h-m, 500px);
    padding: var(--jmhb-m-top-pad, 60px) 20px 32px;
  }

  /* Use mobile font sizes */
  .jmhb__line {
    font-size: var(--jmhb-line-fs-m, 20px);
  }

  .jmhb__btn {
    font-size: var(--jmhb-btn-fs-m, 17px);
  }

  /* Stack buttons on very small screens */
  .jmhb__buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .jmhb__btn {
    width: 100%;
  }
}
