/* ==========================================================================
   rea-ratings-slider.css
   WEBBAU-398 — REA Ratings module + Agent hero/profile widget
   LJ Hooker Agent Pages — Frontend prototype handover

   INTEGRATOR: copy this file into your platform to integrate the module.
   No framework dependencies. No vendor libraries. Vanilla CSS only.
   Design native viewport: 1920px.

   This file covers:
     1. Design tokens (CSS custom properties)
     2. Hero / profile widget  (.rea-module__hero)
     3. Aggregated rating block  (.rating-aggregate)
     4. Awards placeholder  (.rea-module__hero__awards) — replace with real CMS content
     5. REA Ratings module  (.rea-module__testimonials / #testimonials)
     6. Responsive breakpoints for all of the above

   Pair with: rea-ratings-slider.js (vanilla JS slider, no deps)
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   Wire these to your platform's design system, or leave as-is to match
   the LJ Hooker brand values used in this prototype.
   ========================================================================== */
:root {
  --rea-module-color-bg:           #fffcf5;   /* Warm cream — page canvas */
  --rea-module-color-ink:          #161616;   /* Near-black — body text, headings */
  --rea-module-color-muted:        #7A7A7A;   /* Muted grey — date, captions */
  --rea-module-color-rating-star:  #F5C518;   /* Gold — star icon tint (image asset) */
  --rea-module-color-cta-bg:       #5E211C;   /* Maroon — primary CTA fill */
  --rea-module-color-cta-bg-hover: #360000;   /* Maroon dark — primary CTA hover */
  --rea-module-color-cta-text:     white;   /* White — primary CTA label */
  --rea-module-color-dot:          #D9D9D9;   /* Light grey — inactive pager dot */
  --rea-module-color-dot-active:   #161616;   /* Near-black — active pager dot */

  --rea-module-gutter-x:     100px;   /* Side padding — top bar, brand bar, REA module */
  --rea-module-design-width: 1920px;  /* Native design viewport width */
}


/* ==========================================================================
   2. HERO / PROFILE WIDGET
   Two-column layout: agent photo left, profile content right.
   Content column is centred both horizontally and vertically.
   ========================================================================== */
.rea-module__hero {
  font-family: var(--ljh-font-family, "Instrument Sans");
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  background: var(--rea-module-color-bg);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.rea-module__hero,
.rea-module__hero *, 
.rea-module__hero *::before, 
.rea-module__hero *::after {
    box-sizing: border-box;
}
.rea-module__hero__photo {
  position: relative;
  overflow: hidden;
  background: #ddd;
}
.rea-module__hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.rea-module__hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 60px;
  background: var(--rea-module-color-bg, #FFFCF5);
  text-align: center;
}
.rea-module__hero__inner {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rea-module__hero__name {
  font-size: 50px;
  line-height: 1;
  font-weight: 600;
  margin: 0 0 18px 0;
  color: var(--rea-module-color-ink);
}
.rea-module__hero__role {
  margin: 0;
  font-size: 18.5px;
  line-height: 23px;
  font-weight: 400;
  color: var(--rea-module-color-ink);
}
.rea-module__hero__role + .rea-module__hero__role { margin-top: 0; }
.rea-module__hero__phone-line {
  margin: 0 0 32px 0;
  font-size: 18.5px;
  line-height: 23px;
  font-weight: 400;
}
.rea-module__hero__phone-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rea-module__hero__social {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin: 0;
}
.rea-module__hero__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
}
.rea-module__hero__social img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.rea-module__hero__tagline {
  margin: 75px 0 75px 0;
  font-size: 20px;
  line-height: 31.2px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rea-module-color-ink);
  white-space: nowrap;
}
.rea-module__hero__cta {
  --ljh-button-color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 540px;
  max-width: 100%;
  height: 63px;
  border-radius: 999px;
  background-color: var(--ljh-button-bgcolor, var(--rea-module-color-cta-bg));
  border: 1px solid var(--ljh-button-border-color, var(--rea-module-color-cta-bg));
  color: var(--ljh-button-color, var(--rea-module-color-cta-text));
  font-size: 24px;
  line-height: 31.2px;
  font-weight: 500;
  margin-bottom: 75px;
  transition: all 160ms ease;
}
.rea-module__hero__cta:hover,
.rea-module__hero__cta:focus-visible {
  /* background-color: var(--ljh-button-bgcolor-hover, var(--rea-module-color-cta-bg-hover)); */
  background-color: transparent;
  color: var(--ljh-button-color-hover, var(--rea-module-color-cta-bg));
  outline: none;
}


/* ==========================================================================
   3. AGGREGATED RATING BLOCK
   Shared component used in two contexts:
     - Hero: wrapped in <a href="#testimonials"> — entire block is clickable
     - REA module header: plain <div> — not clickable
   Module-header size overrides are in section 5.
   ========================================================================== */
