/* ---------------------------------------------------------------------------
   Homepage hero section
   A full-width navy band (matching the social share / og-image card) that
   holds the logo, tagline, latest-release badge and primary call-to-action
   buttons. The negative horizontal margins make the band span the full width
   of the content column by cancelling out #R-body-inner's padding
   (3.25rem default, 2rem and 1.25rem at the theme's responsive breakpoints).
--------------------------------------------------------------------------- */
.sm4j-hero {
  margin: 0 -3.25rem 2.5rem -3.25rem;
  padding: 3.25rem 1.5rem 0 1.5rem;
  background: linear-gradient(160deg, #0f2742 0%, #103050 55%, #13294a 100%);
  border-bottom: 6px solid #f0b010; /* brand gold rule */
  color: #ffffff;
  text-align: center;
}

@media screen and (max-width: 59.999rem) {
  .sm4j-hero { margin-left: -2rem; margin-right: -2rem; }
}
@media screen and (max-width: 47.999rem) {
  .sm4j-hero { margin-left: -1.25rem; margin-right: -1.25rem; padding-top: 2.5rem; }
}

.sm4j-hero-logo {
  box-sizing: border-box;
  width: 148px;
  height: 148px;
  object-fit: contain;
  margin: 0 auto 1.25rem auto;
  display: block;
  /* White chip so the navy "Lottie" wordmark and circle stay readable on the
     dark hero background. */
  background: #ffffff;
  padding: 12px;
  border-radius: 22px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}

.sm4j-hero h1.sm4j-hero-title {
  color: #ffffff;
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 0.75rem 0;
  border: 0;
}

.sm4j-hero-sub {
  font-size: 1.2rem;
  max-width: 40rem;
  margin: 0 auto 1.25rem auto;
  color: #e6ecf3;
}
.sm4j-hero-sub strong { color: #f0b010; }

.sm4j-hero-release {
  font-size: 0.95rem;
  margin: 0 0 1.5rem 0;
  color: #c8d3e0;
}
.sm4j-hero p.sm4j-hero-release a,
.sm4j-hero p.sm4j-hero-release a:visited { color: #ffffff; text-decoration: underline; }
.sm4j-hero p.sm4j-hero-release a:hover,
.sm4j-hero p.sm4j-hero-release a:active,
.sm4j-hero p.sm4j-hero-release a:focus { color: #f0b010; }
.sm4j-hero-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: #4ade80; /* "live" green */
  vertical-align: middle;
}

.sm4j-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 0;
  padding-bottom: 3rem;
}

/* Scoped as ".sm4j-hero a.sm4j-btn" so the button colours beat the theme's
   "article a:not(.card-link)" link styling (which would otherwise recolour the
   text/icon to the theme link colour and add an underline on hover). */
.sm4j-hero a.sm4j-btn,
.sm4j-hero a.sm4j-btn:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 0.4rem;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sm4j-hero a.sm4j-btn:hover,
.sm4j-hero a.sm4j-btn:active,
.sm4j-hero a.sm4j-btn:focus {
  transform: translateY(-1px);
  text-decoration: none;
}

.sm4j-hero a.sm4j-btn-primary,
.sm4j-hero a.sm4j-btn-primary:visited { background: #f0b010; color: #13294a; }
.sm4j-hero a.sm4j-btn-primary:hover,
.sm4j-hero a.sm4j-btn-primary:active,
.sm4j-hero a.sm4j-btn-primary:focus { background: #ffc62e; color: #13294a; }

.sm4j-hero a.sm4j-btn-ghost,
.sm4j-hero a.sm4j-btn-ghost:visited {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.7);
}
.sm4j-hero a.sm4j-btn-ghost:hover,
.sm4j-hero a.sm4j-btn-ghost:active,
.sm4j-hero a.sm4j-btn-ghost:focus {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: #ffffff;
}

/* ---------------------------------------------------------------------------
   Homepage "Why Lottie4J" cards
   Force the four feature cards onto a single row (on desktop) and drop the
   theme's tall 300px min-height so the boxes hug their content. The theme's
   responsive rules still collapse to 2 columns on tablet and 1 on mobile.
--------------------------------------------------------------------------- */
.home .card-container {
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}
.home .card-container .card {
  min-height: 0;
  height: auto;
}
.home .card-container .card-content {
  padding: 1.1rem;
}

/* ---------------------------------------------------------------------------
   Sidebar footer social / project links
   A small row of brand icons above the theme's "Built with Hugo" line in
   #R-footer (see layouts/partials/menu-footer.html).
--------------------------------------------------------------------------- */
.sm4j-social {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 0 0 1.25rem 0;
}
.sm4j-social a,
.sm4j-social a:visited {
  color: inherit;
  opacity: 0.75;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.sm4j-social a:hover,
.sm4j-social a:active,
.sm4j-social a:focus {
  opacity: 1;
  color: #f0b010; /* brand gold */
}

/* ---------------------------------------------------------------------------
   Image gallery
   A responsive grid of screenshots. Each image uses the relearn theme's own
   built-in lightbox (click to enlarge), so no extra JS/CSS libraries needed.
   The markdown images inside .sm4j-gallery render as .lightbox-link thumbnails;
   the theme's .lightbox-back overlays are position:fixed and stay out of the
   grid flow.
--------------------------------------------------------------------------- */
.sm4j-gallery p {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  align-items: start;
  margin: 1rem 0;
}
.sm4j-gallery p .lightbox-link {
  margin: 0;
}
.sm4j-gallery p .lightbox-link img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
@media screen and (max-width: 47.999rem) {
  .sm4j-gallery p { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Homepage "Latest updates" cards (latest-status shortcode)
   Reuses the theme's card component, matching the "Why Lottie4J" section.
   Force 4 on one row: the selector below (0,0,3,0) outranks the theme's
   responsive ".card-container" rule "article:not(.narrow) .card-container"
   (0,0,2,1) that would otherwise drop to 2 columns below ~960px. Collapse to
   2 columns only on phones.
--------------------------------------------------------------------------- */
.home .sm4j-latest .card-container {
  grid-template-columns: repeat(4, 1fr);
}
@media screen and (max-width: 47.999rem) {
  .home .sm4j-latest .card-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
