/* ===================== */
/* RESET */
/* ===================== */

*{
box-sizing:border-box;
margin:0;
padding:0;
font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

img{
height:auto;
display:block;
}

body{
display:flex;
flex-direction:column;
padding-top:60px; /* altezza header */ 

min-height:100vh;
color:#0f172a;
-webkit-font-smoothing:antialiased;
overflow-x:hidden;

background-size:cover;
background-position:center;
background-attachment:fixed; 
}  

@media (max-width:768px){
  body{
    padding-top:60px;
  }
}

/* ===================== */
/* MAIN */
/* ===================== */

main{
position:relative;
}

/* ===================== */
/* GLOBAL WIDTH FIX */
/* ===================== */

.dashboard-container,
.dashboard-layout,
.dashboard-main{
width:100%;
max-width:100%;
overflow:visible;
}

/* FIX MOBILE CONTAINER */
@media (max-width:768px){

.container{
max-width:100%;
padding:0 16px;
}

/* LOGO MOBILE FIX DEFINITIVO */
.logo-img{
height:38px !important;
transform:scale(1) !important;
}

}
  
/* ===================== */
/* PAGE WIDTH FIX */
/* ===================== */

main .container{
max-width:1400px;
margin:auto;
}

/* ===================== */
/* HEADER FINAL CLEAN */
/* ===================== */

.portal-header{
position:fixed;
top:0;
left:0;
width:100%;
z-index:1000;

background:rgba(255,255,255,0.95);
backdrop-filter:blur(10px);
border-bottom:1px solid #e2e8f0;

/* 🔥 FIX */
padding:10px 0;
}

.portal-header .container{
padding:0 20px;
max-width:1400px;
margin:auto;
}

/* layout a 3 colonne vero */
.portal-header-inner{
display:grid;
grid-template-columns:auto 1fr auto;
align-items:center;
gap:12px;

max-width:1400px;
margin:auto;
padding:0 20px;

min-height:56px;
}

.portal-header-inner > *{
min-width:0;
}

/* LOGO */
.rb-logo{
justify-self:start;
}

/* NAV CENTRATA */
.portal-nav{
display:flex;
justify-content:center;
align-items:center;
gap:24px;

min-width:0;
flex-wrap:wrap; /* 🔥 QUESTO */

width:100%;
overflow:visible; /* 🔥 QUESTO */
}

/* DESTRA */
.right-controls{
justify-self:end;
display:flex;
align-items:center;
gap:12px;
}

/* ===================== */
/* LOGO */
/* ===================== */

.rb-logo{
display:flex;
align-items:center;
}

.logo-link{
display:flex;
align-items:center;
text-decoration:none;
}

.rb-logo{
flex-shrink:0;
}

.logo-img{
height:60px;
transform:scale(1.8);
transform-origin:left center;  
width:auto;
display:block;
transition:transform .25s ease, opacity .25s ease;
}

/* hover */
.logo-link:hover .logo-img{
transform:scale(1.9); /* 🔥 NON più shrink */
opacity:0.9;
}

/* ===================== */
/* PAGE TITLE */
/* ===================== */

.page-title{
text-align:center;
margin-bottom:20px;
}

.page-title h1{
font-size:44px;
font-weight:800;
letter-spacing:-0.5px;
margin-bottom:14px;
color:#0f172a;

}

.page-title p{

color:#475569;
font-size:17px;
max-width:520px;
margin:0 auto;

}

/* ===================== */
/* HERO BACKGROUND */
/* ===================== */

/* BASE HERO (senza background!) */
.hero{
position:relative;
z-index:1;
display:flex;
align-items:center;
justify-content:center;  

padding:140px 0 160px 0;
min-height:100vh;

overflow:visible;
border-bottom:1px solid rgba(0,0,0,0.05);
}

/* CONTENUTI SOPRA */
.hero .quick-roi-box,
.hero .roi-card{
position:relative;
z-index:3;
}

/* HERO CON BACKGROUND (FIX OVERLAY LIGHT) */
.hero-bg{
background:
linear-gradient(
rgba(0,0,0,0.08),
rgba(0,0,0,0.25)
),
url("/img/rome-bg.jpg");

background-size:cover;
background-position:center;
background-repeat:no-repeat;

transition:background 0.6s ease;

}

/* POSIZIONE PER CITTÀ */
.hero-bg.rome{
background-position:center 50%;
}

.hero-bg.naples{
background-position:center 60%;
}

.hero-bg.milan{
background-position:center 45%;
}

.hero-bg.florence{
background-position:center 55%;
}

/* HERO LIGHT EFFECT (OK) */
.hero::after{
content:"";

position:absolute;
top:0;
left:0;
width:100%;
height:100%;

z-index:1;

background:
radial-gradient(
circle at 20% 20%,
rgba(16,185,129,0.12),
transparent 55%
);

pointer-events:none;
}

/* CONTENUTO SOPRA OVERLAY */
.hero > *{
position:relative;
z-index:2;
}

/* ===================== */
/* HERO LAYOUT */
/* ===================== */

.hero-grid{
display:grid;
grid-template-columns:1fr;

gap:40px;
max-width:760px;

margin:80px auto;

align-items:start;
justify-items:center;
text-align:center;
}

.hero-content-box{
background:rgba(255,255,255,0.08);
backdrop-filter:blur(8px);
padding:30px;
border-radius:20px;
box-shadow:0 25px 80px rgba(0,0,0,0.25);
}

/* TITOLI */
.hero-card h1{
color:#ffffff !important;
text-shadow:0 4px 20px rgba(0,0,0,0.4) !important;
}

.hero-card p{
color:#e2e8f0 !important;
text-shadow:0 2px 10px rgba(0,0,0,0.3) !important;
}

/* NAV FIX */
.portal-nav a:hover{
background:#f1f5f9;
color:#10b981;
transform:translateY(-1px);
}

.portal-nav a.active{
background:#ecfdf5;
color:#10b981;
font-weight:600;
border:1px solid #10b981;
}

/* HERO BOX */

/* 👉 DEFAULT (PAGINE ROI - ROMA, MILANO ecc) */
.hero-left{
display:flex;
flex-direction:column;

text-align:center;

width:100%;
max-width:620px;

margin:0 auto;

align-items:stretch;
justify-content:flex-start;
gap:20px;

/* 🔥 NIENTE BOX QUI */
background:transparent;
backdrop-filter:none;
box-shadow:none;
padding:0;
border-radius:0;
}

/* 👉 SOLO HOME (mantiene box bello per simulatore) */
.home .hero-left{
backdrop-filter: blur(8px);
background: rgba(255,255,255,0.98);
box-shadow:0 25px 80px rgba(0,0,0,0.15);
padding:25px;
border-radius:20px;
}

.home .hero-left h1{
color:#0f172a !important;
text-shadow:none !important;
}

.home .hero-left p{
color:#475569 !important;
text-shadow:none !important;
}
/* MOBILE */
@media (max-width:768px){
.section{
margin-top:20px;
}
}

/* ===================== */
/* CITY SEARCH */
/* ===================== */

.city-search-box{

background:white;

border-radius:18px;

padding:18px;

box-shadow:0 25px 70px rgba(0,0,0,0.08);

border:1px solid #e2e8f0;

max-width:520px;

margin:0 auto;  

overflow:visible; 

}

/* INPUT */

.city-input-wrapper{

display:flex;
align-items:center;

background:#f8fafc;

border-radius:12px;

padding:12px 14px;

border:1px solid #e2e8f0;

}

.city-search-icon{

margin-right:10px;
font-size:16px;
opacity:0.6;

}

.city-search-input{

border:none;
background:transparent;
width:100%;
font-size:15px;

}

.city-search-input:focus{
outline:none;
}

/* ===================== */
/* QUICK CITY BUTTONS */
/* ===================== */

.city-quick{

display:flex;
gap:10px;
margin-top:16px;
margin-bottom:10px;
flex-wrap:wrap;
justify-content:center;
visibility:visible !important;
opacity:1 !important;
position:relative;
z-index:10; 

}

/* BOTTONI */

.city-btn{

background:#f1f5f9;

border:1px solid #e2e8f0;

padding:8px 14px;

border-radius:20px;

font-size:13px;

cursor:pointer;

transition:all .25s ease;

color:#0f172a;

}

/* HOVER */

.city-btn:hover{

background:#10b981;
color:white;
transform:translateY(-2px);
border-color:#10b981;

}

/* ACTIVE */

.city-btn.active{

background:#10b981;
color:white;
border-color:#10b981;

}

/* ===================== */
/* MOBILE FIX */
/* ===================== */

@media (max-width:768px){

.city-quick{
justify-content:center;
}

.city-btn{
font-size:12px;
padding:7px 12px;
}

}

/* ===================== */
/* MARKET STATS */
/* ===================== */

.market-stats{

display:flex;

gap:18px;

margin-top:22px;

flex-wrap:wrap;

justify-content:center;  

align-items:center;  

}

.market-stat{

background:rgba(255,255,255,0.85);

backdrop-filter:blur(6px);

border-radius:14px;

padding:16px 20px;

border:1px solid #e2e8f0;

box-shadow:0 10px 30px rgba(0,0,0,0.06);

min-width:160px;

}

.market-stat strong{

display:block;

font-size:13px;

color:#64748b;

}

.market-stat span{

font-size:20px;

font-weight:700;

color:#10b981;

}

/* ===================== */
/* HERO DIVIDER */
/* ===================== */

.hero-divider{

display:flex;

align-items:center;

justify-content:center;

gap:12px;

margin:25px 0;

color:#64748b;

font-size:14px;

}

.hero-divider:before,
.hero-divider:after{

content:"";

flex:1;

height:1px;

background:#e2e8f0;

}

.hero-property-box{

background:rgba(255,255,255,0.92);

border-radius:16px;

padding:16px 18px;

box-shadow:0 12px 35px rgba(0,0,0,0.06);

border:1px solid #e2e8f0;

/* FIX CENTRATURA */
max-width:520px;
width:100%;
margin:25px auto;

/* allineamento interno */
text-align:center;

}

.hero-right{
display:flex;
justify-content:center;
align-items:center;
}

.hero-right img{
max-width:100%;
width:100%;
height:auto;
}

.hero-trust{
margin-top:18px;
display:flex;
flex-direction:column;
gap:14px;
font-size:14px;
color:#ffffff;
text-shadow:0 2px 8px rgba(0,0,0,0.6); 
}

.hero-trust > *{
flex:1 1 100%;
max-width:100%;
}

/* ===================== */
/* TOOL CARD */
/* ===================== */

.pro-card{
max-width:620px;
margin:0;
width:100%;
}

.tool-card{

background:rgba(255,255,255,0.85);
backdrop-filter:blur(12px);

padding:32px;

border-radius:28px;

box-shadow:0 60px 160px rgba(15,23,42,.15);

border:1px solid rgba(255,255,255,0.6);

margin-bottom:50px;

transition:.3s ease;

}

.tool-card:hover{

transform:translateY(-4px);
box-shadow:0 80px 200px rgba(15,23,42,.16);

}

/* ===================== */
/* FORM – SaaS PREMIUM */
/* ===================== */

.form-grid{

display:grid;
grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
gap:24px;

}

/* ===== LABEL ===== */

.input-group label{

display:block;
font-weight:600;
font-size:13px;
margin-bottom:6px;

/* 🔥 leggibilità su hero */
color:#ffffff;

text-shadow:0 2px 10px rgba(0,0,0,0.6);
letter-spacing:0.3px;

}

/* ===== INPUT ===== */

.input-group input{

width:100%;
padding:14px 16px;

border-radius:14px;

/* 🔥 glass effect */
background:rgba(255,255,255,0.92);
backdrop-filter:blur(8px);

/* bordo elegante */
border:1px solid rgba(255,255,255,0.3);

font-size:14px;
color:#0f172a;

transition:all .25s ease;

/* 🔥 profondità */
box-shadow:
0 10px 30px rgba(0,0,0,0.08),
0 2px 6px rgba(0,0,0,0.05);

}

/* ===== PLACEHOLDER ===== */

.input-group input::placeholder{

color:#64748b;
opacity:0.7;

}

/* ===== FOCUS ===== */

.input-group input:focus{

outline:none;

/* glow SaaS */
border-color:#10b981;

background:white;

box-shadow:
0 0 0 4px rgba(16,185,129,0.18),
0 10px 30px rgba(16,185,129,0.15);

transform:translateY(-1px);

}

/* ===== HOVER ===== */

.input-group input:hover{

transform:translateY(-1px);

box-shadow:
0 14px 40px rgba(0,0,0,0.10),
0 4px 10px rgba(0,0,0,0.06);

}

/* ===================== */
/* RESULTS CARD */
/* ===================== */

.results-card{

background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
padding:26px;
border-radius:28px;
box-shadow:0 40px 120px rgba(15,23,42,.10);
border:1px solid #e2e8f0;
margin-bottom:40px;

}

.results-card h3{

font-size:20px;
margin-bottom:25px;
font-weight:700;

}

/* ===================== */
/* KPI GRID */
/* ===================== */

.kpi-grid{

display:grid;
  grid-template-columns:repeat(3,1fr); /* 🔥 FIX DEFINITIVO */
  gap:22px;
  width:100%;
  margin-bottom:30px;

}

.kpi strong{
color:#16a34a;
font-size:26px;
}

.kpi-box{

background:#ffffff;
border:1px solid #e2e8f0;
border-radius:18px;
padding:26px;
box-shadow:0 10px 35px rgba(15,23,42,.05);

}

.kpi-box strong{

display:block;
font-size:28px;
margin-top:8px;

}

#investment-ranking .kpi-box{
background:linear-gradient(180deg,#ecfdf5,#ffffff);
border:1px solid #10b981;
}

/* ===================== */
/* BUTTON SYSTEM 2.0 */
/* ===================== */

/* BASE */

.btn{
display:inline-flex;
align-items:center;
justify-content:center;

padding:14px 28px;
border-radius:12px;

font-weight:600;
font-size:15px;

text-decoration:none;
cursor:pointer;

transition:
transform .2s ease,
box-shadow .2s ease,
background .2s ease,
color .2s ease;

border:1px solid transparent;

position:relative;
overflow:hidden;
}

/* MICRO INTERACTION */

.btn:hover{
transform:translateY(-2px);
}

.btn:active{
transform:translateY(0) scale(0.98);
}

/* ===================== */
/* LANGUAGE SWITCH FIX */
/* ===================== */

.lang-switch{
display:flex;
gap:6px;
align-items:center;

flex-wrap:nowrap;        /* 🔥 evita verticale */
white-space:nowrap;      /* 🔥 sicurezza extra */
flex-shrink:0; /* 🔥 QUESTO È IL FIX CRITICO */
}

.lang-btn{
padding:6px 12px;
font-size:12px;
font-weight:600;
flex-shrink:0;  

border-radius:999px;

background:#f1f5f9;
color:#475569;

border:none;

cursor:pointer;
transition:all .2s ease;

/* 🔥 FIX MOBILE */
flex:0 0 auto;
white-space:nowrap;
}

.lang-btn:hover{
background:#10b981;
color:#fff;
transform:translateY(-1px);
}

.lang-btn.active{
background:#10b981;
color:#fff;
box-shadow:0 4px 12px rgba(16,185,129,0.3);
}

/* ===================== */
/* PRIMARY (MAIN CTA) */
/* ===================== */

.btn-primary{
display:inline-flex;
align-items:center;
justify-content:center;

background:linear-gradient(135deg,#10b981,#059669);
color:#fff;

padding:14px 22px;
border-radius:12px;
border:none;

position:relative;
overflow:hidden; 

font-weight:700;
font-size:15px;
letter-spacing:0.4px;  

cursor:pointer;

transition:all .25s ease;

box-shadow:
0 10px 25px rgba(16,185,129,0.35),
inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-primary::after{
content:"";
position:absolute;
top:0;
left:-100%;
width:100%;
height:100%;
background:linear-gradient(
120deg,
transparent,
rgba(255,255,255,0.3),
transparent
);
transition:0.6s;
}

.btn-primary:hover::after{
left:100%;
}

/* ===================== */
/* ANNUAL BUTTON (PREMIUM) */
/* ===================== */

.btn-annual{

background:linear-gradient(135deg,#f59e0b,#fbbf24);
color:#0f172a;

box-shadow:
0 10px 25px rgba(245,158,11,0.35),
inset 0 1px 0 rgba(255,255,255,0.25);

}

.plan-card{
display:flex;
flex-direction:column;
justify-content:space-between;
height:100%; 
width:100%;
max-width:320px;  
}

.plan-card button{
margin-top:auto;
}

.plan-annual strong{
color:#f59e0b;
font-size:28px;
}

.plan-annual{
transform:scale(1.05);
padding-top:36px;
border:2px solid #f59e0b;
box-shadow:0 30px 80px rgba(245,158,11,0.25);
background:linear-gradient(
180deg,
rgba(255,255,255,1),
rgba(255,251,235,1)
);
position:relative;
z-index:2;
}  

.pricing-grid{
align-items:stretch;
}  

.plan-badge{
position:absolute;
top:-18px; /* più alto */
left:50%;
transform:translateX(-50%);

background:#f59e0b;
color:white;

font-size:12px;
font-weight:600;

padding:6px 12px;
border-radius:20px;

box-shadow:0 6px 15px rgba(245,158,11,0.4);

white-space:nowrap; /* evita rotture */
z-index:3;
}

.plan-annual:hover{
transform:scale(1.07);
}

.annual-badge{
font-size:12px;
font-weight:600;
color:#f59e0b;
margin-bottom:8px;
}

/* hover */

.btn-annual:hover{
transform:translateY(-2px);

box-shadow:
0 18px 40px rgba(245,158,11,0.45),
inset 0 1px 0 rgba(255,255,255,0.3);
}

/* HOVER */
.btn-primary:hover{
transform:translateY(-2px);
box-shadow:
0 18px 40px rgba(16,185,129,0.45),
inset 0 1px 0 rgba(255,255,255,0.3);
}

/* ===================== */
/* SECONDARY (GLASS/WHITE) */
/* ===================== */

.btn-secondary{

background:rgba(255,255,255,0.9);
color:#0f172a;
background:#ffffff !important;  

border:1px solid #cbd5e1;

box-shadow:
0 6px 18px rgba(0,0,0,0.06);

backdrop-filter:blur(6px);
}

/* hover coerente */
.btn-secondary:hover{

background:#10b981;
color:#fff;
border-color:#10b981;

box-shadow:
0 12px 30px rgba(16,185,129,0.25);

}

/* ===================== */
/* GHOST (per header / soft UI) */
/* ===================== */

.btn-ghost{

background:transparent;
color:#0f172a;

border:1px solid rgba(0,0,0,0.08);
}

.btn-ghost:hover{
background:#f1f5f9;
}

/* ===================== */
/* ANALYZER CTA (SPECIAL) */
/* ===================== */

.property-analyzer .btn-secondary{

background:linear-gradient(135deg,#10b981,#059669);
color:#fff;
border:none;

box-shadow:
0 10px 25px rgba(16,185,129,0.25);

}

.property-analyzer .btn-secondary:hover{

box-shadow:
0 16px 40px rgba(16,185,129,0.35);

}

/* ===================== */
/* SIZE VARIANTS */
/* ===================== */

.btn-lg{
padding:18px 36px;
font-size:16px;
border-radius:14px;
width:100%;
max-width:520px;
}

.btn-sm{
padding:10px 16px;
font-size:13px;
border-radius:10px;
}

/* ===================== */
/* GLOBAL LINK FIX FINAL */
/* ===================== */

/* BASE SICURA */
a{
color:#10b981;
text-decoration:none;
transition:0.2s ease;
}

/* hover */
a:hover{
opacity:0.9;
}

/* HEADER NAV */
.portal-nav a{
color:#334155;
font-weight:500;
}

.portal-nav a:hover{
color:#10b981;
}

/* HERO (se dentro card bianca) */
.hero a{
color:#10b981;
}

/* SECTION LIGHT */
.section-light a{
color:#10b981;
font-weight:600;
}

/* SECTION DARK (fondi scuri) */
.section-dark a{
color:#bbf7d0 !important;
font-weight:600;
opacity:1 !important;
}

.section-dark a:hover{
color:#ffffff !important;
}

/* MARKET LINKS (🔥 QUESTO TI MANCAVA) */
.market-link{
color:#10b981 !important;
font-weight:600;
display:inline-block;
}

.market-link:hover{
text-decoration:underline;
}

/* FOOTER */
.footer-links a{
color:#94a3b8;
}

.footer-links a:hover{
color:#ffffff;
}

/* ===================== */
/* MARKET BENCHMARK */
/* ===================== */

.market-benchmark{

background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
border:1px solid #e2e8f0;

}

.market-benchmark strong{

font-size:18px;

}

/* DASHBOARD CONTAINER */

.dashboard-container{
max-width:1300px;
margin-top:0;
padding:20px 20px 80px 20px;
width:100%;
box-sizing:border-box;
}

@media (max-width:768px){

.dashboard-container{
padding:60px 12px;
}

}

/* ===================== */
/* DASHBOARD LAYOUT PROTOTYPE */
/* ===================== */

.dashboard-layout{
display:grid;
grid-template-columns:minmax(220px,1fr) 300px;
gap:40px;
align-items:start;
max-width:1300px;
margin:auto;
width:100%; 
}

/* MOBILE FIX */

@media (max-width:900px){

.dashboard-layout{
grid-template-columns:1fr;
width:100%; 
}

.dashboard-side{
position:sticky;
top:100px;
}

.dashboard-main{
min-width:0; 
width:100%;
}

.stats-grid{
grid-template-columns:1fr !important;
} 

}

/* colonne */

.dashboard-main{
display:flex;
flex-direction:column;
gap:28px;
min-width:0;
width:100%;
}

.dashboard-side{
position:sticky;
top:100px;
}

/* DASHBOARD TOP KPI */

.dashboard-top-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:22px;
margin-bottom:30px;
}

.dashboard-charts{
display:grid;
grid-template-columns:1fr 1fr;
gap:28px;
margin-bottom:40px;
}

@media (max-width:900px){

.dashboard-charts{
grid-template-columns:1fr;
}

.dashboard-top-grid{
grid-template-columns:1fr;
}

}

/* ===================== */
/* INVESTMENT OPPORTUNITY */
/* ===================== */

.opportunity{
display:flex;
gap:12px;
align-items:center;
flex-wrap:wrap; 
margin-top:12px;
padding:10px;
border-radius:10px;
transition:0.2s ease;
text-decoration:none;
color:inherit;
}

.opportunity:hover{
background:#f8fafc;
transform:translateY(-2px);
box-shadow:0 10px 25px rgba(0,0,0,0.08);
}

.opportunity img{

object-position:center; 

width:90px;

height:70px;

object-fit:cover;

border-radius:8px;

}

.opportunity-info{

flex:1;

}

.opportunity-info strong{

font-size:14px;

display:block;

}

.opportunity-price{

color:#10b981;

font-weight:600;

font-size:14px;

margin-top:2px;

}

@media (max-width:768px){

.opportunity{
flex-direction:column;
align-items:flex-start;
}

.opportunity img{
width:100%;
height:160px;
}

}

.btn-dashboard{

display:inline-flex;
align-items:center;
justify-content:center;

padding:10px 16px;
font-size:13px;

border-radius:10px;

background:#0f172a;
color:#fff;

border:1px solid rgba(0,0,0,0.1);

cursor:pointer;

transition:.2s ease;
}

.btn-dashboard:hover{
transform:translateY(-2px);
box-shadow:0 10px 25px rgba(0,0,0,0.15);
}

/* BEST INVESTMENT CARD */

#best-investment{

margin-bottom:40px;

}

/* welcome */

.dashboard-welcome{

margin-bottom:40px;

}

.dashboard-welcome h1{

font-size:34px;
font-weight:800;
margin-bottom:8px;

}

/* quick buttons */

.dashboard-actions{

margin-top:18px;
display:flex;
gap:12px;

}

.btn-dashboard{
width:auto;
display:inline-block;

padding:10px 18px;
border-radius:10px;
font-size:13px;
background:#0f172a;
color:white;
text-decoration:none;

transition:0.2s ease;
}

.btn-dashboard:hover{

transform:translateY(-2px);
box-shadow:0 10px 25px rgba(0,0,0,0.15);

}

/* stats */

.stats-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:22px;
margin-bottom:50px;
width:100%;
}

.stats-grid > *{
min-width:0;
overflow:hidden;
}

/* MOBILE FIX KPI */

@media (max-width:768px){

.stats-grid{
display:grid;
grid-template-columns:1fr !important;
gap:22px;
width:100%;
}

.stats-grid > *{
width:100%;
max-width:100%;
}

.dashboard-top-grid{
display:grid;
grid-template-columns:1fr;
gap:20px;
}

.analysis-grid{
display:grid;
grid-template-columns:1fr;
gap:20px;
}

}

/* analyses */

.analysis-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
gap:24px;
margin-top:30px;
}

.analysis-card{
display:flex;
flex-direction:column;
gap:8px; 
background:white;
padding:30px;
border-radius:20px;
border:1px solid #e2e8f0;
box-shadow:0 25px 70px rgba(15,23,42,.08);
transition:0.25s ease;
}

.analysis-card:hover{

transform:translateY(-4px) scale(1.01);
box-shadow:0 35px 90px rgba(15,23,42,.12);

}

.analysis-card h3{
margin-bottom:16px;
font-size:18px;
font-weight:600;
white-space:normal;
word-break:normal;
line-height:1.3; 
}

.metric{

font-size:14px;
margin-top:8px;
color:#475569;

}

.metric strong{
font-size:16px;
font-weight:600;
color:#0f172a;
}

/* ROI COLORS */

.roi-positive{
color:#10b981;
font-weight:700;
}

.roi-negative{
color:#ef4444;
font-weight:700;
}

/* ===================== */
/* INVESTMENT INSIGHT */
/* ===================== */

#investment-insight{

background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
border:1px solid #e2e8f0;
box-shadow:0 20px 60px rgba(15,23,42,0.08);

}

