/* RendimentoBB — City Market Intelligence 2026
   Visual layer only: content, links and JavaScript remain unchanged. */

:root {
  --city-bg: #f3f7fb;
  --city-surface: #ffffff;
  --city-soft: #f7fafc;
  --city-navy: #071a31;
  --city-navy-soft: #0b3154;
  --city-green: #08b67a;
  --city-green-dark: #079765;
  --city-mint: #eafaf4;
  --city-text: #0b1830;
  --city-muted: #607089;
  --city-border: #dfe8f1;
  --city-radius: 24px;
  --city-shadow: 0 18px 48px rgba(15, 35, 58, .08);
}

body.market-page {
  background:
    radial-gradient(circle at 90% 6%, rgba(8, 182, 122, .08), transparent 26rem),
    var(--city-bg);
  color: var(--city-text);
}

body.market-page main {
  overflow: hidden;
}

body.market-page .container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* Hero */
body.market-page .hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: center;
  padding: 96px 0 82px;
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

body.market-page .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 18, 38, .92) 0%, rgba(4, 30, 53, .76) 54%, rgba(4, 25, 43, .38) 100%);
}

body.market-page .city-rome { background-image: url("/img/rome-bg.jpg"); }
body.market-page .city-naples { background-image: url("/img/naples-bg.jpg"); }
body.market-page .city-milan { background-image: url("/img/milan-bg.jpg"); }
body.market-page .hero-bg.florence { background-image: url("/img/florence-bg.jpg"); }

body.market-page .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 720px) 1fr;
  align-items: center;
}

body.market-page .hero-left {
  max-width: 760px;
}

body.market-page .hero h1 {
  margin: 0 0 18px;
  max-width: 760px;
  color: #fff;
  font-size: clamp(2.45rem, 5vw, 4.7rem);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

body.market-page .hero p {
  max-width: 640px !important;
  color: rgba(255, 255, 255, .82) !important;
  font-size: 1.08rem;
  line-height: 1.7;
}

body.market-page .hero .btn,
body.market-page .hero .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0 10px 0 0;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
}

body.market-page .hero .btn-primary {
  color: #fff;
  border: 1px solid var(--city-green);
  background: linear-gradient(135deg, #12c98a, var(--city-green-dark));
  box-shadow: 0 14px 30px rgba(8, 182, 122, .28);
}

body.market-page .hero .btn-outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
}

/* Content sections */
body.market-page .section {
  padding: 42px 0;
  background: transparent;
}

body.market-page .section > .container {
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(223, 232, 241, .92);
  border-radius: var(--city-radius);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--city-shadow);
}

body.market-page .section h2 {
  margin: 12px auto 0;
  max-width: 780px;
  color: var(--city-text);
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}

body.market-page .section h2 + p {
  color: var(--city-muted) !important;
  line-height: 1.75 !important;
}

body.market-page .hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid rgba(8, 182, 122, .2);
  border-radius: 999px;
  color: var(--city-green-dark);
  background: var(--city-mint);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .02em;
}

body.market-page .feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body.market-page .feature-card {
  min-width: 0;
  padding: 24px 20px;
  border: 1px solid var(--city-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, var(--city-soft));
  box-shadow: 0 9px 24px rgba(15, 35, 58, .045);
  text-align: center;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

body.market-page .feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(8, 182, 122, .45);
  box-shadow: 0 16px 30px rgba(15, 35, 58, .08);
}

body.market-page .feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 13px;
  background: var(--city-mint);
  color: var(--city-green-dark);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.55rem;
  line-height: 1;
  filter: saturate(1.15) contrast(1.08);
}

body.market-page .feature-card h3 {
  margin: 0 0 9px;
  color: var(--city-text);
  font-size: 1.04rem;
  line-height: 1.3;
}

body.market-page .feature-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--city-green-dark);
  font-size: clamp(1.22rem, 2vw, 1.65rem);
  line-height: 1.15;
}

body.market-page .feature-card p {
  margin: 0;
  color: var(--city-muted);
  font-size: .94rem;
  line-height: 1.55;
}

/* Final decision block */
body.market-page .section-dark.cta-section {
  margin-top: 42px;
  padding: 72px 0;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(8, 182, 122, .22), transparent 25rem),
    linear-gradient(135deg, var(--city-navy), #04121f);
}

body.market-page .section-dark.cta-section > .container {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
  box-shadow: none;
  text-align: center;
}

body.market-page .section-dark.cta-section h2,
body.market-page .section-dark.cta-section h3 {
  color: #fff;
}

body.market-page .section-dark.cta-section p {
  color: rgba(255, 255, 255, .72) !important;
}

