/**
 * SocialPlai Landing Design 4
 * Remove white frame - reset html/body margin and set full bleed background
 */
html.lp4-landing,
.lp4-landing,
.lp4-landing body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}
html.lp4-landing,
.lp4-landing body {
  background: var(--lp4-bg-light);
  overflow-x: hidden;
}
html.lp4-landing.dark,
.lp4-landing.dark body {
  background: var(--lp4-bg-dark);
}

.lp4-landing,
.lp4-landing *,
.lp4-landing *::before,
.lp4-landing *::after {
  box-sizing: border-box;
}

/**
 * Minimal layout utilities (no Tailwind dependency)
 */
.lp4-landing .mx-auto { margin-left: auto; margin-right: auto; }
.lp4-landing .flex { display: flex; }
.lp4-landing .flex-wrap { flex-wrap: wrap; }
.lp4-landing .flex-col { flex-direction: column; }
.lp4-landing .items-center { align-items: center; }
.lp4-landing .items-start { align-items: flex-start; }
.lp4-landing .items-end { align-items: flex-end; }
.lp4-landing .justify-between { justify-content: space-between; }
.lp4-landing .justify-center { justify-content: center; }
.lp4-landing .gap-2 { gap: 0.5rem; }
.lp4-landing .gap-3 { gap: 0.75rem; }
.lp4-landing .gap-4 { gap: 1rem; }
.lp4-landing .gap-6 { gap: 1.5rem; }
.lp4-landing .gap-8 { gap: 2rem; }
.lp4-landing .gap-12 { gap: 3rem; }
.lp4-landing .grid { display: grid; }
.lp4-landing .max-w-\[1200px\] { max-width: 1200px; }
.lp4-landing .max-w-\[1000px\] { max-width: 1000px; }
.lp4-landing .max-w-\[800px\] { max-width: 800px; }
.lp4-landing .px-4 { padding-left: 1rem; padding-right: 1rem; }
.lp4-landing .mb-6 { margin-bottom: 1.5rem; }
.lp4-landing .mb-8 { margin-bottom: 2rem; }
.lp4-landing .mb-16 { margin-bottom: 4rem; }
.lp4-landing .mt-12 { margin-top: 3rem; }
.lp4-landing .mt-16 { margin-top: 4rem; }
.lp4-landing .relative { position: relative; }
.lp4-landing .z-10 { z-index: 10; }
.lp4-landing .text-center { text-align: center; }
.lp4-landing .text-sm { font-size: 0.875rem; }
.lp4-landing .text-lg { font-size: 1.125rem; }
.lp4-landing .text-xl { font-size: 1.25rem; }
.lp4-landing .w-full { width: 100%; }
.lp4-landing .sm\:w-auto { width: auto; }
.lp4-landing .col-span-full { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .lp4-landing .md\:flex { display: flex; }
  .lp4-landing .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lp4-landing .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lp4-landing .md\:flex-row { flex-direction: row; }
  .lp4-landing .md\:items-end { align-items: flex-end; }
  .lp4-landing .md\:justify-between { justify-content: space-between; }
  .lp4-landing .md\:block { display: block; }
  .lp4-landing .md\:w-1\/2 { width: 50%; }
}
@media (min-width: 640px) {
  .lp4-landing .sm\:flex-row { flex-direction: row; }
}
@media (min-width: 640px) {
  .lp4-landing .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .lp4-landing .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.lp4-landing .hidden { display: none; }

/* Theme toggle - match socialplai design 4 */
.lp4-theme-btn {
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #334155;
  transition: background 0.2s, color 0.2s;
}
.lp4-theme-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
.lp4-theme-btn .lp4-theme-icon {
  display: block;
}
.lp4-navbar.dark .lp4-theme-btn {
  color: #fff;
}
.lp4-navbar.dark .lp4-theme-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/**
 * SocialPlai Landing Design 4
 * Distinct CSS components for the landing page.
 * Integrated from "socialplai design 4" folder with improved color contrast.
 * Uses: Montserrat (display), Lato (body).
 */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&family=Montserrat:wght@500;700;800;900&display=swap');

/* ---- Fonts (match socialplai design 4) ---- */
.lp4-landing,
.lp4-landing body {
  font-family: 'Lato', sans-serif;
}

.lp4-landing .lp4-font-display,
.lp4-landing .lp4-navbar-title,
.lp4-landing .lp4-navbar-link,
.lp4-landing .lp4-trust-bar,
.lp4-landing .lp4-hero-title,
.lp4-landing .lp4-pill,
.lp4-landing .lp4-btn,
.lp4-landing .lp4-about-card-title,
.lp4-landing .lp4-about-card-text,
.lp4-landing .lp4-section-title,
.lp4-landing .lp4-how-it-works-badge,
.lp4-landing .lp4-how-it-works-card-title,
.lp4-landing .lp4-how-it-works-step,
.lp4-landing .lp4-games-label,
.lp4-landing .lp4-games-title,
.lp4-landing .lp4-games-link,
.lp4-landing .lp4-game-card-title,
.lp4-landing .lp4-cta-title,
.lp4-landing .lp4-footer-brand-text,
.lp4-landing .lp4-footer-heading {
  font-family: 'Montserrat', sans-serif;
}

/* ---- Design tokens (improved contrast) ---- */
:root {
  --lp4-navy: #1B2A41;
  --lp4-navy-light: #2d3f5c;
  --lp4-teal: #0d9488;      /* darker for better contrast */
  --lp4-teal-bright: #14b8a6;
  --lp4-orange: #ea580c;    /* darker for better contrast */
  --lp4-orange-bright: #f97316;
  --lp4-yellow: #ca8a04;    /* darker for better contrast */
  --lp4-yellow-bright: #eab308;
  --lp4-bg-light: #F9F9F9;
  --lp4-bg-dark: #0f1014;
  --lp4-text-light: #1e293b;
  --lp4-text-muted-light: #475569;
  --lp4-text-dark: #f8fafc;
  --lp4-text-muted-dark: #94a3b8;
  --lp4-white: #ffffff;
  --lp4-black: #0f172a;
}

/* ---- Layout ---- */
.lp4-landing {
  font-family: 'Lato', system-ui, sans-serif;
}

.lp4-landing .lp4-font-display {
  font-family: 'Montserrat', system-ui, sans-serif;
}

/* ---- Navbar ---- */
.lp4-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid var(--lp4-navy);
  background: var(--lp4-bg-light);
  transition: background 0.3s, border-color 0.3s;
}