#investment-insight h3{

font-size:20px;
font-weight:700;
margin-bottom:8px;

}

/* ===================== */
/* BACK HOME LINK */
/* ===================== */

.back-home{

display:inline-block;
margin-top:15px;
margin-bottom:30px;

font-size:14px;
color:#0f172a;

text-decoration:none;
opacity:0.7;

}

.back-home:hover{

opacity:1;
text-decoration:underline;

}

/* ===================== */
/* LEGAL PAGES */
/* ===================== */

.legal-container{

max-width:820px;
margin:auto;

padding:120px 20px 160px 20px;

line-height:1.7;

}

.legal-container h1{

font-size:38px;
font-weight:800;
margin-bottom:24px;
letter-spacing:-0.4px;

}

.legal-container h3{

margin-top:25px;
margin-bottom:8px;

}

.legal-container p{

margin-bottom:10px;
color:#334155;

}

.legal-container ul{

margin-left:18px;
margin-bottom:10px;

}

.legal-container li{

margin-bottom:6px;

}

/* ===================== */
/* FOOTER */
/* ===================== */

.global-footer{

margin-top:80px;
padding:50px 20px;

text-align:center;

background: rgba(15,23,42,0.85);

backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);

border-top:1px solid rgba(255,255,255,0.08);

color:#e2e8f0;
}

.footer-links{

margin-top:20px;

display:flex;
flex-wrap:wrap;
justify-content:center;
gap:20px;

font-size:14px;

}

.footer-links a{

text-decoration:none;

color:#94a3b8;

transition:all .2s ease;

}

.footer-links a:hover{
color:white;
}

.global-footer small{
display:block;
margin-top:10px;
opacity:0.7;
font-size:13px;
}

}

/* ===================== */
/* HOW IT WORKS */
/* ===================== */

.how-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
gap:30px;
margin-top:40px;
}

.how-card{
background:white;
padding:40px;
border-radius:20px;
border:1px solid #e2e8f0;
box-shadow:0 20px 60px rgba(0,0,0,0.05);
text-align:center;
}

.how-card h3{
margin-top:10px;
margin-bottom:10px;
font-size:18px;
}

.how-card p{
font-size:14px;
color:#64748b;
line-height:1.5;
}

.how-number{
width:40px;
height:40px;
background:#10b981;
color:white;
display:flex;
align-items:center;
justify-content:center;
border-radius:50%;
font-weight:700;
margin:0 auto 15px auto;
font-size:16px;
}

/* ===================== */
/* WHY RENDIMENTOBB */
/* ===================== */

.why-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
gap:30px;
margin-top:40px;
}

.why-card{
background:white;
padding:40px;
border-radius:20px;
border:1px solid #e2e8f0;
box-shadow:0 20px 60px rgba(0,0,0,0.05);
text-align:center;
transition:0.25s ease;
}

.why-card:hover{
transform:translateY(-6px);
box-shadow:0 30px 80px rgba(0,0,0,0.08);
}

.why-icon{
font-size:28px;
margin-bottom:15px;
}

.why-card h3{
margin-bottom:10px;
font-size:18px;
}

.why-card p{
font-size:14px;
color:#64748b;
line-height:1.5;
}

