/* /newsletter/ (assets/js/newsletter-controller.js) - archive index and
   issue detail page. Hero + floating panel language borrowed directly from
   business-resources.css (same "card panel floats up into the hero" look
   the user approved for that page), a card grid modeled on blog.css's own
   card shape, and its own newsletter-block--* classes for the freeform
   content blocks an admin composes (see newsletter.js's
   renderBlocksToPageHtml). */

.newsletter-hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--blue) 160%);
  color: #fff;
  padding: 56px 20px 130px;
  text-align: center;
}
.newsletter-hero .eyebrow { color: #9ecbff; font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.newsletter-hero h1 { color: #fff; font-size: clamp(32px, 5vw, 44px); margin: 10px 0 14px; }
.newsletter-hero .lead { color: #dce6f3; max-width: 600px; margin: 0 auto 26px; font-size: 16px; line-height: 1.6; }

.newsletter-signup { max-width: 520px; margin: 0 auto; }
.newsletter-signup__row {
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(11,26,46,.25);
}
.newsletter-signup__row input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 6px;
  color: #14253b;
  min-width: 0;
}
.newsletter-signup__row input:focus { outline: none; }
.newsletter-signup__row button {
  background: var(--orange);
  color: #fff;
  border: none;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .12s ease;
}
.newsletter-signup__row button:hover { background: #d94600; }
/* Visually separated (border-top + extra margin) from the email+button row
   above, not just a trailing label on the same form - a prior version read
   as one continuous step and a user checked this box thinking it was part
   of confirming the single signup, not realizing it joins a second,
   independent mailing list. */
.newsletter-signup__owner-check {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.18);
  color: #dce6f3;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.newsletter-signup__owner-check input { width: 16px; height: 16px; margin: 2px 0 0; flex: 0 0 auto; }
.newsletter-signup__success { color: #9ecbff; font-weight: 700; margin: 14px 0 0; }
.newsletter-signup__error { color: #ffb4a8; font-weight: 700; margin: 14px 0 0; }

.newsletter-panel-section { padding-top: 0; }
.newsletter-panel {
  margin-top: -88px;
  padding: 22px 24px;
  border-radius: 16px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 60px rgba(11,26,46,.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.newsletter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-chips a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: #14253b;
  background: #fff;
  text-decoration: none;
  transition: color .12s ease, border-color .12s ease;
}
.newsletter-chips a:hover { color: #4169e1; border-color: #4169e1; }
.newsletter-chips a.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.newsletter-chips a.is-active:hover { color: #fff; border-color: var(--blue); }
.newsletter-search { display: flex; gap: 8px; }
.newsletter-search input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  width: 200px;
}
.newsletter-search button {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .12s ease;
}
.newsletter-search button:hover { background: #4169e1; }

.newsletter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) { .newsletter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .newsletter-grid { grid-template-columns: 1fr; } }

/* Zero-issues state - grid-column:1/-1 is the fix that actually matters
   here: without it, this single child only fills the grid's first column
   (a third of the row), so even centered text sits visually pinned to the
   left of all that empty space next to it. Icon + eyebrow + big serif
   heading echoes the same "graphical card" treatment .city-directory-empty
   (refinements.css) already uses elsewhere on the site for an empty state,
   not a generic text line. */
.newsletter-empty {
  grid-column: 1 / -1;
  max-width: 520px;
  margin: 12px auto 0;
  padding: 56px 40px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, #eef4ff 0%, #fff 65%);
}
.newsletter-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  margin-bottom: 20px;
}
.newsletter-empty .eyebrow { display: block; margin-bottom: 8px; }
.newsletter-empty h2 { font: 400 clamp(30px, 4.5vw, 42px) var(--serif); margin: 0 0 12px; color: var(--ink); }
.newsletter-empty p { margin: 0 auto; max-width: 360px; color: var(--muted); line-height: 1.6; }

.newsletter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 14px rgba(11,26,46,.06);
  transition: box-shadow .15s ease, transform .15s ease;
  display: block;
}
.newsletter-card:hover { box-shadow: 0 14px 28px rgba(11,26,46,.14); transform: translateY(-3px); }
.newsletter-card__thumb {
  height: 320px;
  background: linear-gradient(135deg, var(--ink), var(--blue));
  background-size: cover;
  background-position: center;
  position: relative;
}
.newsletter-card__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fff;
  color: var(--blue);
  font: 800 10px var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.newsletter-card__body { padding: 16px 18px 18px; }
.newsletter-card__body h3 { margin: 0 0 8px; font-size: 16px; color: #14253b; line-height: 1.35; }
.newsletter-card__teaser {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.newsletter-card__meta { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.newsletter-card__meta svg { color: var(--orange); flex: 0 0 auto; }

.newsletter-issue-hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--blue) 160%);
  color: #fff;
  padding: 44px 0 56px;
}
/* Capped to the same 680px as .newsletter-issue-body (and the email,
   which has no separate hero at all - the whole thing starts at 680px)
   so the title/date/teaser column lines up with the content column
   below it instead of spanning the full page width. */
.newsletter-issue-hero .container { max-width: 680px; margin: 0 auto; }
.newsletter-issue-hero .eyebrow { color: #9ecbff; font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.newsletter-issue-hero h1 { color: #fff; font-size: clamp(26px, 4vw, 38px); margin: 10px 0 8px; }
.newsletter-issue-date { color: #dce6f3; font-size: 13px; }
.newsletter-issue-teaser { color: #dce6f3; font-size: 15px; line-height: 1.6; margin: 10px 0 0; }

.newsletter-issue-body { max-width: 680px; margin: 0 auto; }
.newsletter-block { margin: 0 0 28px; }
.newsletter-block--divider { border: none; border-top: 1px solid var(--line); margin: 0 0 28px; }
.newsletter-block--photo img,
.newsletter-block--photo-text img { width: 100%; border-radius: 10px; display: block; }
.newsletter-block--photo figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); font-style: italic; }
.newsletter-block__body { font-size: 15px; line-height: 1.7; color: #14253b; }
/* Links typed into a text/photo_text block's rich-text body (see
   admin-newsletter-controller.js's RICH_TEXT_TOOLBAR) - unstyled before
   this, so they fell back to the browser's plain blue/underline default. */
.newsletter-block__body a { color: #14253b; text-decoration: underline; transition: color .12s ease; }
.newsletter-block__body a:hover { color: #4169e1; }
.newsletter-block--text h2 { margin: 0 0 10px; font-size: 20px; color: #14253b; }
/* A "section" block groups every block that follows it (up to the next
   section block) under one big blue banner title - repeatable as many
   times as needed through an issue, matching the masthead-weight "big
   title" look the site owner asked for, rather than a banner on every
   individual block. */
.newsletter-section { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 0 0 28px; }
.newsletter-section__title { background: var(--blue); color: #fff; font-weight: 800; font-size: 22px; padding: 20px 24px; }
.newsletter-section__body { padding: 24px 24px 0; background: #fff; }
.newsletter-section__body .newsletter-block:last-child { margin-bottom: 24px; }
.newsletter-block--photo-text img { margin-bottom: 12px; }
.newsletter-block--photo-text h3 { margin: 0 0 6px; font-size: 17px; color: #14253b; }
/* Base "Learn more" link look, shared by both the photo_text block and
   each grid item below (grid previously only overrode font-size here,
   so its links fell back to the browser's plain blue/underline default
   instead of matching photo_text's styled one). */
.newsletter-block__link { display: inline-block; font-size: 14px; font-weight: 700; color: var(--blue); text-decoration: none; transition: color .12s ease; }
.newsletter-block__link:hover { color: #4169e1; text-decoration: underline; }
.newsletter-block--photo-text .newsletter-block__link { margin-top: 8px; }
.newsletter-block--button a {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 6px;
  transition: background-color .12s ease;
}
.newsletter-block--button a:hover { background: #4169e1; }

/* A multi-column photo card grid (2 or 3 columns) - see newsletter.js's
   renderSingleBlockToPageHtml grid case. */
.newsletter-grid-block {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.newsletter-grid-block--cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .newsletter-grid-block { grid-template-columns: 1fr; } }
.newsletter-grid-block__item img { width: 100%; border-radius: 10px; display: block; margin-bottom: 10px; }
.newsletter-grid-block__item h3 { margin: 0 0 6px; font-size: 15px; color: #14253b; }
.newsletter-grid-block__item p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.newsletter-grid-block__item .newsletter-block__link { font-size: 13px; }

@media (max-width: 640px) {
  .newsletter-hero { padding: 44px 16px 100px; }
  .newsletter-panel { margin-top: -70px; padding: 16px; border-radius: 14px; flex-direction: column; align-items: stretch; }
  .newsletter-search input { width: auto; flex: 1; }
}
