/*
Theme Name: MSP Real Estate Modern
Theme URI: https://msprealestateinc.com/
Author: Internal
Description: A custom theme matching the MSP Real Estate v0 design.
Version: 0.3.19
Text Domain: msp-realestate-modern
*/

/*
  Minimal WP-specific tweaks.
  Most layout is handled via Tailwind utility classes.
*/

/* Fixed header offset (used if templates forget to add padding) */
body {
  scroll-behavior: smooth;
}

/* Tailwind v4 utility used in the prototype; add a simple fallback for CDN Tailwind */
.text-balance {
  text-wrap: balance;
}

.msp-filter-select-wrap {
  position: relative;
}

.msp-filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  min-height: 3.4rem;
  border: 1px solid #d4d0c4;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8f5ed 100%);
  padding: 0.9rem 3rem 0.9rem 1rem;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1b365d;
  box-shadow: 0 8px 24px rgba(27, 54, 93, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.msp-filter-select:hover {
  border-color: #b9b29f;
}

.msp-filter-select:focus {
  outline: none;
  border-color: #82c5ff;
  box-shadow: 0 0 0 3px rgba(130, 197, 255, 0.22);
  background: #fff;
}

.msp-filter-select-icon {
  pointer-events: none;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: rgba(27, 54, 93, 0.72);
}

/* Make WordPress admin bar play nicely with our fixed header */
.admin-bar header {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar header {
    top: 46px;
  }
}

.msp-legacy-community-hero {
  position: relative;
  overflow: hidden;
  background: #102846;
}

.msp-legacy-community-hero__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.03);
}

.msp-legacy-community-hero__inner {
  padding-top: clamp(13.5rem, 18vw, 16rem);
  padding-bottom: clamp(4.5rem, 7vw, 6.5rem);
}

.admin-bar .msp-legacy-community-hero__inner {
  padding-top: calc(clamp(13.5rem, 18vw, 16rem) + 32px);
}

@media (max-width: 782px) {
  .admin-bar .msp-legacy-community-hero__inner {
    padding-top: calc(clamp(13.5rem, 18vw, 16rem) + 46px);
  }
}

.msp-legacy-community-visual-column {
  display: grid;
  gap: 1.25rem;
}

.msp-legacy-community-image-card {
  overflow: hidden;
  border: 6px solid rgba(246, 244, 234, 0.94);
  border-radius: 26px;
  box-shadow: 0 26px 70px rgba(9, 24, 44, 0.35);
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.15);
}

.msp-legacy-community-sidecard {
  border: 1px solid rgba(212, 208, 196, 0.7);
  border-radius: 24px;
  background: rgba(255, 252, 245, 0.96);
  padding: 1.1rem 1.15rem;
  box-shadow: 0 18px 44px rgba(11, 30, 53, 0.16);
}

.msp-legacy-community-sidecard__eyebrow {
  margin: 0 0 0.85rem;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4e79b0;
}

.msp-legacy-community-sidecard__list {
  display: grid;
  gap: 0.8rem;
}

.msp-legacy-community-sidecard__list strong {
  display: block;
  margin-top: 0.18rem;
  color: #1b365d;
  font-size: 1rem;
}