.rating-aggregate {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--rea-module-color-ink);
}
.rating-aggregate--hero { font-weight: 600; }
.rating-aggregate__star {
  --star-size: 38px;
  width: var(--star-size);
  height: var(--star-size);
  flex: 0 0 var(--star-size);
}
.rating-aggregate__score {
  font-size: 45px;
  line-height: 23px;
  font-weight: 600;
}
.rating-aggregate__count {
  font-size: 24px;
  line-height: 23px;
  font-weight: 600;
  margin-left: 2px;
  height: 100%;
  display: inline-flex;
  align-items: flex-end;
}
a.rating-aggregate { cursor: pointer; }
a.rating-aggregate:hover { color: var(--ljh-button-color-hover, var(--rea-module-color-cta-bg)); }


/* ==========================================================================
   4. HERO AWARDS PLACEHOLDER
   Shown when the awards module is selected instead of the REA rating.
   Placeholder only — no real awards design was supplied in this prototype.
   Final award content and visual design must come from Bedrock/CMS.
   ========================================================================== */
.rea-module__hero__awards {
  margin: 0;
  text-align: center;
}
.rea-module__hero__awards--placeholder {
  display: inline-block;
  border: 1px dashed #B5A88A;
  border-radius: 6px;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.4);
}
.rea-module__hero__awards-label {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rea-module-color-ink);
}
.rea-module__hero__awards-list {
  list-style: none;
  margin: 12px 0 0 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--rea-module-color-ink);
}
.rea-module__hero__awards-list li + li { margin-top: 2px; }
.rea-module__hero__awards-note {
  margin: 10px 0 0 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--rea-module-color-muted);
  font-style: italic;
}


/* ==========================================================================
   5. REA RATINGS MODULE  (id="testimonials")
   Aggregated header, review slider, pager dots, REA logo lockup.
   Only the REA logo <a> is clickable. Everything else is non-clickable.
   ========================================================================== */
.rea-module__testimonials {
  font-family: var(--ljh-font-family, "Instrument Sans");
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  background: white;
  padding: 80px var(--rea-module-gutter-x);
}
.rea-module__testimonials,
.rea-module__testimonials *, 
.rea-module__testimonials *::before, 
.rea-module__testimonials *::after {
    box-sizing: border-box;
}
.rea-module__inner {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  row-gap: 0;
}
.rea-module__header { margin-bottom: 56px; }
.rea-module__slider { margin-bottom: 0; }

/* Module aggregate header — non-clickable, smaller size than the hero block */
.rea-module__header {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.rea-module__header .rating-aggregate__star {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}
.rea-module__header .rating-aggregate__score { font-size: 36px; }
.rea-module__header .rating-aggregate__count { font-size: 20px; }

/* Slider */
.rea-module__slider { position: relative; }
.rea-module__track {
  position: relative;
  min-height: 160px;
}
.rea-module__slide {
  display: grid;
  grid-template-columns: minmax(260px, 400px) minmax(0, 998px);
  column-gap: 72px;
  align-items: start;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  inset: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}
.rea-module__slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
  pointer-events: auto;
}

/* Review card — left column (meta) */
.review-meta { display: flex; flex-direction: column; }
.review-meta__stars-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.review-meta__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transform: translateY(-2px);
}
.review-meta__stars img { width: 19.25px; height: 19.25px; }
.review-meta__score {
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  color: var(--rea-module-color-ink);
  height: 100%;
  display: inline-flex;
  align-items: flex-end;
}
.review-meta__author {
  margin: 8px 0 0 0;
  font-size: 20px;
  line-height: 23px;
  font-weight: 400;
  color: var(--rea-module-color-ink);
}
.review-meta__date {
  margin: 4px 0 0 0;
  font-size: 16px;
  line-height: 23px;
  font-weight: 400;
  color: var(--rea-module-color-muted);
}
.review-meta__verified {
  margin-top: 32px;
  width: 150px;
  height: 24px;
  user-select: none;
}

/* Review card — right column (body) */
.review-body {
  font-size: 18.5px;
  line-height: 23px;
  font-weight: 400;
  color: var(--rea-module-color-ink);
  max-width: 998px;
  margin: 0;
}

/* Footer row: [spacer] [dots pager] [REA logo] */
.rea-module__footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  column-gap: 24px;
}
.rea-module__dots {
  grid-column: 2;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 0;
}
.rea-module__dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--rea-module-color-dot);
  border: 0;
  padding: 0;
  transition: background 160ms ease;
  cursor: pointer;
}
.rea-module__dot[aria-current="true"] { background: var(--rea-module-color-dot-active); }
.rea-module__dot:focus-visible {
  outline: 2px solid var(--rea-module-color-ink);
  outline-offset: 3px;
}

/* REA logo lockup — the only clickable element in the module.
   Caption ("Ratings and Reviews provided by") is baked into rea-logo.png. */
