/* RE/MAX brand layer — loaded site-wide after base styles */

/* ── Global palette override ── */
body {
  background: #eef3fb !important;
  color: #1a1a1a;
}

.topbar {
  background: var(--remax-blue) !important;
}

.site-header {
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: 0 4px 16px rgba(0, 61, 165, .06);
}

.brand {
  color: var(--remax-blue) !important;
}

.brand span {
  color: var(--remax-red) !important;
}

/* ── Seller hero — overlay scoped to photo column only (see seller-landing.css) ── */
section.hero#contatto {
  position: relative;
  isolation: isolate;
}

section.hero#contatto > .hero-left,
section.hero#contatto > .hero-form-wrap {
  position: relative;
  z-index: 2;
}

/* Do NOT overlay the form column */
section.hero#contatto::before,
section.hero#contatto::after {
  display: none !important;
}

/* Hub / generic heroes without seller form */
section.hero:not(#contatto):not(.buyer-hero-pro):not(.hub-hero)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(0, 61, 165, .88) 0%,
    rgba(12, 39, 73, .82) 42%,
    rgba(220, 28, 46, .28) 100%
  );
}

section.hero:not(#contatto):not(.buyer-hero-pro):not(.hub-hero) > * {
  position: relative;
  z-index: 2;
}

/* ── Alternating section backgrounds — only generic unclassed blocks ── */
main > section:not([class]):nth-of-type(even):not(.hero):not(.buyer-hero-pro) {
  background: #fff;
}

main > section:not([class]):nth-of-type(odd):not(.hero):not(.buyer-hero-pro) {
  background: #f4f7fc;
}