/* ===================== */
/* GUIDE GRID */
/* ===================== */

.guide-grid{

display:grid;

grid-template-columns:repeat(auto-fit,minmax(220px,1fr));

gap:25px;

margin-top:30px;

}

.guide-card{

background:white;

padding:25px;

border-radius:16px;

border:1px solid #e2e8f0;

box-shadow:0 15px 40px rgba(0,0,0,0.05);

text-decoration:none;

color:#0f172a;

transition:all .25s ease;

}

.guide-card:hover{

transform:translateY(-6px);

border-color:#10b981;

box-shadow:0 30px 80px rgba(0,0,0,0.10);

}

.guide-card h3{

font-size:16px;

margin-bottom:6px;

}

.guide-card p{

font-size:13px;

color:#64748b;

}

/* HERO TOOL */
.tool-hero{
background:
linear-gradient(
rgba(255,255,255,0.45),
rgba(255,255,255,0.70)
),
url("/img/naples-bg.jpg");

background-size:cover;
background-position:center;
background-attachment:fixed;

padding:40px 0 40px 0;
min-height:auto;

display:block;
}


/* ===================== */
/* TOOL PREVIEW */
/* ===================== */

.tool-preview{
text-align:center;
margin-top:80px;
margin-bottom:80px;
}

.tool-preview h2{
font-size:28px;
margin-bottom:10px;
}

.tool-preview p{
color:#64748b;
margin-bottom:40px;
}

.preview-card{
background:white;
border-radius:20px;
padding:40px;
border:1px solid #e2e8f0;
box-shadow:0 30px 80px rgba(0,0,0,0.06);
max-width:700px;
margin:auto;
}

.preview-metrics{
display:flex;
justify-content:space-between;
margin-bottom:30px;
}

.preview-metrics span{
font-size:13px;
color:#64748b;
}

.preview-metrics strong{
display:block;
font-size:22px;
color:#10b981;
margin-top:5px;
}

.preview-bar{
height:10px;
background:#e2e8f0;
border-radius:20px;
overflow:hidden;
margin-bottom:15px;
}

.preview-bar-fill{
width:72%;
height:100%;
background:linear-gradient(90deg,#10b981,#22c55e);
}

.pro-note{
font-size:13px;
color:#64748b;
margin-top:4px;
}

.preview-note{
font-size:14px;
color:#334155;
}

/* ===================== */
/* TRUST BAR */
/* ===================== */

.pro-trust{
font-size:13px;
color:#475569;
margin-top:10px;
line-height:1.6;
}

.trust-bar{
margin-top:60px;
margin-bottom:40px;
}

.trust-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
gap:30px;
text-align:center;
}

.trust-item{
background:white;
border:1px solid #e2e8f0;
border-radius:18px;
padding:22px;
box-shadow:0 12px 35px rgba(15,23,42,0.06);
display:flex;
align-items:center;
justify-content:center;
gap:14px;
transition:0.25s ease;
}

.trust-item:hover{
transform:translateY(-3px);
box-shadow:0 18px 50px rgba(15,23,42,0.08);
}

.trust-icon{
font-size:18px;
color:#10b981;
}

.trust-item p{
font-size:14px;
color:#475569;
}

.micro-trust{
display:flex;
justify-content:center;
gap:60px;
margin-top:25px;
margin-bottom:30px;
text-align:center;
}

.micro-trust strong{
display:block;
font-size:22px;
color:#10b981;
}

.micro-trust p{
font-size:13px;
color:#64748b;
}

/* ===================== */
/* FEATURE CARD HOVER */
/* ===================== */

.feature-card{

background:white;

padding:30px;

border-radius:18px;

border:1px solid #e2e8f0;

transition:
transform .25s ease,
box-shadow .25s ease,
border-color .25s ease;

box-shadow:0 20px 60px rgba(0,0,0,0.05);

}

.feature-card:hover{

transform:translateY(-8px);

box-shadow:0 40px 100px rgba(0,0,0,0.10);

border-color:#10b981;

}

/* ===================== */
/* MARKET SECTION */
/* ===================== */

.market-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:30px;
margin-top:40px;
}

.market-card{
background:rgba(255,255,255,0.9);
backdrop-filter:blur(10px);

padding:36px 20px;

border-radius:18px;
border:1px solid rgba(255,255,255,0.6);

box-shadow:0 25px 80px rgba(0,0,0,0.08);

text-align:center;

transition:all .25s ease;
}

.market-card:hover{
transform:translateY(-6px) scale(1.02);
box-shadow:0 40px 120px rgba(0,0,0,0.12);
}

.market-card strong{
display:block;
font-size:14px;
color:#64748b;
font-weight:700;
margin-bottom:6px;
}

.market-card span{
font-size:28px;
font-weight:800;
color:#10b981;
}

.market-card p{
font-size:14px;
color:#64748b;
}  

.hero-market{

background:
linear-gradient(
rgba(15,23,42,0.65),
rgba(15,23,42,0.85)
),
url("/img/rome-bg.jpg");

background-size:cover;
background-position:center;

padding:140px 20px 100px;

text-align:center;
color:white;

position:relative;
z-index:1;
}

.hero-market h1{
font-size:42px;
margin-bottom:15px;

color:#ffffff;

text-shadow:0 6px 30px rgba(0,0,0,0.6);
}

.hero-market .btn{
margin-top:14px;
}

.hero-market p{
color:#e2e8f0;
font-size:18px;

text-shadow:0 3px 15px rgba(0,0,0,0.5);
}

.hero-market p{
color:#e2e8f0;
font-size:18px;

text-shadow:0 3px 15px rgba(0,0,0,0.5);
}

.hero-market::after{
content:"";
position:absolute;
top:0;
left:0;
width:100%;
height:100%;

background:
radial-gradient(
circle at 20% 20%,
rgba(16,185,129,0.15),
transparent 60%
);

pointer-events:none;
z-index:0;
}

.hero-sub{
color:#e2e8f0;
font-size:18px;
}

.section-light{
background: rgba(255,255,255,0.92);

backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);

border:1px solid rgba(0,0,0,0.05);

box-shadow:
0 25px 80px rgba(0,0,0,0.12);
}

.section-light ul li{
margin-bottom:8px;
}

.section-light .btn-primary{
box-shadow:
0 20px 60px rgba(16,185,129,.7),
0 0 25px rgba(16,185,129,.5);
}

.section + .section{
margin-top:-30px;
}

.section-dark{
position:relative;
z-index:3;  
background:
linear-gradient(
135deg,
rgba(5,150,105,0.95),
rgba(4,120,87,0.95)
);

filter: contrast(1.1) brightness(0.95);  

backdrop-filter: none;
-webkit-backdrop-filter: none;

color:white;
border-radius:24px; 

border:1px solid rgba(255,255,255,0.1);

box-shadow:0 40px 120px rgba(16,185,129,0.4);
text-align:center; 
}

.section-dark h2{
color: white; 
font-size:30px;
margin-bottom:10px;
}

.section-dark p{
color: white; 
font-size:16px;
opacity:0.9;
margin-bottom:20px;
}

.section-dark a:not(.btn){
color:#a7f3d0; /* verde chiaro leggibile */
text-decoration:none;
}

.section-dark a:not(.btn):hover{
text-decoration:underline;
}

.section-dark ul li a{
font-size:16px;
letter-spacing:0.3px;  
color:#bbf7d0 !important;
font-weight:600;
opacity:1 !important;
display:inline-block;
margin:6px 0;

text-shadow:0 3px 10px rgba(0,0,0,0.6); 
}

.section-dark ul{
list-style:none;
padding:0;
margin-top:20px;
}

.section-dark ul li{
margin:10px 0; 
}

.section-dark ul li a:hover{
color:#ffffff;
transform:translateX(4px);
}

.section-dark .container{
background:transparent;
padding:25px;
border-radius:16px;
}

.section-dark .btn-primary{
box-shadow:
0 20px 60px rgba(16,185,129,.7),
0 0 30px rgba(16,185,129,.6);
}

/* ===================== */
/* MARKET BUTTONS (FINAL CLEAN) */
/* ===================== */

.market-buttons{
display:flex;
justify-content:center;  
grid-template-columns:repeat(2,1fr);
gap:14px;
flex-wrap:wrap;  
margin-top:30px;
}

@media (max-width:768px){
.market-buttons{
grid-template-columns:1fr;
gap:12px;
}
}

/* BUTTON */

.market-btn{
display:flex;
align-items:center;
justify-content:center;

width:100%;

padding:16px;
border-radius:12px;

font-size:15px;
font-weight:700; /* 🔥 più leggibile */

background:linear-gradient(135deg,#10b981,#059669);
color:#ffffff !important; /* 🔥 FORZATO */

cursor:pointer;

transition:all .25s ease;

box-shadow:0 8px 20px rgba(16,185,129,0.25);

/* 🔥 FIX LEGGIBILITÀ */
text-shadow:0 1px 2px rgba(0,0,0,0.25);
letter-spacing:0.3px;
}

/* HOVER */

.market-btn:hover{
transform:translateY(-3px);
color:#ffffff !important;
text-shadow:0 1px 3px rgba(0,0,0,0.35);  

box-shadow:
0 18px 40px rgba(16,185,129,0.35),
0 0 20px rgba(16,185,129,0.2);
}

/* ACTIVE */

.market-btn:active{
transform:scale(0.97);
}
/* ===================== */
/* QUICK ROI */
/* ===================== */

.quick-roi-card{
background:white;
padding:50px;
border-radius:24px;
border:1px solid #e2e8f0;
box-shadow:0 40px 100px rgba(0,0,0,0.06);
max-width:800px;
margin:auto;
transition:0.25s ease;
}

.quick-roi-card:hover{

transform:translateY(-6px);

box-shadow:0 60px 140px rgba(0,0,0,0.10);

border-color:#10b981;

}

.quick-roi{
text-align:center;
margin-top:60px;
}

.quick-roi h2{
font-size:28px;
margin-bottom:10px;
}

.quick-roi p{
color:#64748b;
margin-bottom:40px;
}

.quick-roi-card:hover{
transform:translateY(-4px);
box-shadow:0 60px 140px rgba(0,0,0,0.08);
}

.quick-roi-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
gap:20px;
margin-bottom:30px;
}

.quick-input label{
display:block;
font-size:13px;
margin-bottom:6px;
color:#64748b;
}

.quick-input input{

width:100%;

padding:14px;

border-radius:10px;

border:1px solid #e2e8f0;

background:#f8fafc;

font-size:14px;

transition:all .2s ease;

}

.quick-input input:focus{

outline:none;

border-color:#10b981;

background:white;

box-shadow:0 0 0 3px rgba(16,185,129,.15);

}

.quick-roi-result{
display:flex;
justify-content:center;
gap:20px;
flex-wrap:wrap;
}

.quick-roi-result > *{
min-width:0;
}

.quick-roi-result span{
font-size:13px;
color:#64748b;
}

.quick-roi-result strong{
display:block;
font-size:26px;
margin-top:5px;
color:#10b981;
}

/* ===================== */
/* ACCOUNT EMAIL FIX */
/* ===================== */

.account-email{

display:block;
max-width:160px;

overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;

font-size:13px;
color:#475569;
margin-top:4px;

}

/* ===================== */
/* BENEFIT LIST */
/* ===================== */

.benefit-list{
list-style:none;
padding:0;
margin-top:15px;
color:#334155;
}

.benefit-list li{
margin:6px 0;
}

/* ===================== */
/* FEATURE CARD (GLOBAL) */
/* ===================== */

.feature-card:hover{

transform:translateY(-8px);

box-shadow:0 40px 100px rgba(0,0,0,0.10);

border-color:#10b981;

}

/* ===================== */
/* PROPERTY MARKET EXTRA */
/* ===================== */

.market-label{
font-size:13px;
color:#64748b;
margin-top:6px;
}

.market-extra{
margin-top:10px;
font-size:13px;
color:#475569;
}

.market-link{
margin-top:16px;
font-size:13px;
font-weight:600;
color:#10b981;
}

/* ===================== */
/* HAMBURGER DESKTOP FIX */
/* ===================== */

@media (min-width: 768px){
.mobile-menu-toggle{
display:none !important;
}
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */

@media (max-width:1024px){

.dashboard-layout{
display:flex;
flex-direction:column;
}

.dashboard-main{
order:1;
}

.dashboard-side{
order:2;
}

.tool-card{
padding:40px;
}

.page-title h1{
font-size:28px;
}

.page-title p{
font-size:15px;
}

}

/* GLOBAL MOBILE FIX */
@media (max-width:768px){

/* DISATTIVATO GRID HEADER */
/* .portal-header-inner{
grid-template-columns:auto 1fr auto;
} */

}
/* HERO MOBILE */

.hero-grid{
grid-template-columns:1fr;
text-align:center;
gap:30px;
margin:40px auto;
}

.hero-left h1{
font-size:30px;
line-height:1.3;
}

.hero-left p{
font-size:16px;
max-width:420px;
margin:auto;
}  

.hero-left .btn{
width:100%;
max-width:320px;
margin:auto;
}  

.hero-left{
text-align:center;
max-width:100%;
width:100%;  
}

.hero-trust{
flex-direction:column;
align-items:center;
gap:14px;
}

.hero-trust > *{
width:100%;
}

.hero-right{
display:none;
}  

.hero-right img{
max-width:420px;
margin:auto;
}  

/* ===================== */
/* MOBILE HAMBURGER */
/* ===================== */

@media (max-width:768px){

.hamburger{
display:block;
font-size:26px;
cursor:pointer;
z-index:1100;
transition:transform .25s ease;
}

}

/* animazione hamburger */

.hamburger.active{
transform:rotate(90deg);
}

/* ===================== */
/* MOBILE NAV */
/* ===================== */

/* apertura menu */

.portal-nav a{
font-size:14px;
font-weight:500;
color:#334155;
padding:6px 8px;
border-radius:8px;
transition:all .2s ease;
}

/* ===================== */
/* DASHBOARD FIX */
/* ===================== */

.stats-grid,
.analysis-grid,
.dashboard-top-grid{
width:100%;
max-width:100%;
}

.analysis-card,
.kpi-box,
.stats-grid > *,
.analysis-grid > *{
min-width:0;
width:100%;
max-width:100%;
}

/* ===================== */
/* HEADER SAFE MOBILE */
/* ===================== */

.header-left{
display:flex;
align-items:center;
gap:14px;
width:auto;
}

}

/* HEADER */

.header-actions{
flex-direction:column;
gap:10px;
display:none;  
}

.header-actions .btn-secondary{
padding:8px 14px;
font-size:13px;
border-radius:10px;
font-weight:600;
}

/* CONTAINER */