.lp4-navbar.dark {
  background: var(--lp4-bg-dark);
  border-color: var(--lp4-white);
}

.lp4-navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lp4-navbar-logo {
  padding: 0.5rem;
  background: var(--lp4-navy);
  color: white;
  border: 2px solid var(--lp4-navy);
  box-shadow: 3px 3px 0 var(--lp4-teal-bright);
}

.lp4-navbar-logo.dark {
  border-color: var(--lp4-white);
}

.lp4-navbar-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--lp4-navy);
}

.lp4-navbar-title.dark {
  color: var(--lp4-white);
}

.lp4-navbar-title-accent {
  color: var(--lp4-teal-bright);
}

.lp4-navbar-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lp4-navy);
  text-decoration: none;
  transition: color 0.2s;
}

.lp4-navbar-link:hover {
  color: var(--lp4-orange);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--lp4-teal-bright);
}

.lp4-navbar-link.dark {
  color: var(--lp4-white);
}

/* ---- Trust bar ---- */
.lp4-trust-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--lp4-navy);
}

.lp4-trust-bar.dark {
  color: var(--lp4-white);
}

.lp4-trust-bar-divider {
  width: 2px;
  height: 1.5rem;
  background: var(--lp4-orange);
}

.lp4-trust-bar-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* ---- Hero ---- */
.lp4-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 1.5rem 6rem;
  background: var(--lp4-bg-light);
  transition: background 0.3s;
}

.lp4-hero.dark {
  background: var(--lp4-bg-dark);
}

.lp4-hero-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.lp4-hero-blob-1 {
  top: 0;
  right: 0;
  transform: translate(5rem, -5rem);
  width: 600px;
  height: 600px;
  background: var(--lp4-teal-bright);
  opacity: 0.15;
  filter: blur(80px);
}

.lp4-hero-blob-2 {
  bottom: 0;
  left: 0;
  transform: translate(-5rem, 0);
  width: 400px;
  height: 400px;
  background: var(--lp4-orange);
  opacity: 0.15;
  filter: blur(80px);
}

