/* ==========================================================================
   Survival MD Reviews: homepage styles
   ========================================================================== */

:root {
  --color-bg: #F2F4F5;
  --color-surface: #FFFFFF;
  --color-text: #20252B;
  --color-text-secondary: #4B5563;
  --color-nav: #20252B;
  --color-nav-hover: #353C45;
  --color-accent: #8B2635;
  --color-accent-hover: #73202C;
  --color-accent-ring: rgba(139, 38, 53, 0.2);
  --color-border: #D8DDE2;
  --color-border-strong: #A7B0BA;
  --color-placeholder: #E5E9EC;
  --color-placeholder-icon: #98A2AC;
  --color-footer-text: #D6DBE1;
  --color-footer-muted: #B3BBC4;
  --color-footer-accent: #EBB5BD;

  --font-sans: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 6px;
  --radius-sm: 4px;
  --container: 1320px;
  --gutter: 16px;

  --shadow-hover: 0 8px 24px rgba(32, 37, 43, 0.10);
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 40px; }
}

/* Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }

h1, h2, h3 {
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.2;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

main:focus { outline: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  background: var(--color-nav);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus { top: 12px; }

/* Logo / wordmark
   ========================================================================== */

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--color-text);
  text-decoration: none;
}

.logo__image { width: auto; max-width: 100%; }

.wordmark {
  font-size: 1.3125rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark__accent { color: var(--color-accent); }

@media (min-width: 640px) {
  .wordmark { font-size: 1.625rem; }
}

@media (min-width: 1024px) {
  .wordmark { font-size: 1.875rem; }
}

/* Header: masthead
   ========================================================================== */

.masthead {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.masthead__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand toggle"
    "search search";
  align-items: center;
  gap: 12px 16px;
  padding-block: 12px 14px;
}

.masthead__brand { grid-area: brand; }
.masthead__search { grid-area: search; min-width: 0; }

@media (min-width: 960px) {
  .masthead__inner {
    grid-template-columns: auto minmax(380px, 560px);
    grid-template-areas: "brand search";
    justify-content: space-between;
    gap: 40px;
    padding-block: 18px;
  }
}

/* Menu button (mobile and tablet) */

.menu-toggle {
  grid-area: toggle;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  color: var(--color-text);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.menu-toggle:hover {
  background: var(--color-bg);
  border-color: var(--color-text);
}

.menu-toggle__icon {
  position: relative;
  width: 18px;
  height: 14px;
}

.menu-toggle__icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: top 0.25s var(--ease), transform 0.25s var(--ease), opacity 0.15s var(--ease);
}

.menu-toggle__icon span:nth-child(1) { top: 0; }
.menu-toggle__icon span:nth-child(2) { top: 6px; }
.menu-toggle__icon span:nth-child(3) { top: 12px; }

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Header: menu band
   Light menu under the logo row: dark links, the current page in the brand red with a short underline.
   On mobile and tablet it opens as a white panel under the Menu button.
   ========================================================================== */

.site-header { border-top: 4px solid var(--color-accent); }

.navbar {
  display: none;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 6px 16px rgba(32, 37, 43, 0.06);
}

.navbar.is-open { display: block; }

.navbar__list {
  margin: 0;
  padding: 4px 0 10px;
  list-style: none;
}

.navbar__list li + li { border-top: 1px solid var(--color-border); }

.navbar__link {
  position: relative;
  display: block;
  padding: 13px 0;
  color: var(--color-text);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.navbar__link:hover { color: var(--color-accent); }

.navbar__link[aria-current="page"] {
  padding-left: 14px;
  color: var(--color-accent);
  box-shadow: inset 3px 0 0 var(--color-accent);
}

.navbar__link:focus-visible {
  outline: 3px solid var(--color-accent-ring);
  outline-offset: -3px;
  border-radius: 4px;
}

.menu-toggle:focus-visible { outline-offset: 2px; }

@media (min-width: 960px) {
  .menu-toggle { display: none; }

  .navbar,
  .navbar.is-open { display: block; border-top: 1px solid var(--color-border); }

  .navbar__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 34px;
    padding: 0;
  }

  .navbar__list li + li { border-top: 0; }

  .navbar__link,
  .navbar__link[aria-current="page"] {
    padding: 0;
    font-size: 1rem;
    line-height: 52px;
    letter-spacing: 0.01em;
    box-shadow: none;
  }

  /* Short red underline: grows in on hover, stays under the current page */
  .navbar__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.25s var(--ease);
  }

  .navbar__link:hover::after,
  .navbar__link[aria-current="page"]::after { transform: scaleX(1); }
}