.portal-header .container{
padding:0 20px;
}

/* TITLES */

.page-title{
text-align:center;
margin-bottom:25px;
}

.page-title h1{
font-size:38px;
font-weight:700;
letter-spacing:-0.5px;
}

.page-title p{
font-size:14px;
}

/* CARDS */

.tool-card{
padding:32px 24px;
border-radius:18px;
}

.results-card{
padding:26px;
border-radius:18px;
}

.analysis-card{
padding:22px;
border-radius:18px;
word-break:break-word;
}  

.card{
background:white;

padding:28px;
border-radius:18px;

border:1px solid #e2e8f0;

box-shadow:0 20px 60px rgba(15,23,42,0.06);

transition:all .25s ease;
}

.card:hover{
transform:translateY(-6px);
box-shadow:0 35px 90px rgba(15,23,42,0.10);
border-color:#10b981;
}
.market-card,
.feature-card,
.analysis-card,
.metric-card,
.kpi-box,
.how-card,
.why-card,
.guide-card{

background:white;
padding:28px;
border-radius:18px;
border:1px solid #e2e8f0;
box-shadow:0 20px 60px rgba(15,23,42,0.06);
transition:all .25s ease;

}

.market-card:hover,
.feature-card:hover,
.analysis-card:hover,
.metric-card:hover,
.kpi-box:hover,
.how-card:hover,
.why-card:hover,
.guide-card:hover{

transform:translateY(-6px);
box-shadow:0 35px 90px rgba(15,23,42,0.10);
border-color:#10b981;

}

/* BUTTONS */

.btn{
width:100%;
text-align:center;
padding:16px;
font-size:15px;
opacity:1 !important; 
display:inline-flex;
width:auto; /* 🔥 FIX */
}

.btn.block{
width:100%;
}

.dashboard-actions{
flex-direction:column;
gap:10px;
}

/* GRIDS MOBILE */

@media (max-width:768px){

.analysis-grid{
display:grid;
grid-template-columns:1fr;
gap:20px;
}

.stats-grid{
display:grid;
grid-template-columns:1fr;
gap:16px;
}

.dashboard-top-grid{
display:grid;
grid-template-columns:1fr;
gap:20px;
}

.form-grid{
display:grid;
grid-template-columns:1fr;
}

}

/* METRICS */

.metric{
font-size:14px;
margin-bottom:6px;
}

.metric strong{
font-size:22px;
font-weight:700;
display:block;
margin-top:6px;
line-height:1.2;
white-space:normal;
word-break:break-word;
overflow-wrap:anywhere;
}

/* CHART */

#roi-chart-container,
#cashflow-chart-container{
position:relative;
height:360px;
width:100%;
}

#roi-chart,
#cashflow-chart{
width:100% !important;
}

canvas{
max-width:100%;
height:auto !important;
}

/* TRUST / MARKET */

.trust-grid{
grid-template-columns:1fr;
}

.market-grid{
grid-template-columns:1fr;
}

.quick-roi-grid{
grid-template-columns:1fr;
}

/* PREVENT CARD OVERFLOW */

.analysis-card{
word-break:normal;
overflow-wrap:normal;
}

.metric strong{
white-space:nowrap;
word-break:normal;
overflow-wrap:normal;
}

/* ROI QUICK SIMULATOR */

.roi-grid{
display:grid;
grid-template-columns:repeat(2,1fr);
gap:14px;
margin-top:10px;
}

.roi-field{
display:flex;
flex-direction:column;
font-size:13px;
color:#64748b;
}

.roi-field label{
margin-bottom:4px;
}

.roi-field input{
padding:10px;
border:1px solid #e2e8f0;
border-radius:8px;
font-size:14px;
}

.roi-field input:focus{
outline:none;
border-color:#10b981;
box-shadow:0 0 0 2px rgba(16,185,129,0.2);
}    

/* ===================== */
/* GENERIC SECTION */
/* ===================== */

.section{
background: rgba(255,255,255,0.96);
backdrop-filter: blur(10px);
border-radius:24px;

margin:80px auto;
margin-top: 40px;  

padding:50px 30px;

max-width:1000px;

transform: none;

position:relative;
z-index:2;
}

.section a{
color:#10b981;
font-weight:600;
}

.section h2{
font-size:28px;
margin-bottom:14px;
letter-spacing:-0.4px;
}

.section p{
font-size:16px;
line-height:1.7;
color:#475569;
}

.section-glass{
background: rgba(255,255,255,0.75);

backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);

border:1px solid rgba(255,255,255,0.4);

box-shadow:
0 20px 60px rgba(0,0,0,0.08),
inset 0 1px 0 rgba(255,255,255,0.6);
}

.section-light h2,
.section-light h3{
color:#0f172a;
}

.section-light a{
color:#10b981;
font-weight:600;
text-decoration:none;
transition:.2s ease;
position:relative;
}

.section-light a::after{
content:"";
position:absolute;
left:0;
bottom:-2px;
width:0;
height:2px;
background:#10b981;
transition:.25s ease;
}

.section-light a:hover::after{
width:100%;
}

.section-light p,
.section-light li{
color:#334155;
}

.section .container{
border-radius:16px;
padding:30px;
}

.section::before{
content:"";
position:absolute;
inset:0;
border-radius:24px;

display:none;  

background: radial-gradient(
circle at top left,
rgba(16,185,129,0.08),
transparent 40%
);

z-index:-1;
}

/* ROI SIMULATOR CARD */

.roi-card{

background: rgba(255,255,255,0.9);

padding:32px;

border-radius:20px;

border:1px solid rgba(255,255,255,0.6);

box-shadow:
0 25px 80px rgba(0,0,0,0.10),
inset 0 1px 0 rgba(255,255,255,0.7);

max-width:620px;
width:100%;

margin-top:30px;

transition:all .3s ease;
backdrop-filter: blur(10px);

}

.roi-card:hover{

transform:translateY(-6px) scale(1.01);

box-shadow:
0 35px 100px rgba(0,0,0,0.15);

}

.roi-field{

display:flex;
flex-direction:column;
font-size:13px;
color:#475569;

}

.roi-field input{

margin-top:6px;
padding:14px;

border-radius:12px;

border:1px solid #e2e8f0;

font-size:14px;

background:rgba(248,250,252,0.9);

transition:all .2s ease;

}

.roi-field input:focus{

outline:none;

border-color:#10b981;

box-shadow:0 0 0 3px rgba(16,185,129,0.15);

background:white;

}

.roi-results{

margin-top:24px;

padding-top:18px;

border-top:1px solid rgba(0,0,0,0.08);

font-size:15px;

line-height:1.8;

}  

/* ROI METRICS */

.roi-results-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
gap:14px;
margin-top:20px;
}

.roi-metric{
background:#ffffff;

border:1px solid #e2e8f0;
border-radius:12px;
padding:14px;

text-align:center;

box-shadow:
0 8px 25px rgba(0,0,0,0.05);

transition:0.2s;
}

.roi-metric span{
display:block;
font-size:13px;
color:#64748b;
margin-bottom:6px;
}

.roi-metric strong{
font-size:20px;
font-weight:700;
color:#0f172a;
}

.roi-metric:hover{
transform:translateY(-2px);
box-shadow:0 6px 20px rgba(0,0,0,0.06);
}  

.investment-score{
text-align:center;
min-width:120px;
}

.score-circle{
width:74px;
height:74px;
border-radius:50%;

background:linear-gradient(135deg,#10b981,#047857);

color:white;
font-size:30px;
font-weight:800;

display:flex;
align-items:center;
justify-content:center;

margin:auto;

box-shadow:0 10px 30px rgba(16,185,129,0.4);
}

.score-label{
margin-top:8px;
font-size:13px;
color:#64748b;
}

.investment-metrics{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
gap:14px;
flex:1;
}

.metric-card{
background:#ffffff;

border-radius:14px;
padding:18px;

border:1px solid #e2e8f0;

box-shadow:
0 10px 30px rgba(0,0,0,0.06);

transition:.2s ease;
}

.metric-card:hover{
transform:translateY(-3px);
box-shadow:
0 20px 50px rgba(0,0,0,0.1);
}

.metric-card span{
font-size:12px;
color:#64748b;
display:block;
}

.metric-card strong{
font-size:20px;
font-weight:700;
color:#0f172a;
}

.investment-panel{
margin-top:25px;

background:rgba(255,255,255,0.88);

border-radius:18px;
padding:25px;

border:1px solid rgba(0,0,0,0.05);

box-shadow:
0 20px 60px rgba(0,0,0,0.08);

backdrop-filter:blur(10px);

/* 🔥 FIX GRID UNIFORME */
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:20px;
align-items:stretch;
}

.quick-roi-section{
padding:80px 0;

background:linear-gradient(
180deg,
rgba(255,255,255,0.6),
rgba(240,249,255,0.8)
);
}

/* =============================
MORTGAGE COMPARATOR FINTECH UI
============================= */

.mortgage-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
gap:18px;
margin-top:20px;
}

.mortgage-card{
background:white;
border-radius:14px;
padding:18px;
box-shadow:0 10px 22px rgba(0,0,0,0.05);
border:1px solid #e6edf5;
display:flex;
flex-direction:column;
gap:14px;
transition:0.2s;
}

.mortgage-card:hover{
transform:translateY(-3px);
box-shadow:0 14px 28px rgba(0,0,0,0.08);
}

.best-mortgage{
border:2px solid #10b981;
background:#ecfdf5;
box-shadow:0 12px 26px rgba(16,185,129,0.2);
transform:scale(1.03);
}

.mortgage-header{
display:flex;
justify-content:space-between;
align-items:center;
font-weight:600;
font-size:14px;
}

.mortgage-rank{
font-size:12px;
color:#64748b;
font-weight:600;
margin-bottom:4px;
}

.mortgage-badge{
background:#10b981;
color:white;
padding:4px 10px;
border-radius:20px;
font-size:12px;
}

.mortgage-main{
display:flex;
flex-direction:column;
gap:10px;
}

.mortgage-rate span,
.mortgage-payment span,
.mortgage-interest span{
font-size:12px;
color:#64748b;
}

.mortgage-rate strong{
font-size:16px;
}

.mortgage-payment strong{
font-size:22px;
color:#0f172a;
}

.mortgage-footer{
display:flex;
flex-direction:column;
gap:10px;
font-size:13px;
}

.mortgage-roi-btn{
background:#0f172a;
color:white;
border:none;
padding:8px;
border-radius:8px;
font-size:13px;
cursor:pointer;
transition:0.2s;
}

.mortgage-roi-btn:hover{
background:#10b981;
}

/* FORCE MOBILE SAFE LAYOUT */

.roi-card,
.investment-panel,
.investment-metrics,
.metric-card{
max-width:100%;
min-width:0;
}

.roi-grid{
display:grid;
grid-template-columns:1fr;
gap:12px;
width:100%;
} 

/* 🔥 FIX CORRETTO → SOLO MOBILE */
@media (max-width:768px){
  .investment-panel{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }

  .investment-metrics{
    grid-template-columns:1fr;
    width:100%;
  }  
}

/* ============================= */
/* SIMULATOR DASHBOARD LAYOUT */
/* ============================= */

.simulator-grid{
display:grid;
grid-template-columns:340px 1fr;
gap:28px;
max-width:1200px;
margin:auto;
padding:10px 20px;
align-items:start;
}

.tool-hero:before{
content:"";
position:absolute;
top:0;
left:0;
width:100%;
height:100%;

background:radial-gradient(
circle at 20% 20%,
rgba(16,185,129,0.15),
transparent 50%
);

pointer-events:none;
}

.simulator-left{
position:sticky;
top:110px;
align-self:start;
}

.simulator-left .tool-card{
padding:20px;
border-radius:18px;
background:white;
box-shadow:0 20px 60px rgba(0,0,0,0.08);
}

@media(max-width:1024px){

.simulator-grid{
grid-template-columns:1fr;
}

.simulator-left{
position:relative;
top:0;
}

}

.simulator-btn{
margin-top:30px;
width:100%;
padding:14px;
font-size:16px;
}

.roi-dashboard{

background:rgba(255,255,255,0.9);

backdrop-filter:blur(10px);

padding:22px;

border-radius:24px;

box-shadow:0 40px 120px rgba(0,0,0,0.15);

border:1px solid rgba(255,255,255,0.6);

min-height:360px;

}

.simulator-right{
position:relative;
z-index:1;
}

.roi-chart{
position:relative;
z-index:1;
}

.roi-main{
text-align:center;
margin-bottom:25px;
}

.roi-label{
font-size:16px;
color:#64748b;
}

.roi-value{
font-size:40px;
font-weight:700;
color:#10b981;
}

.roi-metrics{
display:grid;
grid-template-columns:1fr 1fr;
gap:14px;
margin-bottom:14px;
}

.metric{
background:#f8fafc;
padding:15px;
border-radius:10px;
text-align:center;
}

.metric span{
font-size:13px;
color:#64748b;
}

.metric strong{
font-size:22px;
font-weight:700;
display:block;
margin-top:6px;
white-space:nowrap;
}

.range-value{
text-align:center;
font-weight:600;
margin-top:6px;
}
/* ===================== */
/* FINAL MOBILE OVERRIDE */
/* ===================== */

@media (max-width:768px){

.stats-grid{
grid-template-columns:1fr !important;
}

.analysis-grid{
grid-template-columns:1fr !important;
}

.dashboard-charts{
grid-template-columns:1fr !important;
}

}

/* ============================= */
/* DASHBOARD KPI MOBILE FIX */
/* ============================= */

@media (max-width:768px){

.stats-grid{
display:grid !important;
grid-template-columns:1fr !important;
gap:18px;
}

.dashboard-top-grid{
display:grid !important;
grid-template-columns:1fr !important;
}

.dashboard-charts{
grid-template-columns:1fr !important;
}

.analysis-grid{
grid-template-columns:1fr !important;
}

.stats-card,
.analysis-card{
width:100%;
max-width:100%;
}

}

/* ============================= */
/* DASHBOARD CITY BACKGROUND */
/* ============================= */

.dashboard-bg{
background:
linear-gradient(
rgba(255,255,255,0.75),
rgba(255,255,255,0.92)
),
url("/img/napoli-dashboard.jpg");

background-size:cover;
background-position:center;
background-attachment:fixed;
min-height:100vh;
}

/* ===================== */
/* PORTFOLIO PERFORMANCE */
/* ===================== */

.portfolio-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
gap:18px;
margin-top:18px;
}

.portfolio-stat{
background:#f8fafc;
padding:18px;
border-radius:12px;
text-align:center;
border:1px solid #e2e8f0;
}

.portfolio-stat span{
font-size:26px;
font-weight:700;
color:#10b981;
}

