:root{
  /* SFONDI */
  --bg:#f6efe6;            /* crema più scuro */
  --panel:#ffffff;        /* riquadri bianchi veri */
  --panel-alt:#fff9f2;    /* pannello caldo */

  /* TESTI */
  --text:#2a2420;
  --muted:#6a5f55;

  /* LINEE / OMBRE */
  --line:#e0d4c7;
  --shadow:0 14px 34px rgba(0,0,0,.10);
  --shadow2:0 8px 20px rgba(0,0,0,.08);

  /* BRAND */
  --brand:#9e1b1b;        /* rosso principale */
  --brand-soft:#c43a3a;
  --brand-light:#f0caca;

  --radius:20px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    linear-gradient(180deg,#f2eadf 0%, var(--bg) 100%);
  color:var(--text);
}

/* ------------------------------------------------ */
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:1120px;margin:0 auto;padding:22px}

/* ================= TOPBAR ================= */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:#fff;
  border-bottom:1px solid var(--line);
  box-shadow:0 6px 18px rgba(0,0,0,.05);
}
.topbar .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand .mark{
  width:40px;height:40px;border-radius:12px;
  background:linear-gradient(135deg,var(--brand),var(--brand-soft));
  box-shadow:0 6px 16px rgba(158,27,27,.30);
  position:relative;
}
.brand .mark:after{
  content:"";
  position:absolute;
  left:50%;top:50%;
  width:18px;height:18px;
  transform:translate(-50%,-50%);
  background:
    linear-gradient(#fff,#fff) center/4px 18px no-repeat,
    linear-gradient(#fff,#fff) center/18px 4px no-repeat;
}
.brand .title{
  display:flex;
  flex-direction:column;
  line-height:1.05;
}
.brand .title span{
  font-size:13px;
  color:var(--muted);
  font-weight:600;
}
.brand .title strong{
  font-size:17px;
  font-weight:800;
  color:var(--text);
}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.nav a{
  padding:10px 14px;
  border-radius:14px;
  color:var(--text);
  font-weight:600;
}
.nav a:hover{
  background:var(--brand-light);
  color:var(--brand);
  text-decoration:none;
}

/* ================= BUTTONS ================= */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border-radius:16px;
  border:1px solid var(--line);
  font-weight:700;
  transition:all .15s ease;
}
.btn svg{width:18px;height:18px}

.btn.primary{
  background:linear-gradient(135deg,var(--brand),var(--brand-soft));
  color:#fff;
  border:none;
  box-shadow:0 10px 26px rgba(158,27,27,.30);
}
.btn.primary:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 40px rgba(158,27,27,.40);
}

.btn.ghost{
  background:#fff;
  color:var(--brand);
}
.btn.ghost:hover{
  background:var(--brand-light);
  transform:translateY(-2px);
}

/* ================= HERO ================= */
.hero{
  margin-top:22px;
  border-radius:calc(var(--radius) + 6px);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  padding:32px;
  position:relative;
  overflow:hidden;
  min-height:440px;
}

/* HERO CON FOTO VISIBILE */
.hero.has-photo{
  background:
    linear-gradient(180deg,
      rgba(255,255,255,.35),
      rgba(255,255,255,.55)
    ),
    url("/assets/img/hero.jpg") center/cover no-repeat;
}

.hero .grid{
  position:relative;
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:22px;
}
@media(max-width:820px){
  .hero .grid{grid-template-columns:1fr}
}

.h-eyebrow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.35px;
}
.pill{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
}

.hero h1{
  margin:14px 0;
  font-size:44px;
  letter-spacing:-.6px;
}
@media(max-width:520px){
  .hero h1{font-size:34px}
}
.hero p{
  max-width:62ch;
  color:#3b342e;
  line-height:1.65;
  font-weight:500;
}
.hero .cta{
  margin-top:20px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.hero-card{
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:var(--panel);
  box-shadow:var(--shadow2);
  padding:18px;
}
.hero-card h3{margin-top:0;color:var(--brand)}
.hero-card ul{
  padding-left:18px;
  color:var(--muted);
  line-height:1.6;
}

/* ================= QUICK CARDS ================= */
.quick{
  margin-top:22px;
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:16px;
}
.qcard{
  grid-column:span 4;
  border-radius:calc(var(--radius) + 4px);
  border:1px solid var(--line);
  background:var(--panel);
  box-shadow:var(--shadow2);
  padding:18px;
  transition:all .15s ease;
}
.qcard:hover{
  background:var(--panel-alt);
  transform:translateY(-2px);
}
@media(max-width:980px){.qcard{grid-column:span 6}}
@media(max-width:640px){.qcard{grid-column:span 12}}

.qcard .ico{
  width:44px;height:44px;
  border-radius:14px;
  background:var(--brand-light);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:10px;
  color:var(--brand);
}
.qcard h3{margin:6px 0;color:var(--brand)}
.qcard p{margin:0;color:var(--muted)}

/* ================= NEWS SLIDER ================= */
.section-head{
  margin-top:28px;
  display:flex;
  justify-content:space-between;
  align-items:baseline;
}
.section-head a{
  padding:8px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--brand);
}

.slider{
  margin-top:14px;
  border-radius:calc(var(--radius) + 4px);
  border:1px solid var(--line);
  background:var(--panel);
  box-shadow:var(--shadow2);
  position:relative;
}
.slides{padding:20px}
.slide{display:none}
.slide.active{display:block}
.badge{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  background:var(--brand-light);
  color:var(--brand);
  font-size:12px;
  font-weight:800;
}
.slide h3{margin:12px 0 6px}
.slide p{margin:0;color:var(--muted)}

.slider-controls{
  position:absolute;
  top:12px;
  right:12px;
  display:flex;
  gap:8px;
}
.icon-btn{
  width:40px;height:40px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
}
.icon-btn:hover{background:var(--brand-light)}
.icon-btn svg{width:18px;height:18px}

/* ================= FOOTER ================= */
.footer{
  margin-top:30px;
  border-top:1px solid var(--line);
  color:var(--muted);
  background:#fff;
}
.footer-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:16px;
}
@media(max-width:820px){
  .footer-grid{grid-template-columns:1fr}
}
.footer .links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.footer .links a{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--brand);
}
.footer .links a:hover{background:var(--brand-light)}

.small{font-size:12px;color:var(--muted)}

/* ================= QUICK CARDS GRID FIX ================= */

/* Desktop: 4 card per riga */
@media (min-width: 1100px){
  .quick{
    grid-template-columns: repeat(12, 1fr);
  }
  .qcard{
    grid-column: span 3;
  }
}

/* Tablet: 2 card per riga */
@media (max-width: 1099px) and (min-width: 640px){
  .quick{
    grid-template-columns: repeat(12, 1fr);
  }
  .qcard{
    grid-column: span 6;
  }
}

/* Mobile: 1 card per riga */
@media (max-width: 639px){
  .quick{
    grid-template-columns: repeat(12, 1fr);
  }
  .qcard{
    grid-column: span 12;
  }
}

.ico svg{width:22px;height:22px}