.network {
  background: linear-gradient(145deg, var(--blue-dark) 0%, #0a1f3a 100%) !important;
}

.market {
  background: linear-gradient(145deg, #0a1f3a 0%, var(--remax-blue) 100%) !important;
}

.situations {
  background: #f4f7fc !important;
}

.faq {
  background: #fff !important;
}

details p,
.faq-buy p,
.faq-grid details p {
  color: #555 !important;
}
.situations,
.method,
.steps,
.testimonials,
.seller-includes,
.seller-compare,
.seller-zones,
.seller-services,
.provinces,
.buyer-pain,
.buyer-trust-block,
.dual-path,
.faq,
main > section:not([class]) {
  color: #1a1a1a;
}

.about .section-head p,
.situations .section-head p,
.method .section-head p,
.steps .section-head p,
.testimonials .section-head p,
.seller-includes .section-head p,
.seller-compare .section-head p,
.seller-zones .section-head p,
.seller-services .section-head p,
.provinces .section-head p,
.buyer-pain .section-head p,
.buyer-trust-block .section-head p,
.faq .section-head p,
main > section:not([class]) .section-head p,
.situations-grid .card h3,
.situations-grid .card p,
.method-grid .card h3,
.method-grid .card p,
.steps-grid .card h3,
.steps-grid .card p,
.seller-include-card p,
.seller-include-card h3,
.seller-service-card p,
.seller-service-card h3,
.seller-compare-row span:first-child,
.adv-card p,
.adv-card h3,
.buyer-pain-card p,
.buyer-pain-card h3,
.testimonial-card p,
.testimonial-card .person span,
.dual-path-card p,
.dual-path-label,
.about .lead,
.about p,
.provinces .card-body p,
.card-body p {
  color: #444 !important;
}

.about .section-head h2,
.situations .section-head h2,
.method .section-head h2,
.steps .section-head h2,
.testimonials .section-head h2,
.seller-includes .section-head h2,
.seller-compare .section-head h2,
.seller-zones .section-head h2,
.seller-services .section-head h2,
.provinces .section-head h2,
.buyer-pain .section-head h2,
.buyer-trust-block .section-head h2,
.faq .section-head h2,
main > section:not([class]) .section-head h2,
.card h3,
.situations-grid .card h3,
.method-grid .card h3,
.steps-grid .card h3,
.seller-include-card h3,
.seller-service-card h3,
.adv-card h3,
.buyer-pain-card h3,
.testimonial-card .person strong,
.dual-path-card strong,
.provinces .card-body h3 {
  color: var(--remax-blue, #003da5) !important;
}

.section-head h2 {
  color: var(--remax-blue, #003da5) !important;
}

/* Hero / dark copy — never inherit light-section text rules */
.hero-left p,
.hero-content p,
section.hero:not(#contatto):not(.buyer-hero-pro) p,
section.hero:not(#contatto):not(.buyer-hero-pro) h1,
.buyer-hero-pro-copy p,
.buyer-hero-pro-copy h1,
.buyer-hero-pro-copy .lead {
  color: rgba(255, 255, 255, .85) !important;
}

.form-card p,
.form-card h2,
.form-card label,
.buyer-hero-card p,
.buyer-hero-card h2,
.buyer-hero-card h3,
.buyer-form p,
.buyer-form h2,
.buyer-form label {
  color: inherit;
}

.form-card > p {
  color: #555 !important;
}

.form-card h2,
.buyer-hero-card h2,
.buyer-hero-card h3,
.buyer-form h2 {
  color: var(--remax-blue, #003da5) !important;
}

/* ── Readable text on dark sections ── */
.network,
.market,
.final-cta,
.seller-mid-cta,
.buyer-market,
.buyer-form-section,
.seller-form-section,
section#contatto.seller-form-section {
  color: #fff;
}

.network .section-head h2,
.network h2,
.market .section-head h2,
.market h2,
.final-cta h2,
.seller-mid-cta h2,
.buyer-market .section-head h2,
.buyer-market h2,
.buyer-form-section .buyer-form-aside h2,
.seller-form-section .seller-form-aside h2,
section#contatto.seller-form-section .seller-form-aside h2 {
  color: #fff !important;
}

.network .section-head p,
.network .section-kicker,
.market .section-head p,
.market .section-kicker {
  color: rgba(255, 255, 255, .85) !important;
}

.network-card,
.market-card {
  background: rgba(255, 255, 255, .1) !important;
  border-color: rgba(255, 255, 255, .2) !important;
}

.network-card span,
.market-card span {
  color: rgba(255, 255, 255, .92) !important;
}

.network-card strong,
.market-card strong {
  color: #fff !important;
}

.network-card p,
.market-card p {
  color: rgba(255, 255, 255, .88) !important;
}

.buyer-market-card span {
  color: rgba(255, 255, 255, .92) !important;
}

.buyer-market-card h3 {
  color: #fff !important;
}

.buyer-market-card p {
  color: rgba(255, 255, 255, .88) !important;
}

.market a,
.network a,
.buyer-omi-link {
  color: #ffc9cf !important;
}

.market a:hover,
.network a:hover,
.buyer-omi-link:hover {
  color: #fff !important;
}

/* ── Cards & grids ── */
.card,
.situations-grid .card,
.method-grid .card,
.steps-grid .card,
.adv-card,
.buyer-pain-card,
.seller-include-card,
.seller-service-card,
.testimonial-card,
.dual-path-card,
.provinces .card,
details,
.faq-buy details {
  background: #fff !important;
  border: 1px solid rgba(0, 61, 165, .14) !important;
}

.card,
.situations-grid .card,
.method-grid .card,
.adv-card {
  border-top: 3px solid var(--remax-blue) !important;
  box-shadow: 0 12px 32px rgba(0, 61, 165, .1) !important;
}

.card p,
.situations-grid .card p,
.method-grid .card p,
.steps-grid .card p {
  color: #444 !important;
}

.card h3,
.situations-grid .card h3,
.method-grid .card h3,
.steps-grid .card h3 {
  color: var(--remax-blue, #003da5) !important;
}

.card .num,
.situations-grid .num,
.method-grid .num,
.steps-grid .num {
  color: var(--remax-red, #dc1c2e) !important;
}

.step-time {
  color: var(--remax-red, #dc1c2e) !important;
}

/* Dark-section cards stay glass — override light card rules above */
.network-card,
.market-card,
.buyer-market-card {
  background: rgba(255, 255, 255, .1) !important;
  border: 1px solid rgba(255, 255, 255, .2) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .2) !important;
}

.card:hover,
.situations-grid .card:hover {
  border-top-color: var(--remax-red) !important;
}

h2.serif,
.section-head h2 {
  color: var(--remax-blue) !important;
}

/* h2 on dark sections overridden above */

.eyebrow {
  color: var(--remax-red) !important;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-left .eyebrow,
.buyer-hero-pro-copy .eyebrow {
  color: rgba(255, 255, 255, .88) !important;
}

/* ── Buttons & CTAs ── */
.btn-red,
.nav-links .btn-red.nav-cta {
  background: linear-gradient(135deg, var(--remax-red) 0%, var(--red-dark) 100%) !important;
  box-shadow: 0 14px 32px rgba(220, 28, 46, .32) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
}

.btn-red:hover {
  box-shadow: 0 18px 40px rgba(220, 28, 46, .42) !important;
}

.btn-outline {
  border-color: var(--remax-blue) !important;
  color: var(--remax-blue) !important;
}

.btn-outline:hover {
  background: rgba(0, 61, 165, .08) !important;
  color: var(--remax-blue) !important;
}

.hero .btn-outline,
.buyer-hero-pro .btn-outline {
  border-color: rgba(255, 255, 255, .45) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
}

.hero .btn-outline:hover,
.buyer-hero-pro .btn-outline:hover {
  background: rgba(255, 255, 255, .16) !important;
  color: #fff !important;
}

.buyer-sticky-bar .btn-outline,
.final-cta .btn-outline,
.seller-mid-cta .btn-outline,
.buyer-final-cta .btn-outline,
.buyer-form-section .btn-outline:not(.buyer-form-wa),
.seller-form-section .btn-outline:not(.seller-form-wa) {
  border-color: rgba(255, 255, 255, .45) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
}

.buyer-sticky-bar .btn-outline:hover,
.final-cta .btn-outline:hover,
.seller-mid-cta .btn-outline:hover,
.buyer-final-cta .btn-outline:hover,
.buyer-form-section .btn-outline:hover:not(.buyer-form-wa),
.seller-form-section .btn-outline:hover:not(.seller-form-wa) {
  background: rgba(255, 255, 255, .16) !important;
  color: #fff !important;
}

/* ── Dual-path section ── */
.dual-path {
  border-top: 5px solid var(--remax-red);
  border-bottom: 5px solid var(--remax-blue);
  background: linear-gradient(180deg, #fff 0%, #eef3fb 100%) !important;
}

.dual-path-card {
  border-top: 4px solid var(--remax-blue) !important;
}

.dual-path-card:hover {
  border-top-color: var(--remax-red) !important;
}

.dual-path-card h3,
.dual-path-card strong {
  color: var(--remax-blue) !important;
}

.dual-path-card p {
  color: #555 !important;
}

.dual-path-label {
  color: #666 !important;
}

.final-cta p,
.final-cta .lead,
.buyer-final-cta p {
  color: rgba(255, 255, 255, .85) !important;
}

/* ── Stats strip (seller hub + seller pages) ── */
.seller-stats-strip,
.buyer-stats-strip {
  background: linear-gradient(
    90deg,
    var(--remax-red) 0%,
    var(--remax-red) 50%,
    var(--remax-blue) 50%,
    var(--remax-blue) 100%
  ) !important;
}

.seller-stat,
.seller-stat strong,
.seller-stat span,
.buyer-stats-grid strong,
.buyer-stats-grid span {
  color: #fff !important;
}

.seller-stat span,
.buyer-stats-grid span {
  opacity: 1;
  color: rgba(255, 255, 255, .92) !important;
}

/* ── Nav badge in brand-wrap (HTML, not JS) ── */
.remax-nav-badge {
  display: inline-flex;
}

/* ── Seller hero & form ── */
/* Eyebrow red line only in seller form aside — not on list items */
.seller-form-aside .eyebrow::before {
  background: var(--remax-red) !important;
  height: 3px !important;
}

.eyebrow::before {
  background: var(--remax-red) !important;
  height: 3px !important;
}

.form-card {
  border-top: 5px solid var(--remax-red) !important;
}

.hero-form-wrap .form-card {
  border-top: none !important;
}

.trust-row .trust {
  border-left: 3px solid var(--remax-red) !important;
}

.trust-row .trust strong {
  color: var(--remax-blue) !important;
}

.hero .trust-row .trust strong,
.buyer-hero-pro .trust-row .trust strong {
  color: #fff !important;
}

.hero .trust-row .trust {
  border-left-color: var(--remax-red) !important;
}

.final-cta {
  background: linear-gradient(145deg, var(--blue-dark) 0%, var(--remax-blue) 55%, #0a3d8f 100%) !important;
  border-top: 5px solid var(--remax-red);
}

.final-cta::before {
  background: radial-gradient(circle at 50% 0%, rgba(220, 28, 46, .14), transparent 40%) !important;
}

/* ── Hub pages (comprare-casa / buy-home) ── */
.hero .kicker {
  color: var(--remax-red) !important;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* Hub hero only — do not override seller hero with background image */
section.hero:not(#contatto):not(.buyer-hero-pro):not(.hub-hero) {
  background: linear-gradient(180deg, rgba(12, 39, 73, .84), rgba(0, 61, 165, .9)), url(/milano.jpg) center/cover no-repeat !important;
  border-bottom: none !important;
}

/* Hub hero only — do not override seller hero with background image */
section.hero.hub-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  padding: 96px 0 80px !important;
  text-align: center;
  background: linear-gradient(180deg, rgba(12, 39, 73, .84), rgba(0, 61, 165, .9)), url(/milano.jpg) center/cover no-repeat !important;
  border-bottom: none !important;
}

/* No gradient overlay on hub hero — stats bar sits below as its own section */
section.hero.hub-hero::before {
  display: none !important;
}

section.hero.hub-hero > .container {
  position: relative;
  z-index: 2;
}

/* Hub stats — standalone band below hero, full viewport width */
section.hub-stats-bar.seller-stats-strip {
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
  position: relative;
  z-index: 2;
  background: linear-gradient(
    90deg,
    var(--remax-red) 0%,
    var(--remax-red) 50%,
    var(--remax-blue) 50%,
    var(--remax-blue) 100%
  ) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
}

section.hub-stats-bar .seller-stat {
  color: #fff !important;
  border-right-color: rgba(255, 255, 255, .22) !important;
}

section.hub-stats-bar .seller-stat strong {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

section.hub-stats-bar .seller-stat span {
  color: #fff !important;
  opacity: 1 !important;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .1em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.provinces .card {
  border-top: 3px solid transparent;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.provinces .card:hover {
  border-top-color: var(--remax-red);
  box-shadow: 0 16px 36px rgba(0, 61, 165, .12);
}

.provinces .card-body h3 {
  color: var(--remax-blue) !important;
}

/* ── Buyer landing ── */
.section-kicker[style*="gold"],
.section-kicker[style*="003da5"] {
  color: var(--remax-red) !important;
}

.buyer-hero-pro-copy .section-kicker {
  color: rgba(255, 255, 255, .88) !important;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.buyer-hero-pro-copy .section-kicker::before {
  content: "RE/MAX · ";
  color: #ff8a94;
}

.buyer-trust-row .trust strong {
  color: var(--remax-red) !important;
}

.adv-card {
  border-top: 3px solid var(--remax-blue) !important;
}

.adv-card h3 {
  color: var(--remax-blue) !important;
}

.buyer-market {
  background: linear-gradient(180deg, var(--blue-dark) 0%, var(--remax-blue) 100%) !important;
  border-top: 5px solid var(--remax-red);
  border-bottom: 5px solid var(--remax-red);
}

.buyer-form-section {
  border-top: 5px solid var(--remax-red);
}

.seller-form-section {
  border-top: 5px solid var(--remax-red);
}

.buyer-final-cta {
  background: linear-gradient(145deg, var(--blue-dark) 0%, var(--remax-blue) 100%) !important;
  border-top: 5px solid var(--remax-red);
}

.buyer-portrait-meta {
  background: linear-gradient(180deg, var(--blue-dark) 0%, var(--remax-blue) 100%) !important;
  border-top: 3px solid var(--remax-red);
}

.buyer-portrait-meta .buyer-badge {
  background: rgba(255, 255, 255, .12) !important;
  border-color: rgba(255, 255, 255, .22) !important;
  color: #fff !important;
}

/* ── OMI guides ── */
h1.serif {
  border-left: 4px solid var(--remax-red);
  padding-left: 14px;
}

/* ── Footer trust line ── */
.footer strong {
  color: #fff !important;
}

.footer::before {
  content: "RE/MAX";
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .24em;
  color: rgba(255, 255, 255, .62);
  margin-bottom: 8px;
}

/* ── FAQ / details accent ── */
details summary {
  color: var(--blue-dark);
}

details[open] summary {
  color: var(--remax-red);
}

.faq-buy summary {
  color: var(--remax-blue) !important;
}

/* ── FINAL OVERRIDE: dark sections beat generic .section-head rules ── */
section.network#remax,
section.network {
  background: linear-gradient(145deg, #0c2749 0%, #0a1f3a 100%) !important;
}

section.market#mercato,
section.market {
  background: linear-gradient(145deg, #0a1f3a 0%, #003da5 100%) !important;
}

.buyer-market {
  background: linear-gradient(180deg, var(--blue-dark) 0%, var(--remax-blue) 100%) !important;
}

.final-cta,
.buyer-final-cta {
  background: linear-gradient(145deg, var(--blue-dark) 0%, var(--remax-blue) 55%, #0a3d8f 100%) !important;
}

.seller-mid-cta {
  background: linear-gradient(135deg, #0c2749 0%, var(--remax-blue) 100%) !important;
}

section.network#remax .section-head h2,
section.network#remax h2,
section.network .section-head h2,
section.network h2,
section.market#mercato .section-head h2,
section.market#mercato h2,
section.market .section-head h2,
section.market h2,
.buyer-market .section-head h2,
.buyer-market h2,
.final-cta h2,
.buyer-final-cta h2,
.seller-mid-cta h2 {
  color: #fff !important;
}

section.network#remax .section-head p,
section.network#remax .section-kicker,
section.network .section-head p,
section.network .section-kicker,
section.market#mercato .section-head p,
section.market#mercato .section-kicker,
section.market .section-head p,
section.market .section-kicker {
  color: rgba(255, 255, 255, .88) !important;
}

section.network .network-card,
section.market .market-card,
.network-card,
.market-card {
  background: rgba(255, 255, 255, .12) !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
}

section.network .network-card strong,
section.market .market-card strong,
.network-card strong,
.market-card strong {
  color: #fff !important;
}

section.network .network-card p,
section.market .market-card p,
.network-card p,
.market-card p {
  color: rgba(255, 255, 255, .88) !important;
}