.portfolio-stat p{
font-size:13px;
color:#64748b;
margin-top:6px;
}

/* ===================== */
/* DELETE ANALYSIS BUTTON */
/* ===================== */

.delete-analysis{
background:#ef4444;
color:white;
border:none;
padding:6px 10px;
border-radius:6px;
font-size:12px;
cursor:pointer;
transition:0.2s ease;
margin-top:10px;
align-self:flex-end; 
}

.delete-analysis:hover{
background:#dc2626;
}

/* SIMULATOR HERO PROFESSIONAL */

/* ===================== */
/* GLOBAL WIDTH FIX */
/* ===================== */

*,
*::before,
*::after{
box-sizing:border-box;
}

html,body{
width:100%;
}

.pricing-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
gap:30px;
margin-top:40px;
justify-items:center;  
}

/* ===================== */
/* PRICING SECTION FIX (DEPTH + CONTRAST) */
/* ===================== */

.pricing-preview{
background:linear-gradient(
180deg,
rgba(240,249,255,0.8),
rgba(255,255,255,1)
);

padding:60px 30px;
border-radius:28px;

box-shadow:
0 40px 120px rgba(15,23,42,0.08);

border:1px solid #e2e8f0;
}

/* card pricing migliorate */

.plan-card{
background:linear-gradient(
180deg,
#ffffff,
#f8fafc
);

border:1px solid #e2e8f0;

box-shadow:
0 25px 70px rgba(15,23,42,0.08);

transition:all .3s ease;
}

/* hover più premium */

.plan-card:hover{
transform:translateY(-8px) scale(1.02);

box-shadow:
0 50px 140px rgba(15,23,42,0.12);

border-color:#10b981;
}

/* ===================== */
/* HERO PREMIUM UPGRADE */
/* ===================== */

.hero .container{
max-width:900px;
margin:0 auto;
display:flex;
flex-direction:column;
align-items:center; /* 🔥 QUESTO RISOLVE */
text-align:center;
}

.hero > .container > *{
width:100%;
max-width:720px;
margin-left:auto;
margin-right:auto;
}

.hero h1{
font-size:52px;
font-weight:800;
letter-spacing:-1px;
color:#ffffff;
text-shadow:0 4px 20px rgba(0,0,0,0.4);
margin-bottom:18px;
}

/* ===================== */
/* HERO TEXT SYSTEM FINAL */
/* ===================== */

/* 👉 DEFAULT (HOME) */
.hero p{
color:#475569;
text-shadow:none;
font-weight:500;
}

/* 👉 SOLO PAGINE CON BACKGROUND (ROI) */
.hero.hero-bg p{
color:#ffffff !important;
text-shadow:0 4px 20px rgba(0,0,0,0.7);
}

/* mobile */
@media (max-width:768px){
.hero h1{
font-size:32px;
}
.hero p{
font-size:16px;
}
}

/* ===================== */
/* CTA ROI TEXT FIX */
/* ===================== */

.hero-bg .hero-left p{
color:#ffffff !important;
text-shadow:0 3px 12px rgba(0,0,0,0.6);
}

/* ===================== */
/* PRICING HIERARCHY (PRO DOMINANCE) */
/* ===================== */

/* PRO PLAN (FEATURED) */

.plan-card.featured{

transform:scale(1.08);

border:2px solid #10b981;

background:linear-gradient(
180deg,
#ecfdf5,
#ffffff
);

box-shadow:
0 40px 120px rgba(16,185,129,0.25);

z-index:3;
position:relative;
}

/* hover PRO */

.plan-card.featured:hover{

transform:scale(1.1) translateY(-6px);

box-shadow:
0 60px 160px rgba(16,185,129,0.35);
}

/* badge PRO */

.plan-card.featured .plan-badge{

background:#10b981;
color:white;

font-weight:700;

padding:6px 14px;

border-radius:20px;

box-shadow:0 8px 20px rgba(16,185,129,0.4);
}

/* INVESTOR (ridotto) */

.plan-card:not(.featured):not(.plan-annual){

opacity:0.92;
transform:scale(0.97);
}

/* ANNUALE (premium) */

.plan-annual{

transform:scale(1.06);

border:2px solid #f59e0b;

box-shadow:
0 35px 100px rgba(245,158,11,0.25);
}

.plan-annual:hover{

transform:scale(1.08) translateY(-6px);

box-shadow:
0 60px 140px rgba(245,158,11,0.35);
}

/* ===================== */
/* HEADER RESPONSIVE FIX */
/* ===================== */

.hamburger{
display:none;
font-size:22px;
background:none;
border:none;
cursor:pointer;
}

/* MOBILE */
@media (max-width:768px){

.portal-header-inner{
grid-template-columns:auto 1fr auto;
}

/* NAV NASCOSTA */
.portal-nav{
display:none;
}

/* NAV APERTA */
.portal-nav.open{
display:flex;
flex-direction:column;
align-items:center;
gap:15px;

position:absolute;
top:60px;
border-radius:0 0 16px 16px;
left:0;
width:100%;

background:white;
padding:20px;

box-shadow:0 20px 60px rgba(0,0,0,0.1);
border-top:1px solid #e2e8f0;
}

.right-controls .btn{
padding:6px 12px;
font-size:13px;
border-radius:10px;
box-shadow:none;
}  

/* HAMBURGER VISIBILE */
.hamburger{
display:block;
}

}

.hero-features{
display:flex;
justify-content:center;
gap:30px;
margin-top:20px;
flex-wrap:wrap;
}

.hero-feature{
text-align:center;
}

.hero-feature strong{
color:#10b981;
font-size:16px;
display:block;
}

.hero-feature span{
font-size:13px;
color:#475569;
}

/* BLOCCA OVERLAY INVISIBILI */
.portal-header *{
pointer-events:auto;
}

/* CONTENUTO SOTTO */
main{
  position:relative;
  z-index:1;
}

/* ===================== */
/* HEADER MOBILE FIX FINAL */
/* ===================== */

@media (max-width:768px){

/* 🔥 STRUTTURA HEADER */
.portal-header-inner{
display:flex !important;
align-items:center;
justify-content:flex-start; /* 🔥 FIX */
gap:6px;
padding:0 8px;
}

.right-controls{
display:flex;
align-items:center;
gap:6px;
flex-wrap:nowrap;
}  

/* 🔥 LOGO (RIDIMENSIONATO CORRETTAMENTE) */
/* 🔥 LOGO MOBILE OPTIMIZED */
.logo-img{
height:48px !important;
width:auto;
transform:scale(1.15) !important;
transform-origin:left center;
}

/* 🔥 NAV OFF (usa hamburger) */
.portal-nav{
display:none;
}

/* 🔥 HAMBURGER */
.hamburger{
display:block;
font-size:24px;
}

/* 🔥 DESTRA (login + lingua) */
.right-controls{
display:flex;
align-items:center;
gap:6px;
flex-wrap:nowrap;
}

/* 🔥 BOTTONI COMPATTI */
.right-controls .btn{
padding:6px 10px;
font-size:12px;
white-space:nowrap;
}

/* 🔥 LINGUA */
.lang-btn{
padding:5px 8px;
font-size:11px;
}

/* ❌ NON NASCONDERE TUTTO (ERRORE DI PRIMA) */
/* rimosso hide user */

/* 🔥 HEADER HEIGHT FIX */
.portal-header{
padding:6px 0;
}

/* 🔥 SICUREZZA OVERFLOW */
.portal-header-inner > *{
min-width:auto;
}

/* 🔥 PREVIENE COLLASSO */
.portal-header{
overflow:visible;
}

}

/* ===================== */
/* MARKET REAL FIX (CORRETTO) */
/* ===================== */

/* TARGET GIUSTO */
.section.section-dark{
background:#ffffff !important;
color:#0f172a !important;

box-shadow:0 25px 80px rgba(0,0,0,0.08) !important;
border:1px solid #e2e8f0 !important;
}

/* TITOLO */
.section.section-dark h3{
color:#0f172a !important;
}

/* LINK VISIBILI */
.section.section-dark a{
color:#10b981 !important;
opacity:1 !important;
text-shadow:none !important;
}

/* HOVER */
.section.section-dark a:hover{
color:#059669 !important;
}

/* LISTA */
.section.section-dark ul li{
color:#334155 !important;
}

/* RIMUOVE FILTRI CHE SPORCANO */
.section.section-dark{
filter:none !important;
}

/* RIMUOVE OVERLAY */
.section.section-dark::before{
display:none !important;
}

/* ===================== */
/* FIX BOTTONI GLOBALI */
/* ===================== */

/* BASE */
.btn{
text-decoration:none;
}

/* PRIMARY (verde) */
.btn-primary{
color:#ffffff !important;
}

/* 🔥 SOLO HERO CTA ANIMATA */
.hero-roi .btn-primary{
animation:pulse 2s infinite;
}

@keyframes pulse{
0%{box-shadow:0 0 0 0 rgba(16,185,129,0.4);}
70%{box-shadow:0 0 0 10px rgba(16,185,129,0);}
100%{box-shadow:0 0 0 0 rgba(16,185,129,0);}  
}

.hero-roi .btn-primary:hover{
transform:translateY(-2px);
}

/* SECONDARY (bianco) */
.btn-secondary{
color:#0f172a !important;
background:#ffffff !important;
border:1px solid #e2e8f0;
}

/* HOVER SECONDARY */
.btn-secondary:hover{
color:#ffffff !important;
background:#10b981 !important;
border-color:#10b981 !important;
}

/* ===================== */
/* CTA MARKET FIX */
/* ===================== */

/* forza gerarchia dentro section-dark */
.section.section-dark .btn-primary{
background:linear-gradient(135deg,#10b981,#059669) !important;
color:#ffffff !important;
border:none !important;

box-shadow:
0 10px 25px rgba(16,185,129,0.35) !important;
}

/* hover */
.section.section-dark .btn-primary:hover{
background:linear-gradient(135deg,#059669,#047857) !important;
}

/* secondary dentro CTA */
.section.section-dark .btn-secondary{
background:#ffffff !important;
color:#0f172a !important;
border:1px solid #e2e8f0 !important;
}

/* hover secondary */
.section.section-dark .btn-secondary:hover{
background:#10b981 !important;
color:#ffffff !important;
}

/* HERO BUTTON GROUP */

.hero-buttons{
display:flex;
gap:14px;
justify-content:center;
flex-wrap:wrap;
margin-top:25px;
}

.hero-buttons .btn{
max-width:260px;
width:100%;
}

/* ===================== */
/* HERO ROI TEXT FIX */
/* ===================== */

.hero.hero-bg p{
color:#ffffff !important;
text-shadow:0 2px 10px rgba(0,0,0,0.6);
font-weight:500;
max-width:700px;
margin:0 auto;
}

/* ===================== */
/* HERO ROI FINAL FIX */
/* ===================== */

/* RIMUOVE BOX SCURO */
.hero p{
background:none !important;
padding:0 !important;
border-radius:0 !important;
}

/* TESTO PERFETTO */
.hero.hero-bg p{
color:#ffffff !important;
font-weight:500;
text-shadow:0 4px 20px rgba(0,0,0,0.7);
max-width:700px;
margin:0 auto;
}

/* ===================== */
/* ROI CTA TEXT FIX FINAL */
/* ===================== */

.section .container p{
color:#475569 !important; /* 🔥 grigio leggibile */
text-shadow:none !important;
}

/* FIX TESTO CTA ROI (DOPO override section-dark) */
.section.section-dark p{
color:#475569 !important;
text-shadow:none !important;
}

/* ===================== */
/* FIX CTA ROI DEFINITIVO */
/* ===================== */

.section.section-dark h2{
color:#0f172a !important;
text-shadow:none !important;
}

.section.section-dark p{
color:#475569 !important;
text-shadow:none !important;
}

.faq-item{
background:white;
padding:16px 18px; /* 🔥 ridotto */
border-radius:14px;
border:1px solid #e2e8f0;
margin-bottom:12px; /* 🔥 più compatto */
box-shadow:0 6px 20px rgba(0,0,0,0.04);

max-width:600px; /* 🔥 LIMITA larghezza */
margin-left:auto;
margin-right:auto;
}

.faq-item h3{
font-size:15px;
margin-bottom:4px;
line-height:1.3;
}

.faq-item p{
font-size:13px;
color:#475569;
line-height:1.4;

max-width:520px; /* 🔥 evita testo troppo largo */
}

.faq-item:hover{
transform:translateY(-2px);
box-shadow:0 12px 30px rgba(0,0,0,0.08);
transition:0.2s;
}

.roi-links{
display:flex;
flex-wrap:wrap;
gap:16px;
justify-content:center;
margin-top:20px;
}

.roi-links a{
color:#10b981;
font-weight:500;
text-decoration:none;
}

.roi-links a:hover{
text-decoration:underline;
}

/* ===================== */
/* HERO TEXT FIX */
/* ===================== */

.hero > .container > .page-title h1,
.hero > .container > .page-title h2,
.hero > .container > .page-title h3{
  color:#ffffff;
font-weight:700;
text-shadow:0 2px 10px rgba(0,0,0,0.4);
}

.hero p{
color:rgba(255,255,255,0.9);
text-shadow:0 1px 6px rgba(0,0,0,0.4);
}

/* BOTTONI HERO */
.hero .btn{
box-shadow:0 10px 30px rgba(0,0,0,0.25);
}

/* ===================== */
/* HERO OVERLAY (IMPORTANTISSIMO) */
/* ===================== */

.hero::before{
content:"";
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.15);
z-index:0;
}

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

/* ===================== */
/* PROPERTY CARD (IMMOBILI) */
/* ===================== */

.property-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
gap:30px;
margin-top:60px;
}

/* CARD */
.property-card{
background:white;
border-radius:18px;
overflow:hidden;

border:1px solid #e2e8f0;
box-shadow:0 20px 60px rgba(0,0,0,0.06);

transition:0.25s ease;
display:flex;
flex-direction:column;
}

/* HOVER */
.property-card:hover{
transform:translateY(-6px);
box-shadow:0 30px 80px rgba(0,0,0,0.10);
border-color:#10b981;
}

/* IMAGE */
.property-image{
width:100%;
height:220px;
object-fit:cover;
border-radius:12px;
display:block;
}

.property-card{
overflow:hidden;
}

.property-image{
transition:transform .4s ease;
}

.property-card:hover .property-image{
transform:scale(1.05);
}

/* CONTENT */
.property-content{
padding:20px;
display:flex;
flex-direction:column;
gap:10px;
}

/* TITLE */
.property-title{
font-size:18px;
font-weight:600;
}

/* DATA */
.property-data{
font-size:14px;
color:#64748b;
}