.msp-legacy-community-sidecard__label {
  display: block;
  color: rgba(27, 54, 93, 0.66);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.msp-legacy-community-intro-card {
  border: 1px solid rgba(212, 208, 196, 0.9);
  border-radius: 30px;
  background: rgba(255, 252, 245, 0.985);
  padding: clamp(1.5rem, 2vw, 2.6rem);
  box-shadow: 0 22px 70px rgba(11, 30, 53, 0.22);
  backdrop-filter: blur(6px);
}

.msp-legacy-community-kicker {
  margin: 0 0 0.85rem;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #4e79b0;
}

.msp-legacy-community-title {
  margin: 0;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  color: #1b365d;
}

.msp-legacy-community-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.msp-legacy-community-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d7d0bd;
  background: linear-gradient(180deg, #ffffff 0%, #f5f1e6 100%);
  padding: 0.52rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1b365d;
}

.msp-legacy-community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.msp-legacy-community-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.msp-legacy-community-button:hover {
  transform: translateY(-1px);
}

.msp-legacy-community-button--primary {
  background: linear-gradient(180deg, #7bbd4f 0%, #6aa741 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(91, 143, 50, 0.28);
}

.msp-legacy-community-button--primary:hover {
  background: linear-gradient(180deg, #6eaf46 0%, #5f973b 100%);
  color: #fff;
}

.msp-legacy-community-button--secondary {
  border: 1px solid rgba(27, 54, 93, 0.18);
  background: #fff;
  color: #1b365d;
}

.msp-legacy-community-button--secondary:hover {
  border-color: rgba(27, 54, 93, 0.4);
  background: #f8f5ed;
  color: #102846;
}

.msp-legacy-community-details-shell {
  border: 1px solid #d7d0bd;
  border-radius: 32px;
  background: linear-gradient(180deg, #fffdf8 0%, #f8f5ed 100%);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 18px 50px rgba(27, 54, 93, 0.08);
}

.msp-legacy-community-details-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(215, 208, 189, 0.9);
}

.msp-legacy-community-details-header__eyebrow {
  margin: 0;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4e79b0;
}

.msp-legacy-community-details-header__title {
  margin: 0;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.7rem, 2vw, 2.35rem);
  line-height: 1.12;
  color: #1b365d;
}

.msp-legacy-community-details-grid {
  display: grid;
  gap: 1.15rem;
}

.msp-legacy-community-detail-card {
  border: 1px solid rgba(215, 208, 189, 0.9);
  border-left: 4px solid #6c8db7;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  padding: 1.35rem 1.4rem;
  box-shadow: 0 10px 28px rgba(27, 54, 93, 0.05);
}

.msp-legacy-community-detail-card p {
  margin: 0;
  color: rgba(27, 54, 93, 0.86);
  font-size: 1rem;
  line-height: 1.78;
}

.msp-legacy-community-detail-card p + p {
  margin-top: 0.9rem;
}

.msp-legacy-community-section-intro {
  max-width: 48rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.msp-legacy-community-section-intro__kicker {
  margin: 0 0 0.65rem;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4e79b0;
}

.msp-legacy-community-section-intro h2 {
  margin: 0;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  line-height: 1.15;
  color: #1b365d;
}

.msp-legacy-community-section-intro p:last-child {
  margin: 0.85rem auto 0;
  max-width: 40rem;
  color: rgba(27, 54, 93, 0.76);
  line-height: 1.75;
}

.msp-legacy-community-panel {
  height: 100%;
  border: 1px solid #d7d0bd;
  border-top: 6px solid #6c8db7;
  border-radius: 28px;
  background: linear-gradient(180deg, #fffdf8 0%, #f4f0e4 100%);
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(27, 54, 93, 0.08);
}

.msp-legacy-community-panel__title {
  margin: 0;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1b365d;
}

.msp-legacy-community-panel__content {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  color: rgba(27, 54, 93, 0.88);
}

.msp-legacy-community-group__heading {
  margin: 0 0 0.6rem;
  font-weight: 700;
  color: #1b365d;
}

.msp-legacy-community-panel__content p,
.msp-legacy-community-panel__content li {
  font-size: 0.95rem;
  line-height: 1.65;
}

.msp-legacy-community-panel__content ul {
  margin: 0;
  padding-left: 1.15rem;
}

.msp-legacy-community-panel__content li + li {
  margin-top: 0.22rem;
}

@media (min-width: 768px) {
  .msp-legacy-community-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .msp-legacy-community-button {
    width: 100%;
  }
}

/* Community page redesign v0.3.18 */
.msp-community-v2-hero {
  position: relative;
  overflow: hidden;
  background: #0d2138;
}

.msp-community-v2-hero__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.02);
}

.msp-community-v2-hero__bg--gradient {
  background: radial-gradient(circle at top left, rgba(130, 197, 255, 0.24), transparent 38%), linear-gradient(135deg, #0c2138 0%, #16365c 48%, #102846 100%);
}

.msp-community-v2-hero__inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(12rem, 16vw, 14.5rem);
  padding-bottom: clamp(4rem, 7vw, 6rem);
}

.admin-bar .msp-community-v2-hero__inner {
  padding-top: calc(clamp(12rem, 16vw, 14.5rem) + 32px);
}

@media (max-width: 782px) {
  .admin-bar .msp-community-v2-hero__inner {
    padding-top: calc(clamp(12rem, 16vw, 14.5rem) + 46px);
  }
}

.msp-community-v2-backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  color: rgba(246, 244, 234, 0.92);
  text-decoration: none;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.msp-community-v2-backlink:hover {
  color: #ffffff;
}

.msp-community-v2-hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .msp-community-v2-hero__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    gap: 3rem;
  }
}

