:root {
    --avis-red: #C8102E;      
    --avis-blue: #003399; /* Blu istituzionale AVIS */
    --avis-soft-red: #fdf2f2;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --white: #ffffff;
    --bg-body: #f4f7f6;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 12px;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* --- NAVBAR OVERRIDE (evita conflitti con responsive-core.css) --- */
.navbar * { box-sizing: border-box; }
.nav-links { margin: 0 !important; padding: 0 !important; }
body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-body); 
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
    position: relative; 
    min-height: 100vh;
}
.container { width: 90%; max-width: 1200px; margin: auto; }

/* --- HERO SECTION (GRADIENTE VERTICALE ROSSO/BLU) --- */
.hero {
    background: linear-gradient(180deg, 
                rgba(200, 16, 46, 0.92) 0%, 
                rgba(0, 51, 153, 0.92) 90%), 
                url('../assets/img/clinica.jpg') no-repeat;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}
.hero-tag { text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; font-weight: 600; opacity: 0.9; }
.hero h1 { font-size: 3.5rem; margin: 15px 0; font-weight: 800; line-height: 1.2; }
.text-highlight { color: #ffcad1; }
.hero p { font-size: 1.2rem; max-width: 700px; margin: 0 auto; opacity: 0.9; }

/* --- LAYOUT GRID --- */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: -60px;
    padding-bottom: 60px;
}

main.container.main-layout {
    width: min(94%, 900px);
    max-width: 900px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-header { margin-bottom: 25px; }
.badge { 
    background: var(--avis-soft-red); color: var(--avis-red); 
    padding: 5px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
}
.card h2 { font-size: 2rem; margin-top: 10px; color: var(--avis-red); }


/* --- HISTORY TEXT --- */
.history-text h3 {
    color: var(--avis-red);
    font-size: 1.4rem;
    margin: 25px 0 10px;
    border-left: 4px solid var(--avis-red);
    padding-left: 15px;
}
.history-text p {
    margin-bottom: 15px;
    text-align: justify;
}
.history-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}
.history-list li {
    background: var(--avis-soft-red);
    margin-bottom: 10px;
    padding: 12px 20px;
    border-radius: 8px;
}
.history-list li strong { color: var(--avis-red); }
.history-conclusion {
    background: #fdfdfd;
    padding: 20px;
    border: 1px dashed #ddd;
    border-radius: var(--radius);
    margin: 30px 0;
}

/* --- VALUES GRID --- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}
.value-item { text-align: center; padding: 20px; background: #fafafa; border-radius: var(--radius); }
.value-icon { font-size: 2rem; margin-bottom: 10px; }
.value-item h3 { font-size: 1.1rem; margin-bottom: 5px; }
.value-item p { font-size: 0.9rem; color: var(--text-muted); }

/* --- SIDEBAR --- */
.info-box {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.info-box.accent { border-top: 5px solid var(--avis-red); }
.info-box.highlight { background: #fff9e6; border-left: 5px solid #f1c40f; }
.info-box h4 { margin-bottom: 10px; font-size: 1.1rem; }
.link-text { color: var(--avis-red); text-decoration: none; font-weight: 700; font-size: 0.9rem; }

/* --- FOOTER --- */
.main-footer { background: #1a1a1a; color: white; padding: 60px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #bbb; text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; text-align: center; font-size: 0.8rem; color: #777; }

/* --- RESPONSIVE --- */

@media (max-width: 992px) {
    .main-layout { grid-template-columns: 1fr; margin-top: 20px; }
    .hero h1 { font-size: 2.5rem; }
    .values-grid { grid-template-columns: 1fr; }
    .nav-links { margin-top: 20px; }
    .nav-wrapper { flex-direction: column; text-align: center; }
    .nav-links li { margin: 10px; }
}
/* Contenitore globale per lo sfondo */
.background-polaroids {
    position: absolute; /* Cambiato da fixed a absolute */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    pointer-events: none; 
    overflow: hidden;
}

.polaroid-bg {
    position: absolute;
    width: 220px; /* Regola la grandezza qui */
    z-index: -1;
    filter: drop-shadow(8px 8px 10px rgba(0,0,0,0.15));
    /* Rimuovi eventuali margini fissi se li avevi messi */
}

/* Rotazioni casuali per l'effetto realistico */
.polaroid-bg:nth-child(1) { transform: rotate(-10deg); }
.polaroid-bg:nth-child(2) { transform: rotate(15deg); }
.polaroid-bg:nth-child(3) { transform: rotate(-5deg); }
.polaroid-bg:nth-child(4) { transform: rotate(8deg); }

.photo-bg {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 70%;
    object-fit: cover;
    z-index: 1;
    border-radius: 2px;
}

.frame-bg {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 2;
    display: block;
}

/* Nascondi su smartphone se coprono troppo il testo */
@media (max-width: 768px) {
    .background-polaroids {
        display: none;
    }
}