/* ROI */
.property-roi{
font-size:22px;
font-weight:700;
color:#10b981;
margin-top:5px;
}

/* BADGE */
.property-badge{
display:inline-block;
background:#fef3c7;
color:#b45309;
font-size:12px;
font-weight:600;
padding:4px 10px;
border-radius:999px;
margin-bottom:6px;
}

/* BUTTON */
.property-card .btn{
margin-top:10px;
}

/* ===================== */
/* FIX HERO SOLO IMMOBILI */
/* ===================== */

/* RIMUOVE OVERLAY */
body.immobili-page .hero::before{
background:transparent !important;
}

body.immobili-page .hero::after{
display:none !important;
}

/* BACKGROUND PULITO */
body.immobili-page .hero.hero-bg.rome{
background:
linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.10)),
url("/img/roma-bg.jpg") !important;
background-size:cover !important;
background-position:center !important;
}

/* HERO DINAMICO PER CITTÀ (IMMOBILI FIX) */

body.immobili-page .hero h1{
text-shadow:0 6px 30px rgba(0,0,0,0.4);
}

body.immobili-page .hero p{
opacity:0.95;
}

body.immobili-page .market-card{
background:rgba(255,255,255,0.95);
backdrop-filter:blur(12px);
box-shadow:0 25px 80px rgba(0,0,0,0.15);
}

body.immobili-page input{
background:#ffffff !important;
border:1px solid #e2e8f0 !important;
color:#0f172a !important;
}

body.immobili-page .section h2{
color:#0f172a;
}

body.immobili-page .section p{
color:#334155;
}

/* RIMUOVE OVERLAY */
body.immobili-page .hero::before{
background:transparent !important;
}

body.immobili-page .hero::after{
display:none !important;
}

/* ===================== */
/* HERO BACKGROUND IMMOBILI FIX DEFINITIVO */
/* ===================== */

/* 🔥 RESET VERO (non unset) */
body.immobili-page .hero.hero-bg{
background:none !important;
}

/* ===================== */
/* ROMA */
/* ===================== */

body.immobili-page .hero.hero-bg.rome{
background:
linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.10)),
url("/img/rome-bg.jpg") !important;

background-size:cover !important;
background-position:center !important;
background-repeat:no-repeat !important;
}

/* ===================== */
/* MILANO */
/* ===================== */

body.immobili-page .hero.hero-bg.milan{
background:
linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.10)),
url("/img/milan-bg.jpg") !important;

background-size:cover !important;
background-position:center !important;
background-repeat:no-repeat !important;
}

/* ===================== */
/* NAPOLI */
/* ===================== */

body.immobili-page .hero.hero-bg.naples{
background:
linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.10)),
url("/img/naples-bg.jpg") !important;

background-size:cover !important;
background-position:center !important;
background-repeat:no-repeat !important;
}

/* ===================== */
/* FIRENZE */
/* ===================== */

body.immobili-page .hero.hero-bg.florence{
background:
linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.10)),
url("/img/florence-bg.jpg") !important;

background-size:cover !important;
background-position:center !important;
background-repeat:no-repeat !important;
}

/* ===================== */
/* HERO BACKGROUND GLOBAL */
/* ===================== */

.hero.hero-bg.rome{
background:
linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.10)),
url("/img/rome-bg.jpg");

background-size:cover;
background-position:center;
background-repeat:no-repeat;
}

.hero.hero-bg.milan{
background:
linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.10)),
url("/img/milan-bg.jpg");

background-size:cover;
background-position:center;
background-repeat:no-repeat;
}

.hero.hero-bg.naples{
background:
linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.10)),
url("/img/naples-bg.jpg");

background-size:cover;
background-position:center;
background-repeat:no-repeat;
}

.hero.hero-bg.florence{
background:
linear-gradient(rgba(0,0,0,0.02), rgba(0,0,0,0.10)),
url("/img/florence-bg.jpg");

background-size:cover;
background-position:center;
background-repeat:no-repeat;
}

.hero.hero-bg{
transition: background 0.5s ease-in-out;
}

/* ===================== */
/* FIX TESTI CARD IMMOBILI DEFINITIVO */
/* ===================== */

body.immobili-page .property-card{
  color:#0f172a !important;
}

/* Titolo */
body.immobili-page .property-card h3{
  color:#0f172a !important;
}

/* Label (ROI medio B&B) */
body.immobili-page .property-card .market-label{
  color:#64748b !important;
  opacity:1 !important;
  text-shadow:none !important;
}

/* Numero ROI */
body.immobili-page .property-card .property-roi{
  color:#10b981 !important;
}

/* Descrizione */
body.immobili-page .property-card .market-extra{
  color:#475569 !important;
  text-shadow:none !important;
}

/* Link */
body.immobili-page .property-card .market-link{
  color:#10b981 !important;
}

/* ===================== */
/* FIX DEFINITIVO CARD DENTRO HERO */
/* ===================== */

.hero .property-card h3{
  color:#0f172a !important;
}

.hero .property-card p,
.hero .property-card span,
.hero .property-card div{
  color:#0f172a !important;
}

/* override specifici */
.hero .property-card .property-roi{
  color:#10b981 !important;
}

.hero .property-card .market-label{
  color:#64748b !important;
}

.hero .property-card .market-extra{
  color:#475569 !important;
}

.hero .property-card .market-link{
  color:#10b981 !important;
}

/* ===================== */
/* ACADEMY FIX */
/* ===================== */

.guide-card h3{
color:#0f172a;
}

.guide-card p{
color:#475569;
}

.loading::after{
content:"Analisi in corso...";
position:fixed;
top:0;
left:0;
right:0;
bottom:0;
background:rgba(255,255,255,0.7);
display:flex;
align-items:center;
justify-content:center;
font-size:18px;
z-index:9999;
}

/* ===================== */
/* PRO LOCK SYSTEM */
/* ===================== */

.pro-lock{
position:relative;
}

.pro-lock::after{
content:"🔒 PRO";
position:absolute;
top:10px;
right:10px;
background:#10b981;
color:#fff;
font-size:11px;
padding:4px 8px;
border-radius:6px;
font-weight:600;
}

.pro-blur{
filter:blur(2px);
pointer-events:none;
user-select:none;
opacity:0.6;
}

.seo-block{
padding:80px 0;
background:#ffffff;
}

.seo-block h2{
font-size:28px;
margin-bottom:20px;
text-align:center;
}

.seo-block p{
color:#64748b;
line-height:1.6;
margin-bottom:20px;
text-align:center;
}

.seo-block h3{
margin-top:30px;
margin-bottom:10px;
text-align:center;
}

.danger-block{
padding:80px 0;
background:#0f172a;
color:white;
text-align:center;
}

.danger-block h2{
font-size:30px;
margin-bottom:20px;
}

.danger-block p{
color:#cbd5f5;
margin-bottom:15px;
}

/* ===================== */
/* ROI HIGHLIGHT (WOW) */
/* ===================== */

.roi-highlight{
  text-align:center;
  padding:25px;
  border-radius:16px;
  background:linear-gradient(135deg,#ecfdf5,#f0fdf4);
  border:1px solid #bbf7d0;
}

.roi-big{
  font-size:42px;
  font-weight:800;
  display:block;
  margin-top:10px;
  color:#059669;
}

.roi-verdict{
  margin-top:10px;
  font-size:15px;
  font-weight:600;
}

/* dinamico */

.roi-good{ color:#059669; }
.roi-medium{ color:#d97706; }
.roi-bad{ color:#dc2626; }


/* ===================== */
/* PRO LOCK SYSTEM */
/* ===================== */

.pro-only{
  opacity:0.25;
  filter:blur(4px);
  pointer-events:none;
  user-select:none;
  position:relative;
}

.pro-only::after{
  content:"🔒 PRO";
  position:absolute;
  top:8px;
  right:10px;
  font-size:11px;
  background:#10b981;
  color:#fff;
  padding:4px 8px;
  border-radius:8px;
  font-weight:600;
}


/* ===================== */
/* RESULTS OVERLAY */
/* ===================== */

.results-card{
  position:relative;
  transition: all 0.3s ease;
}

.results-card:hover{
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.results-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.75);
  backdrop-filter:blur(6px);
  border-radius:16px;
  z-index:5;
}

.overlay-content{
  text-align:center;
}

.overlay-title{
  font-size:18px;
  font-weight:700;
  margin-bottom:8px;
}

.overlay-text{
  font-size:14px;
  color:#64748b;
  margin-bottom:12px;
}

.unlock-btn{
  background:#10b981;
  color:#fff;
  border:none;
  padding:10px 18px;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
}


/* ===================== */
/* UPGRADE BOX */
/* ===================== */

.upgrade-home-box{
  margin-top:20px;
  padding:20px;
  border-radius:12px;
  background:linear-gradient(135deg,#10b981,#059669);
  color:white;
  text-align:center;
  box-shadow:0 10px 25px rgba(0,0,0,0.15);
}


/* ===================== */
/* GLOBAL PAYWALL BLUR */
/* ===================== */

.pro-blur{
  position:relative;
  filter:blur(2px);
  opacity:0.6;
  pointer-events:none;
}

.pro-blur::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(255,255,255,0.6);
  backdrop-filter:blur(6px);
  border-radius:16px;
  z-index:2;
}


/* ===================== */
/* HOME OVERLAY */
/* ===================== */

.home-blur-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  z-index:3;
}

.home-overlay-content{
  background:rgba(255,255,255,0.9);
  padding:20px;
  border-radius:16px;
  backdrop-filter:blur(6px);
  max-width:280px;
}


/* ===================== */
/* LOCKED SECTIONS */
/* ===================== */

.locked-section{
  position:relative;
  margin-top:20px;
}

.blur-content{
  filter:blur(6px);
  pointer-events:none;
  user-select:none;
}

.locked-overlay{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  background:rgba(255,255,255,0.88);
  backdrop-filter:blur(6px);
  border-radius:16px;
  z-index:20;
  text-align:center;
  padding:20px;
}


/* ===================== */
/* 🚀 HARD UNLOCK PRO */
/* ===================== */

/* override totale */
body.pro-user .pro-only{
  all:unset !important;
  display:block !important;
  opacity:1 !important;
  filter:none !important;
  pointer-events:auto !important;
  user-select:auto !important;
}

/* figli */
body.pro-user .pro-only *{
  opacity:1 !important;
  filter:none !important;
  pointer-events:auto !important;
}

/* sicurezza grid */
body.pro-user .results-grid .pro-only{
  opacity:1 !important;
  filter:none !important;
  pointer-events:auto !important;
}

/* rimuove badge */
body.pro-user .pro-only::after{
  display:none !important;
}

/* rimuove blur globale */
body.pro-user .pro-blur{
  filter:none !important;
  opacity:1 !important;
  pointer-events:auto !important;
}

/* rimuove blur contenuti */
body.pro-user .blur-content{
  filter:none !important;
  pointer-events:auto !important;
}

/* rimuove overlay */
body.pro-user .locked-overlay{
  display:none !important;
}

body.pro-user .results-overlay{
  display:none !important;
}

body.pro-user [data-paywall]{
  display:none !important;
}

/* ================= MOBILE FIX GLOBAL ================= */

html, body{
  overflow-x:hidden;
}

/* sicurezza universale */
*{
  max-width:100%;
}

/* ================= GRID ================= */

.property-grid{
  grid-template-columns:1fr; /* mobile 1 colonna */
  gap:20px;
}

/* ================= CARD ================= */

.property-card{
  padding:20px; /* 🔥 da 40 → 20 */
}

/* ================= SECTION ================= */

.section-info{
  margin-top:60px;
  padding:0 15px;
}

/* ================= FORM ================= */

.form-grid{
  grid-template-columns:1fr;
}

/* ================= INPUT ================= */

input{
  width:100%;
}

/* ================= HERO ================= */

.container{
  padding-left:15px !important;
  padding-right:15px !important;
}

/* ================= MOBILE UX CLEAN (FINAL) ================= */

@media (max-width:768px){

/* ===== RESET ===== */

html, body{
  overflow-x:hidden;
}

.container{
  padding:0 16px !important;
}

/* ===== HERO ===== */

.hero{
  min-height:60vh !important;
  display:flex;
  align-items:flex-end;
}

.hero .container{
  padding-top:40px !important;
  padding-bottom:20px;
}

/* ===== TITOLI ===== */

.page-title h1{
  font-size:22px !important;
  line-height:1.2;
  text-align:center;
}

.page-title p{
  font-size:14px;
  text-align:center;
  margin-top:10px;
}

/* ===== GRID (🔥 FIX PRINCIPALE) ===== */

.property-grid{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:16px;
}

/* ===== CARD ===== */

.property-card{
  width:100%;
  padding:20px;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,0.08);
}

/* disattiva hover mobile */
.property-card:hover{
  transform:none;
}

/* ===== ROI ===== */

.property-roi{
  font-size:22px;
}

/* ===== SEZIONI ===== */

section{
  margin-top:50px !important;
}

.section-info{
  margin-top:30px !important;
  padding:0;
}

.section-info p{
  font-size:14px;
  line-height:1.5;
}

/* ===== FORM ===== */

.form-grid{
  display:flex;
  flex-direction:column;
  gap:12px;
}

input{
  width:100%;
  font-size:16px;
}

/* ===== BUTTON ===== */

.btn{
  width:100%;
  padding:14px;
  font-size:16px;
}

/* ===== SEARCH RESULTS ===== */

#property-search-results .property-grid{
  display:grid !important;
  grid-template-columns:1fr !important;
}

/* ===== PREVIEW ===== */

#property-preview{
  font-size:13px;
}

/* ===== CTA STICKY ===== */

.mobile-sticky-cta{
  position:fixed;
  bottom:0;
  left:0;
  width:100%;
  padding:12px 16px;
  background:white;
  border-top:1px solid #e5e7eb;
  box-shadow:0 -10px 30px rgba(0,0,0,0.05);
  z-index:999;
}

.mobile-sticky-cta button{
  width:100%;
  padding:14px;
  font-size:16px;
  border-radius:10px;
}

/* spazio sotto */
body{
  padding-bottom:80px;
}

}

/* ================= HERO MUTUI PREMIUM 2.0 ================= */

.hero-mutui-premium{
  position:relative;
  padding:110px 20px 90px;
  overflow:hidden;

  background:
    radial-gradient(circle at 20% 30%, rgba(16,185,129,0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(59,130,246,0.15), transparent 40%),
    url("/img/roma-dashboard.jpg");

  background-size:cover;
  background-position:center;
}

/* OVERLAY PIÙ LEGGERO */

.hero-overlay{
  position:absolute;
  inset:0;

  background:
    linear-gradient(
      180deg,
      rgba(15,23,42,0.35) 0%,
      rgba(15,23,42,0.55) 40%,
      rgba(15,23,42,0.78) 100%
    ),

    linear-gradient(
      90deg,
      rgba(16,185,129,0.12),
      transparent 40%
    );
}

.hero{
  position:relative;
  overflow:hidden;
}

.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(16,185,129,0.15),
      transparent 40%
    );
  pointer-events:none;
}