.msp-community-v2-hero__copy {
  max-width: 44rem;
}

.msp-community-v2-kicker {
  margin: 0 0 0.9rem;
  color: #82c5ff;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.msp-community-v2-title {
  margin: 0;
  color: #fffdf8;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1.02;
  text-wrap: balance;
}

.msp-community-v2-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.35rem 0 1.25rem;
}

.msp-community-v2-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fffdf8;
  font-size: 0.88rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.msp-community-v2-copytext {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
}

.msp-community-v2-copytext p {
  margin: 0;
  color: rgba(246, 244, 234, 0.94);
  font-size: 1.06rem;
  line-height: 1.85;
}

.msp-community-v2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.msp-community-v2-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.95rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.msp-community-v2-button:hover {
  transform: translateY(-1px);
}

.msp-community-v2-button--primary {
  background: linear-gradient(180deg, #85c653 0%, #6baa3f 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(70, 118, 35, 0.28);
}

.msp-community-v2-button--primary:hover {
  color: #fff;
  background: linear-gradient(180deg, #78b649 0%, #609638 100%);
}

.msp-community-v2-button--secondary {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fffdf8;
  backdrop-filter: blur(8px);
}

.msp-community-v2-button--secondary:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
}

.msp-community-v2-hero__media {
  position: relative;
}

.msp-community-v2-hero__media-shell {
  overflow: hidden;
  border-radius: 30px;
  border: 8px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 26px 70px rgba(6, 18, 34, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.msp-community-v2-hero__image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.msp-community-v2-stats-wrap {
  position: relative;
  z-index: 2;
  margin-top: -2.4rem;
}

.msp-community-v2-stats {
  display: grid;
  gap: 1rem;
  border: 1px solid rgba(212, 208, 196, 0.92);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 20px 54px rgba(27, 54, 93, 0.11);
  padding: 1.15rem;
}

@media (min-width: 768px) {
  .msp-community-v2-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .msp-community-v2-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.msp-community-v2-stat {
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f3e8 100%);
  padding: 1rem 1.1rem;
  border: 1px solid rgba(215, 208, 189, 0.85);
}

.msp-community-v2-stat__label {
  display: block;
  margin-bottom: 0.35rem;
  color: #6c8db7;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.msp-community-v2-stat strong {
  display: block;
  color: #1b365d;
  font-size: 1rem;
}

.msp-community-v2-highlights,
.msp-community-v2-details {
  padding: 5rem 0;
}

.msp-community-v2-highlights {
  background: #f6f4ea;
}

.msp-community-v2-details {
  background: linear-gradient(180deg, #f2f5f8 0%, #ffffff 38%);
}

.msp-community-v2-section-head {
  max-width: 40rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.msp-community-v2-section-head--left {
  margin-left: 0;
  text-align: left;
}

.msp-community-v2-section-head__eyebrow,
.msp-community-v2-rail-card__eyebrow {
  margin: 0 0 0.7rem;
  color: #6c8db7;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.msp-community-v2-section-head h2,
.msp-community-v2-rail-card h3 {
  margin: 0;
  color: #1b365d;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.1;
}

.msp-community-v2-cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .msp-community-v2-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .msp-community-v2-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.msp-community-v2-card {
  height: 100%;
  border-radius: 28px;
  border: 1px solid rgba(212, 208, 196, 0.9);
  background: linear-gradient(180deg, #ffffff 0%, #fbf8ef 100%);
  padding: 1.45rem;
  box-shadow: 0 18px 42px rgba(27, 54, 93, 0.07);
}

.msp-community-v2-card__title {
  margin: 0;
  color: #1b365d;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.12rem;
}

.msp-community-v2-card__content {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.msp-community-v2-group__heading {
  margin: 0 0 0.55rem;
  font-weight: 700;
  color: #1b365d;
}

.msp-community-v2-card p,
.msp-community-v2-card li,
.msp-community-v2-story-block p,
.msp-community-v2-rail-card p,
.msp-community-v2-rail-list li {
  margin: 0;
  color: rgba(27, 54, 93, 0.84);
  font-size: 0.97rem;
  line-height: 1.72;
}

.msp-community-v2-card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.msp-community-v2-card li + li {
  margin-top: 0.25rem;
}

.msp-community-v2-details__shell {
  display: grid;
  gap: 1.4rem;
  align-items: start;
}

@media (min-width: 1100px) {
  .msp-community-v2-details__shell {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.72fr);
    gap: 1.6rem;
  }
}

.msp-community-v2-details__main,
.msp-community-v2-details__rail {
  display: grid;
  gap: 1.2rem;
}

.msp-community-v2-story {
  display: grid;
  gap: 1rem;
}

.msp-community-v2-story-block {
  border-radius: 28px;
  border: 1px solid rgba(212, 208, 196, 0.92);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,244,235,0.94) 100%);
  padding: 1.45rem;
  box-shadow: 0 18px 44px rgba(27, 54, 93, 0.07);
}

.msp-community-v2-story-block h3 {
  margin: 0 0 0.8rem;
  color: #1b365d;
  font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
}

.msp-community-v2-story-block p + p {
  margin-top: 0.85rem;
}

.msp-community-v2-rail-card {
  border-radius: 28px;
  border: 1px solid rgba(212, 208, 196, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #f6f2e8 100%);
  padding: 1.45rem;
  box-shadow: 0 18px 44px rgba(27, 54, 93, 0.07);
}

.msp-community-v2-rail-card > * + * {
  margin-top: 0.9rem;
}

.msp-community-v2-rail-card h3 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.msp-community-v2-rail-card--accent {
  background: linear-gradient(145deg, #16365c 0%, #0d2138 100%);
  border-color: rgba(130, 197, 255, 0.18);
}

.msp-community-v2-rail-card--accent h3,
.msp-community-v2-rail-card--accent p,
.msp-community-v2-rail-card--accent .msp-community-v2-rail-card__eyebrow,
.msp-community-v2-rail-card--accent .msp-community-v2-rail-list li,
.msp-community-v2-rail-card--accent .msp-community-v2-rail-list span,
.msp-community-v2-rail-card--accent .msp-community-v2-rail-list strong {
  color: #fffdf8;
}

.msp-community-v2-rail-card--accent .msp-community-v2-rail-card__eyebrow {
  color: #82c5ff;
}

.msp-community-v2-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.msp-community-v2-rail-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(27, 54, 93, 0.1);
}

.msp-community-v2-rail-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.msp-community-v2-rail-list span {
  color: rgba(27, 54, 93, 0.62);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.msp-community-v2-rail-list strong {
  color: #1b365d;
  text-align: right;
}

@media (max-width: 1024px) {
  .msp-community-v2-button {
    width: 100%;
  }
}
