/* ===== Review Detail — Section-Driven Editorial Layout ===== */

:root {
  --review-bg: #faf5ed;
  --review-surface: #f6efe5;
  --review-gold: #a98657;
  --review-gold-dark: #7d623f;
  --review-ink: #27241f;
  --review-muted: #655e54;
  --review-rule: rgba(70, 57, 40, 0.14);
}

#main-content {
  background: var(--review-bg);
  overflow-x: clip;
}

.site-container {
  width: min(calc(100% - 48px), 1280px);
  margin-inline: auto;
}

.case-article {
  padding-block: 48px 88px;
  color: var(--review-ink);
}

.review-editorial {
  width: min(100%, 900px);
  margin-inline: auto;
}

.review-client-composition {
  width: 100%;
}

/* ===== Breadcrumb ===== */
.review-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 48px;
  color: var(--review-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.review-breadcrumb a {
  color: var(--review-gold-dark);
  text-decoration: none;
}

.review-breadcrumb a:hover,
.review-breadcrumb a:focus-visible {
  text-decoration: underline;
}

.review-breadcrumb span[aria-hidden="true"] {
  color: rgba(39, 36, 31, 0.28);
}

/* ===== Section Geometry ===== */
.review-section {
  margin-inline: auto;
}

.review-client-composition > .review-section + .review-section {
  margin-top: 56px;
}

.review-client-composition > .review-section--cover + .review-section {
  margin-top: 80px;
}

.review-section--cover {
  width: clamp(260px, 24vw, 340px);
}

.review-section--narrow {
  width: min(100%, 620px);
}

.review-section--standard {
  width: min(100%, 800px);
}

.review-section--wide {
  width: min(100%, 900px);
}

.review-section--left {
  margin-left: 0;
  margin-right: auto;
}

.review-section--center {
  margin-inline: auto;
}

.review-section__title {
  margin: 0 0 20px;
  color: var(--review-ink);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

/* ===== Images ===== */
.review-image {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
}

.review-image:focus-visible {
  outline: 2px solid var(--review-gold);
  outline-offset: 4px;
}

.review-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.review-image__caption {
  margin-top: 8px;
  color: var(--review-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.review-cover {
  width: 100%;
}

/* ===== Explicit Grids ===== */
.review-grid {
  display: grid;
  grid-template-columns: repeat(var(--review-columns), minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.review-grid--comparison,
.review-grid--image,
.review-grid--result,
.review-grid--media,
.review-grid--grouped {
  width: 100%;
}

/* ===== Article ===== */
.review-article-content {
  color: var(--review-ink);
}

.review-article-content__title {
  margin: 0 0 22px;
  color: var(--review-ink);
  font-size: clamp(1.8rem, 2.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.35;
}

.review-article-content__body h2 {
  margin: 32px 0 14px;
  color: var(--review-ink);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.45;
}

.review-article-content__body h2:first-child {
  margin-top: 0;
}

.review-article-content__body p {
  margin: 0 0 18px;
  color: var(--review-muted);
  font-size: 1.04rem;
  line-height: 1.85;
}

.review-article-content__body p:last-child {
  margin-bottom: 0;
}

/* ===== Full-Width and Grouped Galleries ===== */
.review-full-width-gallery {
  display: grid;
  gap: 18px;
}

.review-grouped-gallery__group + .review-grouped-gallery__group {
  margin-top: 48px;
}

.review-grouped-gallery__label {
  margin: 0 0 18px;
  color: var(--review-gold-dark);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

/* ===== Related Reviews ===== */
.review-related {
  width: min(100%, 1100px);
  margin: 112px auto 0;
  padding-top: 44px;
  border-top: 1px solid var(--review-rule);
}

.review-related > h2 {
  margin: 0 0 24px;
  color: var(--review-ink);
  font-size: 1.45rem;
  font-weight: 700;
}

.review-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.review-related__card {
  display: block;
  min-width: 0;
  color: var(--review-ink);
  text-decoration: none;
}

.review-related__card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--review-surface);
}

.review-related__card span {
  display: block;
  margin-top: 13px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
}

.review-related__card:hover span,
.review-related__card:focus-visible span {
  color: var(--review-gold-dark);
}

/* ===== Secondary CTA ===== */
.review-cta {
  width: min(100%, 800px);
  margin: 84px auto 0;
  padding: 40px 24px 0;
  border-top: 1px solid var(--review-rule);
  text-align: center;
}

.review-cta h2 {
  margin: 0 0 10px;
  color: var(--review-ink);
  font-size: clamp(1.55rem, 2.2vw, 1.9rem);
  font-weight: 700;
}

.review-cta p {
  max-width: 540px;
  margin: 0 auto 24px;
  color: var(--review-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.review-cta__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.review-cta__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--review-gold);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.review-cta__primary {
  background: var(--review-gold);
  color: #fff;
}

.review-cta__secondary {
  background: transparent;
  color: var(--review-gold-dark);
}

.review-cta__actions a:hover,
.review-cta__actions a:focus-visible {
  border-color: var(--review-gold-dark);
  background: var(--review-gold-dark);
  color: #fff;
}

/* ===== Empty State ===== */
.review-not-found {
  padding: 88px 16px;
  text-align: center;
}

.review-not-found h1 {
  margin: 0 0 10px;
  font-size: 1.7rem;
}

.review-not-found p {
  margin: 0 0 22px;
  color: var(--review-muted);
}

.review-not-found a {
  color: var(--review-gold-dark);
  font-weight: 700;
}

/* ===== Lightbox ===== */
body.review-lightbox-open {
  overflow: hidden;
}

.review-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(18, 16, 13, 0.94);
  touch-action: pan-y;
}

.review-lightbox.is-open {
  display: flex;
}

.review-lightbox__image {
  display: block;
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  object-fit: contain;
}

.review-lightbox__close,
.review-lightbox__nav {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  place-items: center;
  cursor: pointer;
}

.review-lightbox__close {
  top: 18px;
  right: 18px;
  font-size: 1.8rem;
}

.review-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
}

.review-lightbox__prev { left: 18px; }
.review-lightbox__next { right: 18px; }

.review-lightbox__caption {
  position: absolute;
  right: 24px;
  bottom: 18px;
  left: 24px;
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .review-related {
    width: min(100%, 900px);
  }
}

@media (max-width: 767px) {
  .site-container {
    width: calc(100% - 32px);
  }

  .case-article {
    padding-block: 32px 64px;
  }

  .review-editorial {
    width: 100%;
  }

  .review-breadcrumb {
    margin-bottom: 40px;
    font-size: 0.78rem;
  }

  .review-section--cover {
    width: min(100%, 320px);
  }

  .review-client-composition > .review-section + .review-section {
    margin-top: 44px;
  }

  .review-client-composition > .review-section--cover + .review-section {
    margin-top: 64px;
  }

  .review-grid {
    grid-template-columns: repeat(var(--review-mobile-columns), minmax(0, 1fr));
    gap: 8px;
  }

  .review-full-width-gallery {
    gap: 8px;
  }

  .review-article-content__title {
    font-size: 1.65rem;
  }

  .review-article-content__body h2 {
    margin-top: 26px;
    font-size: 1.16rem;
  }

  .review-article-content__body p {
    font-size: 0.96rem;
    line-height: 1.78;
  }

  .review-related {
    margin-top: 88px;
    padding-top: 36px;
  }

  .review-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .review-related__card:last-child:nth-child(odd) {
    display: none;
  }

  .review-related__card span {
    margin-top: 10px;
    font-size: 0.88rem;
  }

  .review-cta {
    margin-top: 72px;
    padding-inline: 0;
  }

  .review-lightbox {
    padding: 16px;
  }

  .review-lightbox__nav {
    display: none;
  }
}

@media (max-width: 390px) {
  .site-container {
    width: calc(100% - 28px);
  }

  .review-breadcrumb span[aria-current="page"] {
    flex-basis: 100%;
  }

  .review-cta__actions {
    flex-direction: column;
  }

  .review-cta__actions a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .review-related__card,
  .review-cta__actions a {
    transition: none;
  }
}