/* EFFETTO GLOW DINAMICO */

.hero-mutui-premium::after{
  content:"";
  position:absolute;
  width:400px;
  height:400px;
  background:radial-gradient(circle, rgba(16,185,129,0.25), transparent 60%);
  top:-100px;
  left:-100px;
  filter:blur(60px);
  animation:floatGlow 8s ease-in-out infinite alternate;
}

@keyframes floatGlow{
  0%{transform:translate(0,0);}
  100%{transform:translate(60px,40px);}
}

/* CONTENUTO */

.hero-content{
  position:relative;
  text-align:center;
  color:white;
  max-width:720px;
  margin:auto;
}

/* BADGE */

.hero-badge{
  display:inline-block;
  padding:6px 14px;
  background:rgba(255,255,255,0.2);
  border:1px solid rgba(255,255,255,0.3);
  backdrop-filter:blur(10px);
  border-radius:20px;
  font-size:12px;
  margin-bottom:18px;
  font-weight:500;
}

/* TITOLO */

.hero-mutui-premium h1{
  font-size:40px;
  font-weight:700;
  margin-bottom:14px;
  letter-spacing:-0.3px;
}

/* TESTO */

.hero-mutui-premium p{
  font-size:16px;
  color:#e2e8f0;
}

/* 🔥 TRUST SUPER (PIÙ PREMIUM + ANIMAZIONE) */

.hero-trust{
  margin-top:24px;
  font-size:13px;

  background:linear-gradient(135deg,#10b981,#059669);
  color:white;

  padding:10px 20px;
  border-radius:999px;

  display:inline-block;
  font-weight:600;

  box-shadow:
    0 10px 30px rgba(16,185,129,0.5),
    inset 0 1px 0 rgba(255,255,255,0.25);

  animation:pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow{
  0%{transform:scale(1);}
  50%{transform:scale(1.05);}
  100%{transform:scale(1);}
}

/* ================= SPACING ================= */

.main-spacing{
  margin-top:-70px;
  padding-bottom:120px;
  position:relative;
  z-index:2;
}

/* ================= MOBILE ================= */

@media(max-width:768px){

.hero-mutui-premium{
  padding:80px 16px 60px;
}

.hero-mutui-premium h1{
  font-size:26px;
}

.hero-mutui-premium p{
  font-size:14px;
}

.main-spacing{
  margin-top:-40px;
}

}

.roi-badge{
  display:inline-block;
  padding:6px 12px;
  border-radius:20px;
  font-size:12px;
  font-weight:600;
}

.badge-top{ background:#dcfce7; color:#059669; }
.badge-good{ background:#fef3c7; color:#d97706; }
.badge-risk{ background:#fee2e2; color:#dc2626; }

#live-users{
  transition: transform 0.2s ease;
}
.bump{
  transform: scale(1.15);
}

/* ================= SIMULATOR LAYOUT FIX ================= */

.simulator-container{
  max-width:1200px;
  margin:auto;
  padding:0 20px;
}

/* 🔥 CENTRATO DEFINITIVO */
.simulator-grid{
  display:grid;
  grid-template-columns: 1fr;
  justify-items:center; /* CENTRA TUTTO */
}

/* 🔥 BLOCCO SINISTRA (FORM) */
.simulator-left{
  width:100%;
  max-width:600px;
  margin:0 auto;
}

/* 🔥 BLOCCO RISULTATI */
.simulator-right{
  width:100%;
  max-width:1200px;
  margin:40px auto 0 auto;
}

.tool-card{
  width:100%;
  max-width:520px;
  margin:0 auto;
}

.kpi-card{
  padding:18px;
  border-radius:14px;
  background:white;
  box-shadow:0 10px 30px rgba(0,0,0,0.06);
  transition:all 0.3s ease;
}

.kpi-card:hover{
  transform:translateY(-4px);
  box-shadow:0 20px 40px rgba(0,0,0,0.1);
}

.kpi-card span{
  font-size:12px;
  color:#64748b;
}

.kpi-card strong{
  display:block;
  margin-top:6px;
  font-size:18px;
}

/* ================= OVERLAY KILLER ================= */

.upgrade-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.75);
  backdrop-filter:blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.upgrade-overlay.hidden{
  display:none;
}

.upgrade-box{
  background:white;
  padding:30px;
  border-radius:18px;
  max-width:420px;
  width:90%;
  text-align:center;
  box-shadow:0 20px 60px rgba(0,0,0,0.25);
  animation:fadeIn 0.4s ease;
}

.upgrade-title{
  font-size:20px;
  font-weight:700;
}

.upgrade-sub{
  margin-top:10px;
  font-size:14px;
  opacity:0.8;
}

.upgrade-features{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:14px;
}

.upgrade-btn{
  margin-top:20px;
  width:100%;
  padding:12px;
  border-radius:12px;
  border:none;
  background:linear-gradient(135deg,#10b981,#059669);
  color:white;
  font-weight:600;
  font-size:15px;
  cursor:pointer;
  transition:all 0.2s;
}

.upgrade-btn:hover{
  transform:scale(1.03);
}

.upgrade-trust{
  margin-top:12px;
  font-size:12px;
  opacity:0.6;
}

/* animazione */
@keyframes fadeIn{
  from{opacity:0; transform:translateY(10px);}
  to{opacity:1; transform:translateY(0);}
}

.auth-tab{
background:#f1f5f9;
border:1px solid #e2e8f0;
color:#475569;
}

.auth-tab.active{
background:#10b981;
color:white;
border:none;
}

canvas{
  display:block;
  width:100% !important;
  height:auto !important;
}

/* ===================================== */
/* 🔥 MOBILE FIX DEFINITIVO SIMULATORE */
/* ===================================== */

@media (max-width:768px){

  /* 🔴 BASE RESET MOBILE */
  html, body{
    max-width:100%;
    overflow-x:hidden;
  }

  body{
    padding-top:75px !important; /* spazio header */
  }

  /* 🔴 CONTAINER PRINCIPALI */
  .results-card,
  .roi-dashboard,
  .investment-metrics,
  .simulator-container,
  .simulator-right{
    width:100% !important;
    max-width:100% !important;
    margin:16px auto !important;
    padding:14px !important;
    box-sizing:border-box;
    overflow:hidden;
  }

  /* 🔴 TUTTI GLI ELEMENTI INTERNI NON ESCONO */
  .roi-dashboard *,
  .results-card *{
    max-width:100% !important;
    box-sizing:border-box;
  }

  /* 🔥 FIX CRITICO CHART.JS (IPHONE BUG) */
  .roi-chart{
    width:100%;
    max-width:100%;
    overflow:hidden;
    position:relative;
  }

  canvas{
    display:block;
    width:100% !important;
    height:auto !important;
  }

  /* 🔴 KPI GRID */
  .kpi-grid,
  .metrics-grid,
  .roi-metrics{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px;
  }

  /* 🔴 KPI MOBILE STACK */
  @media (max-width:480px){
    .kpi-grid,
    .metrics-grid,
    .roi-metrics{
      grid-template-columns:1fr !important;
    }
  }

  /* 🔴 CARD */
  .kpi,
  .metric,
  .box{
    width:100% !important;
  }

  /* 🔴 TESTI SICURI */
  .metric strong,
  p, span, div{
    word-break:break-word !important;
    white-space:normal !important;
    font-size:14px !important;
  }

  /* 🔴 TITOLI */
  h1{ font-size:22px !important; }
  h2{ font-size:18px !important; }
  h3{ font-size:16px !important; }

  /* 🔴 BOTTONI */
  button,
  .btn,
  .cta{
    width:100%;
    font-size:15px;
  }

  /* 🔴 HEADER FIX */
  .portal-header{
    position:fixed;
    top:0;
    width:100%;
    z-index:1000;
  }

}

/* 🔒 BLUR GRAFICO FREE */

.chart-locked{
  position:relative;
}

.chart-locked canvas{
  filter:blur(6px);
  opacity:0.6;
}

.chart-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  background:rgba(255,255,255,0.6);
  backdrop-filter:blur(4px);
  text-align:center;
  z-index:10;
}

.chart-overlay button{
  margin-top:10px;
}

.roi-chart{
  position: relative;
  width: 100%;
  height: 300px; /* 👉 perfetto per mobile */
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* 📱 iPhone fix */
@media (max-width: 768px){
  .roi-chart{
    height: 260px;
  }
}

/* 🔥 FORCE UNLOCK KPI */
body.pro-user #profit-annual,
body.pro-user #revenue-annual,
body.pro-user #profit-monthly{

  filter:none !important;
  opacity:1 !important;
  pointer-events:auto !important;
  position:relative !important;
  z-index:10 !important;

}

/* 🔥 RIMUOVE OVERLAY FANTASMA */
body.pro-user #profit-annual::after,
body.pro-user #revenue-annual::after,
body.pro-user #profit-monthly::after{
  display:none !important;
}

/* ============================= */
/* FIX DESKTOP KPI / RESULT CARD */
/* ============================= */

@media (min-width:1025px){

  /* 🔥 CARD RISULTATI (LAYOUT PREMIUM) */
  .results-card{
    width:100%;
    max-width:1200px;
    margin:40px auto;
    padding:30px 40px;
    border-radius:24px;
  }

  /* 🔥 KPI GRID STANDARD */
  .kpi-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px;
    align-items:stretch;
  }

  /* 🔥 KPI BOX FULL WIDTH */
  .kpi-grid .kpi-box{
    width:100%;
    max-width:none;
  }

  /* 🔥 INVESTMENT METRICS */
  .investment-metrics{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px;
    max-width:640px;
    margin:25px auto;
  }

  /* ===================================== */
  /* 🔥 GRID CORE (TUTTE LE SEZIONI KPI) */
  /* ===================================== */

  #revenue-forecast,
  #occupancy-sensitivity{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px;
    width:100%;
    max-width:1000px;
    margin:0 auto;
  }

  /* ===================================== */
  /* 💣 FIX DEFINITIVO PERFORMANCE (IL TUO BUG) */
  /* ===================================== */

  #market-comparison{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px;
    width:100%;
    max-width:1000px;
    margin:0 auto;
  }

  /* 🔥 FORZA OGNI ELEMENTO INTERNO */
  #market-comparison > *{
    width:100%;
    display:flex;
    justify-content:center;
  }

  /* 🔥 FORZA IL CONTENUTO (ANCHE SE GENERATO DA JS) */
  #market-comparison .kpi-box,
  #market-comparison .metric,
  #market-comparison div{
    width:100% !important;
    max-width:none !important;
    text-align:center;
  }

  /* 🔥 BENCHMARK */
  #market-benchmark{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px;
    justify-items:center;
    text-align:center;
    max-width:1000px;
    margin:0 auto;
  }

  /* 🔥 PERFORMANCE WRAPPER */
  #market-performance,
  .performance-card{
    width:100%;
    max-width:1000px;
    margin:0 auto;
    text-align:center;
  }

}

/* ============================= */
/* KPI CARD (DESIGN SYSTEM) */
/* ============================= */

.kpi-box{
  background:white;
  padding:20px;
  border-radius:18px;
  box-shadow:0 12px 35px rgba(0,0,0,0.06);

  width:100%;
  max-width:none;

  text-align:center;
  transition:all 0.25s ease;
}

.kpi-box:hover{
  transform:translateY(-5px);
  box-shadow:0 30px 70px rgba(0,0,0,0.10);
}

.kpi-label{
  font-size:12px;
  color:#64748b;
  margin-bottom:6px;
  letter-spacing:0.3px;
}

.kpi-value{
  font-size:22px;
  font-weight:700;
  color:#0f172a;
}

/* ============================= */
/* CONTAINER GRID FIX */
/* ============================= */

#market-comparison,
#revenue-forecast,
#occupancy-sensitivity{
  width:100%;
}

/* ============================= */
/* MOBILE FIX (PERFETTO) */
/* ============================= */

@media (max-width:768px){

  #revenue-forecast,
  #market-comparison,
  #occupancy-sensitivity,
  .kpi-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
  }

  .kpi-box{
    max-width:100%;
    padding:16px;
  }

}

.market-card.highlight{
border:2px solid #10b981;
transform:scale(1.05);
}

/* ===================== */
/* FOOTER 2.0 */
/* ===================== */

.footer-container{
max-width:1200px;
margin:auto;
padding:40px 20px;
}

.footer-cta{
text-align:center;
margin-bottom:40px;
}

.footer-cta h3{
font-size:22px;
margin-bottom:10px;
}

.footer-cta p{
font-size:14px;
color:#94a3b8;
margin-bottom:20px;
}

.footer-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
gap:30px;
margin-bottom:30px;
text-align:left;
}

.footer-col strong{
display:block;
margin-bottom:10px;
color:white;
}

.footer-col a{
display:block;
margin-bottom:6px;
font-size:14px;
color:#94a3b8;
}

.footer-col a:hover{
color:white;
}

.footer-trust{
display:flex;
justify-content:center;
gap:20px;
flex-wrap:wrap;
font-size:13px;
margin-bottom:20px;
opacity:0.8;
}

.footer-bottom{
text-align:center;
font-size:12px;
opacity:0.6;
}

/* ===================== */
/* MOBILE SaaS OPTIMIZATION */
/* ===================== */

@media (max-width: 768px){

/* HERO */
.hero-market{
padding:80px 20px 60px;
text-align:center;
}

.hero-market h1{
font-size:28px;
line-height:1.3;
margin-bottom:15px;
}

.hero-market p{
font-size:15px;
line-height:1.5;
padding:0 10px;
}

.hero-market .btn{
width:100%;
max-width:300px;
margin:auto;
display:block;
}


/* SECTION SPACING */
.section{
padding:60px 20px;
}

.container{
padding:0 10px !important;
}


/* TITOLI */
h1{
font-size:26px !important;
line-height:1.3;
}

h2{
font-size:22px !important;
line-height:1.3;
}

h3{
font-size:18px !important;
}


/* CARD STYLE (IMPORTANTISSIMO) */
.card{
padding:20px;
border-radius:16px;
box-shadow:0 10px 30px rgba(0,0,0,0.05);
}


/* LISTE */
ul{
padding-left:20px;
}

li{
margin-bottom:8px;
}


/* CTA BOX */
.section-soft{
padding:60px 20px;
}

.section-soft .container{
padding:25px;
border-radius:16px;
box-shadow:0 10px 30px rgba(0,0,0,0.08);
}


/* BUTTON FULL WIDTH */
.btn{
width:100%;
max-width:280px;
margin:auto;
display:block;
text-align:center;
}


/* FAQ */
.faq-item{
padding:15px;
border-radius:12px;
background:#f8fafc;
}


/* FOOTER spacing */
.global-footer{
padding:40px 20px;
text-align:center;
}

.footer-links{
display:flex;
flex-direction:column;
gap:10px;
}


/* FIX HEADER MOBILE */
.portal-nav{
position:fixed;
top:70px;
left:0;
width:100%;
background:white;
flex-direction:column;
padding:20px;
display:none;
z-index:999;
}

.portal-nav.open{
display:flex;
}

.portal-nav a{
padding:10px 0;
font-size:16px;
}

}