.rea-module__provider {
  grid-column: 3;
  justify-self: end;
  margin: 0;
}
.rea-module__provider a { display: inline-block; }
.rea-module__provider img {
  width: 184px;
  height: auto;
  display: block;
}


/* ==========================================================================
   6. RESPONSIVE
   Breakpoints: 1439 / 1199 / 991 / 767 / 575
   --rea-module-gutter-x overrides live here because this file owns the
   :root token block. The top utility bar and brand bar (context-only, in
   style.css) also use var(--rea-module-gutter-x) and will pick up these
   overrides automatically.
   ========================================================================== */
@media (min-width: 992px) {
  .rea-module__hero__content:has(.rea-module__hero__photo) { min-height: 640px; }
  .rea-module__hero:not(:has(.rea-module__hero__photo)) { display: block; min-height: auto; }
  .rea-module__footer {
    margin-top: 20px;
    align-items: center;
  }
}
/* Tablet landscape (1200–1439) — iPad Pro 12.9" landscape.
   Hero stays 50/50; height and photo crop adjusted. */
@media (min-width: 1200px) and (max-width: 1439.98px) {
  .rea-module__hero { min-height: 720px; }
  .rea-module__hero__photo img { object-position: center 20%; }
  .rea-module__hero__content { padding: 60px 48px; }
}

/* Small tablet landscape (992–1199) — iPad Mini / Air / Pro 11" landscape.
   Hero stays 50/50; content column compresses to fit. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  :root { --rea-module-gutter-x: 60px; }
  .rea-module__hero__photo img { object-position: center 15%; }
  .rea-module__hero__content { padding: 50px 28px; }
  .rea-module__hero__inner { max-width: 480px; }
  .rea-module__hero__name { font-size: 40px; margin-bottom: 14px; }
  .rea-module__hero__phone-line { margin-bottom: 24px; }
  .rea-module__hero__social { margin-bottom: 28px; }
  .rea-module__hero__tagline {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.2em;
    white-space: normal;
    margin: 35px 0 35px 0;
  }
  .rea-module__hero__cta {
    width: 100%;
    max-width: 480px;
    height: 56px;
    font-size: 20px;
    margin-bottom: 35px;
  }
  .rating-aggregate__star { width: 36px; height: 36px; flex-basis: 36px; }
  .rating-aggregate__score { font-size: 36px; }
  .rating-aggregate__count { font-size: 20px; }
  .rea-module__slide { column-gap: 32px; }
  .rea-module__hero__awards-label { font-size: 12px; }
  .rea-module__hero__awards-list { font-size: 14px; }
  .rea-module__hero__awards-note { font-size: 12px; }
  .rea-module__hero__awards--placeholder { padding: 14px 20px; }
}

/* Portrait tablet + mobile (≤991) — iPad portrait, phones. Page stacks. */
@media (max-width: 991.98px) {
  :root { --rea-module-gutter-x: 60px; }

  /* Hero stacks: photo on top, content below */
  .rea-module__hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .rea-module__hero__photo { height: auto; }
  .rea-module__hero__photo img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: initial;
    object-position: initial;
  }
  .rea-module__hero__content { padding: 40px 32px; }
  .rea-module__hero__inner { max-width: 720px; }
  .rea-module__hero__tagline { margin: 35px 0 35px 0; white-space: normal; }
  .rea-module__hero__cta { margin-bottom: 35px; }

  /* REA module collapses to single column */
  .rea-module__testimonials { padding: 64px var(--rea-module-gutter-x); }
  .rea-module__slide {
    grid-template-columns: 1fr;
    column-gap: 48px;
    row-gap: 24px;
  }
  .rea-module__footer {
    grid-template-columns: 1fr;
    row-gap: 34px;
    justify-items: center;
  }
  .rea-module__dots { grid-column: 1; }
  .rea-module__provider { grid-column: 1; justify-self: center; text-align: center; }
}

@media (max-width: 767.98px) {
  :root { --rea-module-gutter-x: 32px; }

  .rea-module__hero__name { font-size: 40px; }
  .rea-module__hero__cta { width: 100%; height: 56px; font-size: 20px; }
  .rea-module__hero__tagline { font-size: 16px; letter-spacing: 0.25em; white-space: normal; }

  .rating-aggregate__star { width: 36px; height: 36px; flex-basis: 36px; }
  .rating-aggregate__score { font-size: 36px; }
  .rating-aggregate__count { font-size: 20px; }

  .rea-module__header .rating-aggregate__star { width: 28px; height: 28px; flex-basis: 28px; }
  .rea-module__header .rating-aggregate__score { font-size: 28px; }
  .rea-module__header .rating-aggregate__count { font-size: 18px; }

  .review-body { font-size: 17px; line-height: 22px; }
}

@media (max-width: 575.98px) {
  :root { --rea-module-gutter-x: 20px; }
  .rea-module__hero__content { padding: 40px 20px; }
}