body.market-page .section-dark.cta-section .feature-card {
  border-color: rgba(8, 182, 122, .22);
  background: #ffffff;
  box-shadow: none;
}

body.market-page .section-dark.cta-section .feature-card h3,
body.market-page .section-dark.cta-section .feature-card strong {
  color: var(--city-text) !important;
}

body.market-page .section-dark.cta-section .feature-card p {
  color: var(--city-muted) !important;
}

body.market-page .section-dark.cta-section .feature-icon {
  color: var(--city-green-dark);
  background: var(--city-mint);
}

/* Full-page desktop captures must not repeat the fixed global navigation
   through the middle of content. Normal mobile navigation is unchanged. */
@media (min-width: 901px) {
  body.market-page .rb-header,
  body.market-page .portal-header {
    position: sticky !important;
    top: 0;
  }
}

body.market-page .section-dark.cta-section .btn-primary {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #12c98a, var(--city-green-dark));
  box-shadow: 0 14px 30px rgba(8, 182, 122, .24);
  text-decoration: none;
}

@media (max-width: 900px) {
  body.market-page .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.market-page .container {
    width: min(100% - 24px, 1180px);
  }

  body.market-page .hero {
    min-height: 570px;
    padding: 78px 0 58px;
    text-align: center;
    background-position: center;
  }

  body.market-page .hero::before {
    background: linear-gradient(180deg, rgba(3, 18, 38, .68), rgba(3, 18, 38, .92));
  }

  body.market-page .hero-grid {
    display: block;
  }

  body.market-page .hero h1 {
    font-size: clamp(2.15rem, 11vw, 3.1rem);
    line-height: 1.02;
  }

  body.market-page .hero p {
    margin-inline: auto !important;
    font-size: .98rem;
  }

  body.market-page .hero br {
    display: none;
  }

  body.market-page .hero .btn,
  body.market-page .hero .btn-outline {
    width: 100%;
    margin: 10px 0 0;
  }

  body.market-page .section {
    padding: 12px 0;
  }

  body.market-page .section > .container {
    padding: 26px 18px;
    border-radius: 20px;
  }

  body.market-page .section [style*="margin-bottom:55px"] {
    margin-bottom: 26px !important;
  }

  /* Neutralizza la vecchia griglia generica di style.css che forza le
     sezioni chiare su una sola colonna. */
  body.market-page main > .section > .container > div:first-child {
    display: block !important;
    margin-top: 0;
  }

  body.market-page main > .section .container > .feature-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-top: 0;
  }

  body.market-page .section h2 {
    font-size: 1.65rem;
  }

  body.market-page .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body.market-page .feature-card {
    min-height: 146px;
    padding: 16px 9px;
    border-radius: 15px;
  }

  body.market-page .feature-card h3 {
    overflow-wrap: anywhere;
    font-size: .94rem;
  }

  body.market-page .feature-card strong {
    font-size: 1.14rem;
  }

  body.market-page .feature-card p {
    overflow-wrap: anywhere;
    font-size: .82rem;
    line-height: 1.45;
  }

  /* Le sezioni con tre elementi restano equilibrate: due card sopra e
     la terza compatta a larghezza piena. */
  body.market-page main > .section:not(.cta-section) .feature-grid > .feature-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    min-height: 126px;
  }

  body.market-page main > .section:not(.cta-section) .feature-grid > a.feature-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    min-height: 116px;
  }

  body.market-page .section-dark.cta-section {
    margin-top: 18px;
    padding: 30px 0;
  }

  body.market-page .section-dark.cta-section > .container {
    padding: 28px 18px;
  }

  body.market-page .section-dark.cta-section .hero-badge {
    margin-bottom: 12px !important;
  }

  body.market-page .section-dark.cta-section h2 {
    margin-top: 0;
  }

  body.market-page .section-dark.cta-section .cta-container > p {
    margin: 14px auto !important;
    line-height: 1.55 !important;
  }

  body.market-page .section-dark.cta-section .feature-grid {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
  }

  body.market-page .section-dark.cta-section .feature-card {
    min-height: 112px;
    padding: 13px 8px;
  }

  body.market-page .section-dark.cta-section .feature-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 7px;
    font-size: 1.2rem;
  }

  body.market-page .section-dark.cta-section .feature-card h3 {
    margin-bottom: 4px;
  }

  body.market-page .section-dark.cta-section .btn-primary {
    min-height: 46px;
    padding: 0 18px;
  }
}

@media (max-width: 360px) {
  body.market-page .feature-grid {
    grid-template-columns: 1fr;
  }

  body.market-page .feature-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.market-page .feature-card {
    transition: none;
  }
}