.lp4-hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  color: var(--lp4-navy);
  margin-bottom: 1.5rem;
}

.lp4-hero-title.dark {
  color: var(--lp4-white);
}

.lp4-hero-title-accent {
  color: var(--lp4-teal-bright);
  text-decoration: underline;
  text-decoration-color: var(--lp4-yellow-bright);
  text-decoration-thickness: 6px;
  text-underline-offset: 0.25rem;
}

.lp4-hero-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--lp4-text-muted-light);
  max-width: 28rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.lp4-hero-subtitle.dark {
  color: var(--lp4-text-muted-dark);
}

/* ---- Pills ---- */
.lp4-pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--lp4-white);
  color: var(--lp4-navy);
  border: 2px solid var(--lp4-navy);
  box-shadow: 2px 2px 0 var(--lp4-navy);
}

.lp4-pill.dark {
  background: var(--lp4-black);
  color: var(--lp4-white);
  border-color: var(--lp4-white);
  box-shadow: 2px 2px 0 var(--lp4-white);
}

/* ---- Buttons ---- */
.lp4-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.lp4-btn:hover {
  transform: translateY(-2px);
}

.lp4-btn-primary {
  background: var(--lp4-navy);
  color: var(--lp4-white);
  border: 2px solid var(--lp4-navy);
  box-shadow: 4px 4px 0 var(--lp4-teal-bright);
}

.lp4-btn-primary:hover {
  box-shadow: 6px 6px 0 var(--lp4-teal-bright);
}

.lp4-btn-secondary {
  background: transparent;
  color: var(--lp4-navy);
  border: 2px solid var(--lp4-navy);
}

.lp4-btn-secondary:hover {
  background: var(--lp4-navy);
  color: var(--lp4-white);
}

.lp4-btn-secondary.dark {
  color: var(--lp4-white);
  border-color: var(--lp4-white);
}

.lp4-btn-secondary.dark:hover {
  background: var(--lp4-white);
  color: var(--lp4-navy);
}

.lp4-btn-cta-outline {
  background: transparent;
  color: var(--lp4-white);
  border: 2px solid var(--lp4-white);
}

.lp4-btn-cta-outline:hover {
  background: var(--lp4-white);
  color: var(--lp4-navy);
}

.lp4-btn-accent {
  background: var(--lp4-yellow-bright);
  color: var(--lp4-navy);
  border: 2px solid var(--lp4-navy);
  box-shadow: 4px 4px 0 var(--lp4-navy);
}

.lp4-btn-accent:hover {
  background: var(--lp4-yellow-bright);
  box-shadow: 6px 6px 0 var(--lp4-navy);
}

/* ---- About section ---- */
.lp4-about {
  padding: 6rem 1.5rem;
  background: var(--lp4-white);
  transition: background 0.3s;
}

.lp4-about.dark {
  background: var(--lp4-bg-dark);
}

.lp4-about-card {
  padding: 2rem;
  background: var(--lp4-orange);
  border: 4px solid var(--lp4-navy);
  box-shadow: 12px 12px 0 var(--lp4-navy);
}

.lp4-about-card.dark {
  border-color: var(--lp4-white);
  box-shadow: 12px 12px 0 var(--lp4-teal-bright);
}

.lp4-about-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--lp4-navy);
  margin-bottom: 1rem;
}

.lp4-about-card-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--lp4-navy);
  line-height: 1.6;
}

.lp4-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--lp4-navy);
  margin-bottom: 1.5rem;
}

.lp4-section-title.dark {
  color: var(--lp4-white);
}

.lp4-section-title-accent {
  color: var(--lp4-teal-bright);
}