@media (min-width: 1200px) {
  .navbar__list { gap: 0 42px; }
}

/* Search
   ========================================================================== */

.search {
  display: flex;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.search__field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search__icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
  transform: translateY(-50%);
  pointer-events: none;
}

.search__input {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 46px 0 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  color: var(--color-text);
  font: inherit;
  font-size: 1.0625rem;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search__input::placeholder {
  color: var(--color-text-secondary);
  opacity: 1;
}

.search__input::-webkit-search-decoration,
.search__input::-webkit-search-cancel-button,
.search__input::-webkit-search-results-button,
.search__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search__input:hover { border-color: var(--color-text-secondary); }

.search__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-ring);
}

.search__clear {
  position: absolute;
  top: 50%;
  right: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  transform: translateY(-50%);
}

.search__clear svg { width: 18px; height: 18px; }

.search__clear:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.search.has-value .search__clear { display: inline-flex; }

/* Room for the clear button only while there is text, so the placeholder fits on small phones. */
@media (max-width: 479px) {
  .search__icon { left: 12px; }
  .search__input { padding: 0 12px 0 40px; font-size: 1rem; }
  .search.has-value .search__input { padding-right: 46px; }
  .search__submit { padding: 0 16px; }
}

.search__submit {
  flex-shrink: 0;
  height: 50px;
  padding: 0 20px;
  background: var(--color-accent);
  border: 0;
  border-radius: var(--radius);
  color: #FFFFFF;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}

.search__submit:hover { background: var(--color-accent-hover); }

@media (min-width: 960px) {
  .search__input,
  .search__submit { height: 52px; }
  .search__submit { padding: 0 26px; }
}


/* Menu items without a destination yet */

.navbar__link.is-pending {
  color: rgba(255, 255, 255, 0.66);
  cursor: default;
}

.navbar__link.is-pending:hover {
  background: none;
  box-shadow: none;
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Shared: buttons, placeholders, labels
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.button svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.2s var(--ease);
}

.button--primary {
  background: var(--color-accent);
  color: #FFFFFF;
}

a.button--primary:not(.is-unlinked):hover { background: var(--color-accent-hover); }

.button.is-unlinked { cursor: default; }

.button--secondary {
  background: var(--color-surface);
  border-color: var(--color-text);
  color: var(--color-text);
}

.button--secondary:not(.is-unlinked):hover { background: var(--color-text); color: #FFFFFF; }
.button--secondary:not(.is-unlinked):hover svg { transform: translateX(3px); }

.placeholder-text {
  color: var(--color-text-secondary);
  font-style: italic;
}

.slot {
  padding: 14px 18px;
  background: #F8F9FA;
  border: 1px dashed #BAC2CA;
  border-radius: var(--radius);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--color-accent);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* Main review block
   Mobile: title, then cover beside the introduction, then the actions.
   ========================================================================== */

.review-hero { padding-top: 20px; }

.review-hero__panel {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  grid-template-areas:
    "head head"
    "product body"
    "actions actions";
  gap: 20px 18px;
  padding: 22px 18px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent);
  border-radius: 8px;
}

.review-hero__head { grid-area: head; }
.review-hero__product { grid-area: product; }
.review-hero__body { grid-area: body; min-width: 0; }
.review-hero__actions { grid-area: actions; }

.review-hero__title {
  font-size: clamp(2.25rem, 1.7rem + 2.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.review-hero__subtitle {
  max-width: 48ch;
  margin-top: 12px;
  color: var(--color-text-secondary);
  font-size: 1.1875rem;
  line-height: 1.45;
}

/* Cover: shown whole, original proportions; placeholder only when the file is missing */

.review-hero__cover picture { display: block; }

.review-hero__cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(32, 37, 43, 0.12), 0 10px 24px rgba(32, 37, 43, 0.16);
}

.review-hero__cover .cover-placeholder { display: none; }

.review-hero__cover.is-missing {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(32, 37, 43, 0.10) 0, rgba(32, 37, 43, 0.02) 7%, transparent 9%),
    linear-gradient(160deg, #F4F6F7 0%, #E3E7EB 100%);
  border-radius: 2px 6px 6px 2px;
  box-shadow: 0 1px 3px rgba(32, 37, 43, 0.12), 0 12px 28px rgba(32, 37, 43, 0.14);
}

.review-hero__cover.is-missing img { display: none; }

.review-hero__cover.is-missing .cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.cover-placeholder svg {
  width: 30px;
  height: 30px;
  color: var(--color-placeholder-icon);
}

/* Introduction and actions */

.review-hero__body {
  display: grid;
  align-content: start;
  gap: 14px;
}

.review-hero__intro {
  max-width: 60ch;
  font-size: 1.125rem;
  line-height: 1.55;
}

.review-hero__intro p + p { margin-top: 12px; }

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.review-meta strong {
  color: var(--color-text);
  font-weight: 600;
}

.review-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 480px) {
  .review-hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

@media (min-width: 640px) {
  .review-hero { padding-top: 28px; }

  .review-hero__panel {
    grid-template-columns: 180px minmax(0, 1fr);
    grid-template-areas:
      "head head"
      "product ."
      "product body"
      "product actions"
      "product .";
    grid-template-rows: auto 1fr auto auto 1fr;
    gap: 0 36px;
    padding: 32px;
  }

  .review-hero__head { margin-bottom: 24px; }
  .review-hero__actions { margin-top: 22px; }
  .review-hero__intro { font-size: 1.1875rem; }
  .review-hero__subtitle { font-size: 1.3125rem; }
}

@media (min-width: 1024px) {
  .review-hero { padding-top: 32px; }

  .review-hero__panel {
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-areas:
      "product ."
      "product head"
      "product body"
      "product actions"
      "product .";
    grid-template-rows: 1fr auto auto auto 1fr;
    gap: 0 64px;
    padding: 44px 56px;
  }

  .review-hero__body { margin-top: 18px; }
  .review-hero__head { margin-bottom: 0; }
  .review-hero__intro { max-width: 58ch; }
  .review-hero__intro { font-size: 1.25rem; }
  .review-hero__actions { margin-top: 28px; }
  .cover-placeholder svg { width: 40px; height: 40px; }
}

/* Explore Survival MD Reviews: four topic cards, one column on mobile, 2 x 2 from 640px
   ========================================================================== */

.explore { scroll-margin-top: 16px; }

.explore__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.explore__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 20px 20px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.explore__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  background: rgba(139, 38, 53, 0.08);
  border-radius: 50%;
  color: var(--color-accent);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.explore__icon svg { width: 24px; height: 24px; }

.explore__card-title {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
}

.explore__desc {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

/* The CTA link covers the whole card. */
.explore__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--color-accent);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.explore__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.explore__arrow { transition: transform 0.2s var(--ease); }

.explore__cta:focus-visible { outline: none; }

.explore__card:has(.explore__cta:focus-visible) {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.explore__card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.explore__card:hover .explore__icon { background: var(--color-accent); color: #FFFFFF; }
.explore__card:hover .explore__cta { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.explore__card:hover .explore__arrow { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .explore__card:hover { transform: none; }
  .explore__card:hover .explore__arrow { transform: none; }
}

@media (min-width: 640px) {
  .explore__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .explore__card { padding: 24px 24px 22px; }
  .explore__card-title { font-size: 1.25rem; }
  .explore__desc { font-size: 1.0625rem; }
}

/* Sections
   ========================================================================== */

.section { padding-top: 48px; }

.section-head {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-text);
}

.section-head__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.section-head__title::before {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background: var(--color-accent);
}

.section-head__subtitle {
  margin-top: 4px;
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
}

@media (min-width: 1024px) {
  .section { padding-top: 64px; }
  .section-head__title { font-size: 1.875rem; }
  .section-head__subtitle { font-size: 1.125rem; }
}

/* Before You Buy cards (secondary)
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.card__media {
  position: relative;
  flex-shrink: 0;
  width: 112px;
  margin: 14px 0 14px 14px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-placeholder);
  border-radius: var(--radius-sm);
}

.card__media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--color-placeholder-icon);
}

.card__placeholder svg { width: 28px; height: 28px; }

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  height: 100%;
  padding: 12px 16px 16px;
}

.card__category {
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.card__title {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
}

.card__title .placeholder-text { font-weight: 600; }

.card__excerpt {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.card__footer {
  margin-top: auto;
  padding-top: 10px;
}

.card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-accent);
  font-size: 1rem;
  font-weight: 700;
}

.card__more svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s var(--ease);
}

/* Linked cards only: the title link covers the whole card. Static cards have no hover. */
.card__link {
  color: inherit;
  text-decoration: none;
}

.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card__link:focus-visible { outline: none; }

.card:has(.card__link:focus-visible) {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.card--linked:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card--linked:hover .card__link {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.card--linked:hover .card__more svg { transform: translateX(3px); }

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .card__title { font-size: 1.25rem; }
  .card__excerpt { font-size: 1.0625rem; }
}

/* Image on top only in the four-column desktop row; thumbnails elsewhere keep the cards secondary. */
@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .card {
    flex-direction: column;
    align-items: stretch;
  }

  .card__media {
    width: auto;
    margin: 0;
    border-radius: 0;
  }

  .card__placeholder svg { width: 34px; height: 34px; }

  .card__body { padding: 16px 18px 18px; }
}

/* Why Trust Survival MD Reviews: compact banner above the footer
   ========================================================================== */

.section--trust { padding-bottom: 56px; }

.trust {
  padding: 24px 20px;
  background: #FBF7F8;
  border: 1px solid #EAD9DC;
  border-radius: 8px;
}

.trust__title {
  margin-bottom: 18px;
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.2;
}

.trust__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.trust__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--color-accent);
  border-radius: 50%;
  color: #FFFFFF;
}

.trust__icon svg { width: 22px; height: 22px; }

.trust__item-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.trust__text {
  margin-top: 4px;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

@media (min-width: 900px) {
  .trust { padding: 28px 32px 30px; }
  .trust__title { font-size: 1.5rem; }

  .trust__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .section--trust { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; }

  .card--linked:hover { transform: none; }
}

/* Footer
   ========================================================================== */

.site-footer {
  background: var(--color-nav);
  color: var(--color-footer-text);
}

.site-footer .brand { color: #FFFFFF; }
.site-footer .wordmark { font-size: 1.375rem; }
.site-footer .wordmark__accent { color: var(--color-footer-accent); }
.site-footer :focus-visible { outline-color: #FFFFFF; }
.site-footer .placeholder-text { color: var(--color-footer-muted); }

.site-footer__top {
  display: grid;
  gap: 20px;
  padding-block: 32px 24px;
}

.site-footer__identity {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.site-footer__publisher { font-size: 1.0625rem; }

.site-footer__label {
  margin-right: 4px;
  color: #FFFFFF;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-link {
  display: inline-block;
  padding: 8px 0;
  color: var(--color-footer-text);
  font-size: 1.0625rem;
  text-decoration: none;
}

a.footer-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-link.is-pending {
  color: #8F98A2;
  cursor: default;
}

.site-footer__bottom {
  padding-block: 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--color-footer-muted);
  font-size: 1rem;
}

@media (min-width: 960px) {
  .site-footer__top {
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
    padding-block: 36px 28px;
  }
}

/* Featured image of article cards (homepage, category pages, "More in" lists)
   Without its own picture, the book cover is shown on a blurred backdrop of itself.
   ========================================================================== */

.featured {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #3A1219;
}

.featured__photo,
.featured__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured__backdrop {
  filter: blur(18px) saturate(1.1) brightness(0.7);
  transform: scale(1.25);
}

.featured__book {
  position: absolute;
  top: 12%;
  left: 50%;
  width: auto;
  height: 76%;
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s var(--ease);
}

.card--linked:hover .featured__book,
.article-list__item:hover .featured__book { transform: translateX(-50%) scale(1.04); }

.card__media .featured { position: absolute; inset: 0; aspect-ratio: auto; }

/* Search suggestions: the matching articles open under the field while typing */
.search { position: relative; }

.search__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(32, 37, 43, 0.18);
  text-align: left;
}

.search__results[hidden] { display: none; }

.search__result {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--color-text);
  text-decoration: none;
}

.search__result + .search__result { margin-top: 2px; }
.search__result:hover,
.search__result.is-active { background: #F6EEF0; }

.search__result-title {
  display: block;
  font-weight: 700;
  line-height: 1.3;
}

.search__result-meta {
  display: block;
  margin-top: 3px;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.4;
}

.search__result-cat {
  margin-right: 4px;
  color: var(--color-accent, #8B2332);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search__result mark {
  padding: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(139, 35, 50, 0.5);
  text-underline-offset: 2px;
}

.search__empty {
  margin: 0;
  padding: 12px;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

/* Bigger header, easy to read for every age: larger logo, search and menu */
.masthead .logo__image { height: 64px !important; }

@media (min-width: 960px) {
  .masthead .logo__image { height: 84px !important; }
  .masthead__inner { padding-block: 20px; }
  .masthead__inner { grid-template-columns: auto minmax(420px, 600px); }
  .search__input,
  .search__submit { height: 56px; font-size: 1.1875rem; }
  .search__submit { padding: 0 26px; }
  .search__icon { width: 22px; height: 22px; }
  .navbar__link,
  .navbar__link[aria-current="page"] { font-size: 1.1875rem; line-height: 62px; }
  .navbar__list { gap: 0 36px; }
}

@media (min-width: 1200px) {
  .navbar__list { gap: 0 46px; }
}

/* Before You Buy: carousel of every published article
   ========================================================================== */

.section-head--carousel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.carousel__controls { display: flex; flex-shrink: 0; gap: 10px; }

.carousel__arrow {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.carousel__arrow svg { width: 22px; height: 22px; }
.carousel__arrow:hover:not(:disabled) { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.carousel__arrow:disabled { opacity: 0.35; cursor: default; }

.carousel { outline: none; }
.carousel:focus-visible { outline: 3px solid var(--color-accent-ring); outline-offset: 4px; border-radius: 8px; }

.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 85%;
  gap: 16px;
  margin: 0;
  padding: 4px 2px 14px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.carousel__slide { display: flex; scroll-snap-align: start; min-width: 0; }

/* In the carousel every card shows its featured image on top */
.carousel__slide .card { flex: 1; flex-direction: column; align-items: stretch; }
.carousel__slide .card__media { width: auto; margin: 0; border-radius: 0; aspect-ratio: 1200 / 630; }
.carousel__slide .card__body { padding: 14px 16px 16px; }
.carousel__slide .card__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) { .carousel__track { grid-auto-columns: calc((100% - 20px) / 2); gap: 20px; } }
@media (min-width: 960px) { .carousel__track { grid-auto-columns: calc((100% - 40px) / 3); } }
@media (min-width: 1200px) { .carousel__track { grid-auto-columns: calc((100% - 60px) / 4); } }
@media (max-width: 639px) { .carousel__controls { display: none; } }
