/* ═══════════════════════════════════════════════════════════════════════════
   Real Estate Moguls — Homepage Styles (rem-home.css)
   Matches approved wireframe: rem-homepage-wireframe-final.html
   All classes prefixed rem-hp- to avoid conflicts with other templates.
   ═══════════════════════════════════════════════════════════════════════════ */


/* ── HERO ────────────────────────────────────────────────────────────────── */

.rem-hp-hero {
  position: relative;
  height: calc(100dvh - 95px);
  min-height: 560px;
  overflow: hidden;
}

.rem-hp-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.rem-hp-hero-bg--fallback {
  background: linear-gradient(160deg, #1A2A3A 0%, #4A5568 35%, #2A3A4A 70%, #0D1B2A 100%);
}

.rem-hp-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(13,27,42, 0.95) 0%,
    rgba(13,27,42, 0.85) 22%,
    rgba(13,27,42, 0.55) 50%,
    rgba(13,27,42, 0.20) 75%,
    rgba(13,27,42, 0) 100%
  );
}

.rem-hp-hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 0 80px 40px;
}

.rem-hp-hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
  max-width: none;
  width: auto;
  padding: 0;
  margin: 0;
}

.rem-hp-hero-date {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,255,255, 0.2);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.rem-hp-hero-cat {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent, #C9A84C);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--accent, #C9A84C);
}

.rem-hp-hero-title {
  font-family: var(--font-display, 'Afacad', sans-serif);
  font-size: clamp(35px, 3.5vw, 51px);
  font-weight: 800;
  color: #fff;
  line-height: 1.08;
  margin-bottom: 20px;
}
.rem-hp-hero-title a {
  color: inherit;
  text-decoration: none;
}

.rem-hp-hero-rule {
  width: 56px;
  height: 2px;
  background: var(--primary, #29ABE2);
  margin-bottom: 20px;
}

.rem-hp-hero-excerpt {
  font-size: 18px;
  color: rgba(255,255,255, 0.45);
  line-height: 1.7;
  margin-bottom: 24px;
}

.rem-hp-hero-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255, 0.06);
}

.rem-hp-hero-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent, #C9A84C);
  object-fit: cover;
  flex-shrink: 0;
}
.rem-hp-hero-av--placeholder {
  background: var(--slate, #4A5568);
}

.rem-hp-hero-author {
  font-family: var(--font-display, 'Afacad', sans-serif);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.rem-hp-hero-role {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--accent, #C9A84C);
}

.rem-hp-hero-time {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255, 0.25);
  margin-left: auto;
}

.rem-hp-hero-read {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary, #29ABE2);
  text-decoration: none;
  display: block;
  margin-top: 16px;
}

.rem-hp-hero-thumbs {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
  width: 110px;
  margin: 0;
  padding: 0;
}
.rem-hp-thumb {
  display: block;
  width: 100%;
  height: 62px;
  flex-shrink: 0;
  overflow: hidden;
  opacity: 0.45;
  transition: opacity 0.3s;
  position: relative;
}
.rem-hp-thumb.active, .rem-hp-thumb:hover { opacity: 1; }
.rem-hp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rem-hp-thumb.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent, #C9A84C);
}


/* ── SECTION UTILITIES ───────────────────────────────────────────────────── */

.rem-hp-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent, #C9A84C);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.rem-hp-sec-title {
  font-family: var(--font-display, 'Afacad', sans-serif);
  font-size: clamp(27px, 2.5vw, 39px);
  font-weight: 700;
  color: #fff;
}

.rem-hp-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255, 0.06);
}