.lp4-section-text {
  font-size: 1.125rem;
  color: var(--lp4-text-muted-light);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.lp4-section-text.dark {
  color: var(--lp4-text-muted-dark);
}

.lp4-about-right {
  width: 100%;
}

.lp4-about-copy {
  font-size: 1.22rem;
  line-height: 1.85;
  color: #1f2937;
}

.lp4-about-copy.dark {
  color: #ffffff;
}

.lp4-about-cta {
  margin-top: 0.5rem;
  font-size: 1.08rem;
  padding: 0.95rem 2rem;
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 4px 4px 0 #14b8a6;
}

.lp4-about-cta:hover {
  box-shadow: 6px 6px 0 #14b8a6;
}

.lp4-about-cta.dark {
  background: #14b8a6;
  border-color: #14b8a6;
  color: #071018;
  box-shadow: 4px 4px 0 #ffffff;
}

.lp4-about-cta.dark:hover {
  box-shadow: 6px 6px 0 #ffffff;
}

html.lp4-landing.dark .lp4-about-copy,
html.lp4-landing[data-theme='night'] .lp4-about-copy {
  color: #ffffff !important;
}

html.lp4-landing.dark .lp4-about-cta,
html.lp4-landing[data-theme='night'] .lp4-about-cta {
  background: #14b8a6 !important;
  border-color: #14b8a6 !important;
  color: #071018 !important;
  box-shadow: 4px 4px 0 #ffffff !important;
}

@media (min-width: 768px) {
  .lp4-about-right {
    position: relative;
    left: 3rem;
    padding-left: 1rem;
  }
}

/* ---- How it works ---- */
.lp4-how-it-works {
  padding: 6rem 1.5rem;
  background: var(--lp4-yellow-bright);
  border-bottom: 4px solid var(--lp4-navy);
}

.lp4-how-it-works-badge {
  display: inline-block;
  background: var(--lp4-navy);
  color: var(--lp4-white);
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  text-transform: uppercase;
  padding: 0.5rem 1.5rem;
  box-shadow: 8px 8px 0 var(--lp4-white);
}

.lp4-how-it-works-card {
  position: relative;
  padding: 2rem;
  background: var(--lp4-white);
  border: 2px solid var(--lp4-navy);
  box-shadow: 8px 8px 0 var(--lp4-orange);
  transition: transform 0.2s;
}

.lp4-how-it-works-card:hover {
  transform: translateY(-4px);
}

.lp4-how-it-works-card.dark {
  background: var(--lp4-navy);
  border-color: var(--lp4-white);
  box-shadow: 8px 8px 0 var(--lp4-orange);
}

.lp4-how-it-works-step {
  position: absolute;
  top: -1.25rem;
  left: -1.25rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lp4-yellow-bright);
  border: 2px solid var(--lp4-navy);
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--lp4-navy);
  box-shadow: 2px 2px 0 var(--lp4-navy);
}

.lp4-how-it-works-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--lp4-navy);
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.lp4-how-it-works-card.dark .lp4-how-it-works-card-title {
  color: var(--lp4-white);
}

.lp4-how-it-works-card-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--lp4-text-muted-light);
  line-height: 1.6;
}

.lp4-how-it-works-card.dark .lp4-how-it-works-card-text {
  color: var(--lp4-text-muted-dark);
}

/* ---- Games grid ---- */
.lp4-games {
  padding: 6rem 1.5rem;
  background: var(--lp4-navy);
  position: relative;
}

.lp4-games-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3rem;
  background: var(--lp4-teal-bright);
}

.lp4-games-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 4px solid var(--lp4-orange);
}

.lp4-games-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--lp4-orange);
}

.lp4-games-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--lp4-white);
}

.lp4-games-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--lp4-white);
  text-decoration: underline;
  text-decoration-color: var(--lp4-yellow-bright);
  text-decoration-thickness: 4px;
  text-underline-offset: 4px;
}

.lp4-games-link:hover {
  color: var(--lp4-teal-bright);
}

/* ---- Game preview card ---- */
.lp4-game-card {
  display: block;
  background: var(--lp4-white);
  border: 2px solid var(--lp4-navy);
  box-shadow: 6px 6px 0 var(--lp4-navy);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.lp4-game-card:hover {
  transform: translateY(-4px);
  box-shadow: 10px 10px 0 var(--lp4-teal-bright);
}

.lp4-game-card.dark {
  background: var(--lp4-navy);
  border-color: var(--lp4-white);
  box-shadow: 6px 6px 0 var(--lp4-yellow-bright);
}

.lp4-game-card-image {
  aspect-ratio: 4/3;
  width: 100%;
  object-fit: cover;
  border-bottom: 2px solid var(--lp4-navy);
}

.lp4-game-card.dark .lp4-game-card-image {
  border-color: var(--lp4-white);
}

.lp4-game-card-body {
  padding: 1.5rem;
}

.lp4-game-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--lp4-navy);
  transition: color 0.2s;
  text-decoration: none;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 2px;
}