/* ============================= */
/* 🔥 HERO OVERLAY SaaS FIX FINAL */
/* ============================= */

/* forza contesto */
.hero{
  position:relative;
  overflow:hidden;
}

/* overlay reale (SOVRASCRIVE TUTTO) */
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;

  background:
    linear-gradient(
      180deg,
      rgba(15,23,42,0.20) 0%,
      rgba(15,23,42,0.35) 40%,
      rgba(15,23,42,0.55) 100%
    ),
    linear-gradient(
      90deg,
      rgba(16,185,129,0.08),
      transparent 60%
    );

  pointer-events:none;
}

/* glow SaaS (premium effect) */
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;

  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(16,185,129,0.15),
      transparent 45%
    );

  pointer-events:none;
}

/* contenuto sopra overlay */
.hero .container,
.hero-grid,
.hero-left,
.hero-right{
  position:relative;
  z-index:2;
}

/* ===================== */
/* IMMOBILI FORM – FINAL PRO CLEAN */
/* ===================== */

/* 🎯 LABEL VISIBILI SU HERO */
body.immobili-page .form-grid .input-group label{
  font-size:13px !important;
  font-weight:600 !important;

  color:#ffffff !important;

  text-shadow:
  0 2px 10px rgba(0,0,0,0.7),
  0 1px 2px rgba(0,0,0,0.5) !important;

  letter-spacing:0.3px;
}

/* 🎯 INPUT GLASS PREMIUM */
body.immobili-page .form-grid .input-group input{

  padding:14px !important;
  border-radius:12px !important;

  background:rgba(255,255,255,0.92) !important;
  backdrop-filter:blur(8px) !important;

  border:1px solid rgba(255,255,255,0.4) !important;

  color:#0f172a !important;
  font-size:14px !important;
  font-weight:500;

  transition:all .25s ease;

  box-shadow:
  0 10px 30px rgba(0,0,0,0.08),
  0 2px 6px rgba(0,0,0,0.05) !important;
}

/* 🎯 PLACEHOLDER */
body.immobili-page .form-grid .input-group input::placeholder{
  color:#94a3b8;
  opacity:1;
}

/* 🎯 HOVER */
body.immobili-page .form-grid .input-group input:hover{

  border-color:rgba(16,185,129,0.4);

  box-shadow:
  0 12px 35px rgba(0,0,0,0.1),
  0 4px 10px rgba(0,0,0,0.06);

  transform:translateY(-1px);
}

/* 🎯 FOCUS (SAAS PREMIUM) */
body.immobili-page .form-grid .input-group input:focus{

  outline:none;

  border-color:#10b981 !important;

  box-shadow:
  0 0 0 3px rgba(16,185,129,0.25),
  0 10px 30px rgba(16,185,129,0.18) !important;

  background:#ffffff !important;

  transform:translateY(-2px);
}

/* 🎯 INPUT ATTIVO (MICRO UX PRO) */
body.immobili-page .form-grid .input-group input:not(:placeholder-shown){
  border-color:#10b981;
}

/* 🎯 MOBILE FIX */
@media(max-width:768px){

  body.immobili-page .form-grid{
    grid-template-columns:1fr;
  }

  body.immobili-page .form-grid .input-group input{
    padding:16px !important;
    font-size:16px !important; /* evita zoom iOS */
  }

}

/* ===================== */
/* HERO PREMIUM OVERLAY */
/* ===================== */

.hero::before{
content:"";
position:absolute;
inset:0;
background:linear-gradient(
180deg,
rgba(15,23,42,0.65),
rgba(15,23,42,0.55),
rgba(15,23,42,0.75)
);
z-index:0;
}

.hero > *{
position:relative;
z-index:1;
}

.hero-academy{
position:relative;
padding:100px 20px;
border-radius:20px;

background:
linear-gradient(rgba(15,23,42,0.55), rgba(15,23,42,0.75)),
url("/img/naples-bg.jpg");

background-size:cover;
background-position:center;

box-shadow:0 40px 100px rgba(0,0,0,0.2);
}

/* ===================================================== */
/* RENDIMENTOBB – UNIVERSAL HERO OVERLAY ENGINE (FINAL) */
/* ===================================================== */

/* BASE HERO */
.hero{
  position:relative;
  overflow:hidden;
}

/* 🔥 RESET TOTALE (ELIMINA CASINI PRECEDENTI) */
.hero::before{
  display:none !important;
  content:none !important;
}

/* OVERLAY UNIVERSALE */
.hero-overlay{
  position:absolute;
  inset:0;
  z-index:1;

  background:linear-gradient(
    180deg,
    rgba(15,23,42,0.45) 0%,
    rgba(15,23,42,0.60) 50%,
    rgba(15,23,42,0.75) 100%
  );
}

/* CONTENUTO SEMPRE SOPRA */
.hero > .container,
.hero-content{
  position:relative;
  z-index:2;
}

/* ===================================================== */
/* 🔥 AUTO MODE (NESSUN HARDCODE PAGINE) */
/* ===================================================== */

/* HERO CON CTA → più contrasto (conversion) */
.hero:has(.btn-main){
  --overlay-top: rgba(15,23,42,0.50);
  --overlay-mid: rgba(15,23,42,0.65);
  --overlay-bottom: rgba(15,23,42,0.80);
}

/* HERO informativi (cards, guide) → più light */
.hero:has(.cards),
.hero:has(.page-title){
  --overlay-top: rgba(15,23,42,0.40);
  --overlay-mid: rgba(15,23,42,0.55);
  --overlay-bottom: rgba(15,23,42,0.70);
}

/* HERO immagini immobili → più luminoso */
.hero:has(.property),
.hero:has(.listing){
  --overlay-top: rgba(15,23,42,0.25);
  --overlay-mid: rgba(15,23,42,0.40);
  --overlay-bottom: rgba(15,23,42,0.55);
}

/* ===================================================== */
/* APPLY VARIABILI */
/* ===================================================== */

.hero-overlay{
  background:linear-gradient(
    180deg,
    var(--overlay-top, rgba(15,23,42,0.45)) 0%,
    var(--overlay-mid, rgba(15,23,42,0.60)) 50%,
    var(--overlay-bottom, rgba(15,23,42,0.75)) 100%
  );
}

/* ===================================================== */
/* RENDIMENTOBB – UNIVERSAL HERO OVERLAY ENGINE */
/* ===================================================== */

/* BASE HERO */
.hero{
  position:relative;
  overflow:hidden;
}

/* 🔥 OVERLAY UNIVERSALE */
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;

  background:linear-gradient(
    180deg,
    rgba(15,23,42,0.45) 0%,
    rgba(15,23,42,0.60) 50%,
    rgba(15,23,42,0.75) 100%
  );

  pointer-events:none;
}

/* CONTENUTO SOPRA */
.hero > *{
  position:relative;
  z-index:2;
}

body.immobili-page .hero::before{
  background:linear-gradient(
    180deg,
    rgba(15,23,42,0.25),
    rgba(15,23,42,0.40),
    rgba(15,23,42,0.55)
  );
}

/* ===================== */
/* 🔥 FIX LEGGIBILITÀ GLOBALE (CRITICO) */
/* ===================== */

/* LABEL → default scure */
.input-group label{
  color:#334155 !important;
  text-shadow:none !important;
}

/* SOLO dentro hero restano bianche */
.hero .input-group label{
  color:#ffffff !important;
  text-shadow:0 2px 10px rgba(0,0,0,0.6) !important;
}

/* ===================== */
/* 🔥 TESTI CARD / TOOL */
/* ===================== */

.tool-card,
.tool-card p,
.tool-card span,
.tool-card div{
  color:#0f172a !important;
}

/* testi secondari */
.tool-card small,
.tool-card .hint,
.tool-card .info{
  color:#64748b !important;
}

/* ===================== */
/* 🔥 MUTUI FIX */
/* ===================== */

.mortgage-card,
.mortgage-card p,
.mortgage-card span{
  color:#0f172a !important;
}

.mortgage-card span{
  color:#64748b !important;
}

/* ===================== */
/* 🔥 INPUT TEXT FIX */
/* ===================== */

input{
  color:#0f172a !important;
}

/* ===================== */
/* 🔥 RANGE SLIDER TEXT (72%) */
/* ===================== */

.range-value{
  color:#0f172a !important;
  font-weight:600;
}

/* ===================== */
/* 🔥 TESTI INFO GLOBALI */
/* ===================== */

.info,
.hint,
small{
  color:#64748b !important;
  opacity:1 !important;
}

/* ===================== */
/* 🔥 SELECT FIX (MILANO ecc) */
/* ===================== */

select{
  color:#0f172a !important;
  background:#ffffff !important;
}

/* ===================== */
/* 🔥 FIX POPUP MOBILE ROI */
/* ===================== */

@media (max-width: 768px){

  /* container popup */
  .results-overlay,
  .locked-overlay{
    position:fixed !important;
    inset:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:20px !important;
    z-index:9999 !important;
  }

  /* box interno */
  .results-card,
  .locked-section,
  .roi-popup{
    width:100% !important;
    max-width:360px !important;
    margin:auto !important;
    border-radius:16px !important;
    padding:20px !important;
    box-sizing:border-box !important;
  }

  /* testo centrato */
  .results-card h3,
  .results-card p{
    text-align:center !important;
  }

  /* bottone */
  .results-card .btn,
  .locked-section .btn{
    width:100% !important;
    margin-top:12px !important;
  }

}

.home-blur-overlay{
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
z-index:5;
}

.metric-card.roi-highlight{
position:relative;
z-index:10; /* 🔥 ROI SEMPRE SOPRA */
}

@media (max-width:768px){

.roi-grid{
grid-template-columns:1fr;
}

.investment-metrics{
display:grid;
grid-template-columns:1fr;
gap:12px;
}

.metric-card{
width:100%;
box-sizing:border-box;
}

.roi-big{
font-size:28px;
}

}

.quick-roi-box{
overflow:visible;
}

.investment-panel{
overflow:visible;
}

/* ===================================== */
/* 🚀 FIX OVERLAY MOBILE BUG DEFINITIVO */
/* ===================================== */

.results-overlay:empty,
.locked-overlay:empty,
.home-blur-overlay:empty{
  display:none !important;
}

/* sicurezza extra */
.results-overlay.hidden,
.locked-overlay.hidden,
.home-blur-overlay.hidden{
  display:none !important;
}

/* 🔥 BLOCCA overlay fantasma */
.results-overlay,
.locked-overlay,
.home-blur-overlay{
  pointer-events:none;
}

/* riattiva solo se visibile davvero */
.results-overlay.active,
.locked-overlay.active{
  pointer-events:auto;
}

@media (max-width:768px){

.right-controls{
display:flex;
align-items:center;
gap:6px;
flex-wrap:nowrap;
overflow:hidden;
}

#user-area{
max-width:90px;
overflow:hidden;
}

.account-email{
max-width:90px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

.hamburger{
flex-shrink:0;
}

}

/* =========================================
🚀 HEADER SYSTEM FINAL – CLEAN & STABLE
========================================= */

/* ===== HEADER BASE ===== */
.portal-header{
position:fixed;
top:0;
left:0;
width:100%;
z-index:9999;

background:rgba(255,255,255,0.9);
backdrop-filter:blur(10px);

border-bottom:1px solid #e2e8f0;
}

/* OFFSET BODY */
body{
padding-top:70px;
}

/* ===== INNER ===== */
.portal-header-inner{
display:flex;
align-items:center;
justify-content:space-between;
gap:10px;
height:60px;
padding:0 16px;
}

/* ===== LOGO ===== */
/* DESKTOP */
.logo-img{
  height:42px;
}

/* MOBILE */
@media(max-width:768px){
  .logo-img{
    height:26px;
  }
}

/* ===== NAV DESKTOP ===== */
.portal-nav{
display:flex;
gap:20px;
align-items:center;
}

.portal-nav a{
text-decoration:none;
font-weight:500;
color:#0f172a;
}

/* ===== RIGHT ===== */
.header-right{
display:flex;
align-items:center;
gap:10px;
}

/* ===== USER ===== */
.user-desktop{
display:flex;
align-items:center;
gap:10px;
}

.user-email{
font-size:12px;
color:#64748b;
}

/* ===== LANG ===== */
.lang-switch{
display:flex;
gap:6px;
background:#f1f5f9;
padding:4px;
border-radius:999px;
}

.lang-btn{
padding:5px 10px;
font-size:12px;
border-radius:999px;
border:none;
background:transparent;
color:#64748b;
cursor:pointer;
}

.lang-btn.active{
background:#10b981;
color:#fff;
}

/* ===== HAMBURGER ===== */
.hamburger{
display:none;
font-size:22px;
background:none;
border:none;
cursor:pointer;
}

/* =========================================
📱 MOBILE CLEAN
========================================= */

@media(max-width:768px){

.portal-header-inner{
gap:8px;
justify-content:space-between;
}

.portal-header-inner > *{
flex-shrink:0;
}  

/* NAV OFF */
.portal-nav{
display:none;
position:fixed;
top:60px;
left:0;
width:100%;

background:white;
padding:20px;

flex-direction:column;
gap:15px;

box-shadow:0 10px 30px rgba(0,0,0,0.08);
}

.portal-nav.open{
display:flex;
}

/* LOGO */
.logo-img{
height:26px;
}

/* RIGHT */
.header-right{
gap:6px;
}

/* USER → SOLO ICONA */
#user-area{
display:flex;
align-items:center;
justify-content:center;
min-width:40px;
}

/* LOGIN MOBILE */
.login-mobile-btn{
font-size:12px;
padding:6px 10px;
border-radius:999px;
background:#10b981;
color:#fff;
text-decoration:none;
}

/* LANG */
.lang-switch{
gap:4px;
}

.lang-btn{
font-size:11px;
padding:4px 8px;
}

/* HAMBURGER ON */
.hamburger{
display:block;
}

}