.rem-hp-sec-link {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,255,255, 0.35);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.rem-hp-sec-link:hover { color: #fff; }


/* ── EPISODES ────────────────────────────────────────────────────────────── */

.rem-hp-episodes {
  padding: 64px 0 64px 56px;
  background: var(--slate, #4A5568);
}

.rem-hp-episodes-header {
  padding-right: 56px;
}

.rem-hp-ep-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-right: 56px;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.rem-hp-ep-scroll::-webkit-scrollbar { display: none; }

.rem-hp-ep-card {
  flex-shrink: 0;
  width: 320px;
  cursor: pointer;
  transition: transform 0.3s;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}
.rem-hp-ep-card:hover { transform: translateY(-4px); }

.rem-hp-ep-thumb {
  aspect-ratio: 16 / 9;
  background: var(--authority, #0D1B2A);
  position: relative;
  margin-bottom: 14px;
  overflow: hidden;
}
.rem-hp-ep-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rem-hp-ep-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(41,171,226, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.rem-hp-ep-card:hover .rem-hp-ep-play {
  transform: translate(-50%, -50%) scale(1.1);
}

.rem-hp-ep-num {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary, #29ABE2);
  margin-bottom: 4px;
}

.rem-hp-ep-title {
  font-family: var(--font-display, 'Afacad', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
}

.rem-hp-ep-host {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255,255,255, 0.35);
}


/* ── EDITORIAL ───────────────────────────────────────────────────────────── */

.rem-hp-editorial {
  padding: 48px 56px;
  background:
    linear-gradient(150deg,
      rgba(201,168,76, 0.08) 0%,
      rgba(201,168,76, 0.04) 40%,
      rgba(201,168,76, 0) 75%
    ),
    var(--authority, #0D1B2A);
}

.rem-hp-ed-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 24px;
  align-items: center;
}

.rem-hp-ed-featured-img {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--slate, #4A5568);
  overflow: hidden;
}
.rem-hp-ed-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rem-hp-ed-cat {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent, #C9A84C);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.rem-hp-ed-title {
  font-family: var(--font-display, 'Afacad', sans-serif);
  font-size: 27px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 12px;
}
.rem-hp-ed-title a {
  color: inherit;
  text-decoration: none;
}

.rem-hp-ed-excerpt {
  font-size: 14px;
  color: rgba(255,255,255, 0.4);
  line-height: 1.7;
  margin-bottom: 12px;
}

.rem-hp-ed-meta {
  font-family: var(--font-body);
  font-size: 15px;
  color: rgba(255,255,255, 0.25);
}
.rem-hp-ed-author {
  font-weight: 700;
  color: rgba(255,255,255, 0.5);
}
.rem-hp-ed-author-role {
  font-size: 12px;
  color: rgba(255,255,255, 0.25);
}

.rem-hp-ed-read {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary, #29ABE2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  margin-top: 12px;
  display: inline-block;
}

.rem-hp-ed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 20px;
  row-gap: 28px;
}

.rem-hp-ed-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s;
}
.rem-hp-ed-card:hover { transform: translateY(-4px); }

.rem-hp-ed-card-img {
  aspect-ratio: 16 / 9;
  background: var(--slate, #4A5568);
  margin-bottom: 24px;
  overflow: hidden;
}
.rem-hp-ed-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rem-hp-ed-card-cat {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent, #C9A84C);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.rem-hp-ed-card-title {
  font-family: var(--font-display, 'Afacad', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 15px;
}

.rem-hp-ed-card-meta {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255, 0.25);
}
.rem-hp-ed-card-author {
  font-weight: 700;
  color: rgba(255,255,255, 0.4);
}
.rem-hp-ed-card-author-role {
  font-size: 11px;
  color: rgba(255,255,255, 0.2);
}


/* ── COMMUNITY ───────────────────────────────────────────────────────────── */

.rem-hp-community {
  padding: 72px 56px;
  background: linear-gradient(160deg, var(--authority, #0D1B2A) 0%, #0F2236 100%);
}

.rem-hp-mem-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.rem-hp-mem-scroll::-webkit-scrollbar { display: none; }

.rem-hp-mem-card {
  flex-shrink: 0;
  width: calc((100% - 72px) / 4);
  min-width: 200px;
  cursor: pointer;
  transition: transform 0.3s;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}
.rem-hp-mem-card:hover { transform: translateY(-4px); }

.rem-hp-mem-photo {
  aspect-ratio: 4 / 5;
  background: var(--slate, #4A5568);
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255, 0.04);
  overflow: hidden;
}
.rem-hp-mem-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rem-hp-mem-name {
  font-family: var(--font-display, 'Afacad', sans-serif);
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.rem-hp-mem-role {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--accent, #C9A84C);
}

.rem-hp-mem-badge {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255, 0.3);
  text-transform: uppercase;
  margin-top: 4px;
}

.rem-hp-mem-cta {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary, #29ABE2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 8px;
  display: block;
}


/* ── INVITATION ──────────────────────────────────────────────────────────── */

.rem-hp-invite {
  padding: 72px 56px;
  background: var(--authority, #0D1B2A);
  border-top: 1px solid rgba(201,168,76, 0.1);
  border-bottom: 1px solid rgba(201,168,76, 0.1);
}

.rem-hp-invite-inner {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 48px;
  align-items: center;
}

.rem-hp-invite-rule {
  background: rgba(201,168,76, 0.12);
  height: 100%;
  min-height: 160px;
}

.rem-hp-invite-title {
  font-family: var(--font-display, 'Afacad', sans-serif);
  font-size: 33px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 12px;
}

.rem-hp-invite-body {
  font-size: 17px;
  color: rgba(255,255,255, 0.4);
  line-height: 1.7;
}

.rem-hp-invite-right {
  text-align: center;
}

.rem-hp-invite-eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent, #C9A84C);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.rem-hp-invite-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--authority, #0D1B2A);
  background: var(--accent, #C9A84C);
  padding: 14px 40px;
  text-decoration: none;
  transition: background 0.2s;
}
.rem-hp-invite-btn:hover { background: #b8923e; }

.rem-hp-invite-note {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255, 0.2);
  margin-top: 14px;
}


/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .rem-hp-hero-bottom {
    padding: 0 32px 32px;
    gap: 16px;
  }
  .rem-hp-hero-thumbs { width: 88px; }
  .rem-hp-thumb { height: 50px; }
  .rem-hp-hero-content {
    max-width: none;
    padding: 0;
  }
  .rem-hp-hero-badge { left: auto; right: 24px; top: 20px; }
  .rem-hp-ed-featured { grid-template-columns: 1fr; }
  .rem-hp-ed-grid { grid-template-columns: repeat(2, 1fr); }
  .rem-hp-invite-inner { grid-template-columns: 1fr; }
  .rem-hp-invite-rule { display: none; }
  .rem-hp-invite-right { margin-top: 24px; }
}

@media (max-width: 768px) {
  .rem-hp-hero {
    min-height: calc(100svh - 75px);
    height: calc(100svh - 75px);
  }
  .rem-hp-hero-bottom {
    padding: 0 24px 24px;
    gap: 0;
  }
  .rem-hp-hero-content {
    flex: 1;
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }
  .rem-hp-hero-title { font-size: 28px; }
  .rem-hp-hero-excerpt {
    font-size: 14px;
    margin-bottom: 16px;
  }
  .rem-hp-hero-badge {
    left: auto;
    right: 16px;
    top: 16px;
  }
  .rem-hp-hero-date { margin-bottom: 12px; }
  .rem-hp-hero-cat {
    margin-bottom: 10px;
    font-size: 9px;
  }
  .rem-hp-hero-byline {
    flex-wrap: wrap;
    gap: 8px;
  }
  .rem-hp-hero-time {
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
  }
  .rem-hp-hero-thumbs {
    display: none;
  }
  .rem-hp-thumb {
    height: 40px;
    width: auto;
  }
  .rem-hp-episodes { padding: 48px 0 48px 24px; }
  .rem-hp-episodes-header { padding-right: 24px; }
  .rem-hp-ep-card { width: 260px; }
  .rem-hp-editorial { padding: 48px 24px; }
  .rem-hp-ed-grid { grid-template-columns: 1fr; gap: 32px; }
  .rem-hp-ed-card {
    margin-bottom: 20px;
  }
  .rem-hp-ed-card:last-child {
    margin-bottom: 0;
  }
  .rem-hp-community { padding: 48px 24px; }
  .rem-hp-mem-card { width: calc((100% - 24px) / 2); min-width: 160px; }
  .rem-hp-invite { padding: 48px 24px; }
}

@media (max-width: 480px) {
  .rem-hp-hero-bottom {
    padding: 0 20px 20px;
  }
  .rem-hp-hero-content {
    padding: 0;
  }
  .rem-hp-hero-title { font-size: 24px; }
  .rem-hp-hero-excerpt {
    font-size: 13px;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .rem-hp-hero-badge { font-size: 8px; padding: 4px 10px; }
  .rem-hp-thumb { height: 32px; }
  .rem-hp-mem-card { width: calc(100% - 48px); min-width: 0; }
}