.lp4-game-card:hover .lp4-game-card-title {
  color: var(--lp4-teal-bright);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.lp4-game-card.dark .lp4-game-card-title {
  color: var(--lp4-white);
}

.lp4-game-card.dark .lp4-game-card:hover .lp4-game-card-title {
  color: var(--lp4-teal-bright);
}

.lp4-game-card-tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--lp4-text-muted-light);
}

.lp4-game-card.dark .lp4-game-card-tag {
  color: var(--lp4-text-muted-dark);
}

/* ---- Bottom CTA ---- */
.lp4-cta {
  padding: 6rem 1.5rem;
  background: var(--lp4-navy);
  text-align: center;
  border-top: 8px solid var(--lp4-teal-bright);
}

.lp4-cta-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--lp4-white);
  margin-bottom: 2rem;
}

.lp4-cta-title-accent {
  color: var(--lp4-yellow-bright);
}

.lp4-cta-text {
  font-size: 1.25rem;
  color: #93c5fd;
  max-width: 42rem;
  margin: 0 auto 2.5rem;
}

/* ---- Footer ---- */
.lp4-footer {
  padding: 4rem 1.5rem 2rem;
  background: var(--lp4-black);
  color: var(--lp4-white);
  border-top: 2px solid rgba(255,255,255,0.2);
}

.lp4-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--lp4-teal-bright);
}

.lp4-footer-brand-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lp4-footer-text {
  font-size: 0.875rem;
  color: #9ca3af;
  line-height: 1.6;
  margin-top: 1rem;
}

.lp4-footer-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  text-transform: uppercase;
  color: var(--lp4-orange);
  margin-bottom: 1.1rem;
}

.lp4-footer-link {
  display: block;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 2;
  color: var(--lp4-white);
  text-decoration: none;
}

.lp4-footer-link:hover {
  color: var(--lp4-teal-bright);
}

.lp4-footer-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  column-gap: 2.5rem;
}

.lp4-footer-brand-col {
  min-width: 0;
}

.lp4-footer-nav-center {
  justify-self: center;
}

.lp4-footer-nav-right {
  justify-self: end;
}

.lp4-partner-logos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 1rem;
  align-items: center;
}

.lp4-partner-logo-img {
  width: 100%;
  height: 104px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.lp4-partner-logos .lp4-partner-logo-img:nth-child(3) {
  height: 124px;
}

.lp4-nih-logo-img {
  width: 350px;
  height: 268px;
  object-fit: contain;
  object-position: center right;
  display: block;
}
/* ---- Footer responsive fixes ---- */
@media (max-width: 900px) {
  .lp4-footer-top {
    grid-template-columns: 1fr;
    row-gap: 2rem;
    text-align: center;
  }

  .lp4-footer-brand {
    justify-content: center;
  }

  .lp4-footer-brand-col,
  .lp4-footer-nav-center,
  .lp4-footer-nav-right {
    justify-self: center;
    width: 100%;
  }

  .lp4-footer-text {
    max-width: 30rem;
    margin-left: auto;
    margin-right: auto;
  }

  .lp4-footer-heading {
    margin-bottom: 0.75rem;
  }

  .lp4-footer-link {
    line-height: 1.7;
  }
}

@media (max-width: 768px) {
  .lp4-navbar {
    padding: 1rem;
  }

  .lp4-navbar-title {
    font-size: 1.125rem;
  }

  .lp4-how-it-works-badge {
    box-shadow: 6px 6px 0 var(--lp4-white);
  }

  .lp4-how-it-works-card {
    padding-top: 4rem;
    box-shadow: 6px 6px 0 var(--lp4-orange);
  }

  .lp4-how-it-works-step {
    top: 0.75rem;
    left: 0.75rem;
  }

  .lp4-partner-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1rem;
  }

  /* Keep first three logos at their intended visual size; wrap instead of shrinking */
  .lp4-partner-logo-img {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    height: 104px;
  }

  .lp4-partner-logos .lp4-partner-logo-img:nth-child(3) {
    height: 124px;
  }

  .lp4-nih-logo-img {
    flex: 0 0 100%;
    width: min(92vw, 350px);
    max-width: 350px;
    height: auto;
    object-position: center;
    margin: 0 auto;
  }
}
