/* KellmanMD free ebooks pages — matches kellmanmd.com */
*, *::before, *::after { box-sizing: border-box; }

body.ebooks {
  margin: 0;
  background: #FAF7F2;
  color: #2A2420;
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.ebooks a { color: #8B5E3C; }
.ebooks a:hover { color: #556B4F; }

.ebooks-main { padding-bottom: 80px; }

.ebooks-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.ebooks-hero {
  padding: 56px 0 28px;
}

.ebooks-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8B5E3C;
  margin: 0 0 14px;
}

.ebooks-hero h1 {
  font-family: 'Source Serif 4', 'Source Serif Pro', serif;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  color: #2A2420;
  margin: 0 0 18px;
  max-width: 16ch;
}

.ebooks-lede {
  font-size: 18px;
  line-height: 1.7;
  color: #5C544A;
  max-width: 62ch;
  margin: 0;
}

.ebooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  padding: 12px 0 48px;
}

.ebook-card {
  background: #F3EADF;
  border: 1px solid #EDE4D3;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ebook-card.is-placeholder {
  background: #FAF7F2;
  border: 1px dashed #C9A98A;
}

.ebook-card .cover {
  display: block;
  background: #EDE4D3;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.ebook-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.ebook-card .body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ebook-card h2 {
  font-family: 'Source Serif 4', 'Source Serif Pro', serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
  color: #2A2420;
}

.ebook-card .sub {
  font-size: 14px;
  color: #5C544A;
  margin: 0;
  line-height: 1.5;
}

.ebook-card .blurb {
  font-size: 14px;
  color: #5C544A;
  margin: 6px 0 0;
  line-height: 1.6;
}

.badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8B5E3C;
  border: 1px solid #C9A98A;
  border-radius: 2px;
  padding: 4px 8px;
  margin-bottom: 4px;
}

.badge-soon {
  color: #8B5E3C;
  background: #FAF7F2;
}

.ebooks-form-section {
  background: #F3EADF;
  border-top: 1px solid #DCD0AE;
  border-bottom: 1px solid #DCD0AE;
  padding: 56px 0;
}

.ebooks-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.ebooks-form-section h2 {
  font-family: 'Source Serif 4', 'Source Serif Pro', serif;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.2;
  margin: 0 0 14px;
}

.ebooks-form-section p {
  color: #5C544A;
  margin: 0 0 16px;
}

.consent, .privacy-note, .disclaimer {
  font-size: 13px;
  line-height: 1.6;
  color: #5C544A;
  margin: 0 0 12px;
}

.disclaimer { margin-top: 8px; }

/* Marked slot — replace the inner box with the GHL embed */
.ghl-slot {
  background: #FAF7F2;
  border: 2px dashed #8B5E3C;
  border-radius: 2px;
  padding: 28px 24px;
  min-height: 280px;
}

.ghl-slot-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8B5E3C;
  margin: 0 0 10px;
}

.ghl-slot-help {
  font-size: 14px;
  color: #5C544A;
  margin: 0 0 8px;
}

.ghl-slot code {
  font-size: 13px;
  background: #EDE4D3;
  padding: 2px 6px;
  border-radius: 2px;
}

.ghl-slot ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #5C544A;
  font-size: 14px;
}

/* After the embed is pasted, the dashed box can stay as a wrapper
   or be removed. GHL iframes should be allowed to fill the width. */
#ghl-form-embed iframe,
#ghl-form-embed form {
  width: 100%;
  max-width: 100%;
}

.thank-you {
  padding: 72px 0 40px;
  max-width: 640px;
}

.thank-you h1 {
  font-family: 'Source Serif 4', 'Source Serif Pro', serif;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  margin: 0 0 18px;
}

.thank-you p { color: #5C544A; font-size: 18px; margin: 0 0 16px; }

.btn {
  display: inline-block;
  background: #5B6E4C;
  color: #FAF7F2 !important;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 2px;
  text-decoration: none;
  letter-spacing: 0.02em;
  margin-top: 12px;
}
.btn:hover { background: #465a41; color: #FAF7F2 !important; }

.btn-secondary {
  background: transparent;
  color: #8B5E3C !important;
  border: 1px solid #C9A98A;
  margin-left: 10px;
}
.btn-secondary:hover { background: #F3EADF; color: #556B4F !important; }

.ig-note {
  font-size: 14px;
  color: #5C544A;
  margin-top: 28px;
}

@media (max-width: 800px) {
  .ebooks-form-grid { grid-template-columns: 1fr; gap: 28px; }
  .ebooks-hero { padding-top: 36px; }
  .btn-secondary { margin-left: 0; margin-top: 10px; }
}

@media (max-width: 767px) {
  nav { padding: 14px 20px !important; gap: 12px !important; }
  nav img { max-width: 120px; height: auto; }
  footer { padding: 40px 20px 24px !important; }
  footer > div:first-child {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .ebooks-main { padding-bottom: 100px; }
}
