/* Non Temiamo la Matematica – stile del sito (ricostruito a mano, senza Avada) */
@font-face { font-family: "DM Sans"; src: url(/assets/fonts/dm-sans.woff2) format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(/assets/fonts/dm-sans-italic.woff2) format("woff2"); font-weight: 100 1000; font-style: italic; font-display: swap; }
@font-face { font-family: "Delicious Handrawn"; src: url(/assets/fonts/delicious-handrawn.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --red: #be201c;
  --red-bright: #d62725;
  --ink: #212934;
  --black: #000;
  --grey: #898989;
  --line: #e2e2e2;
  --soft: #f9f9fb;
  --pink: #fcf0f0;
  --width: 1260px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Delicious Handrawn", "Comic Sans MS", cursive;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.6 var(--font); color: var(--ink); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-bright); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--black); line-height: 1.2; margin: 0 0 .6em; }
h1, h2 { word-spacing: .12em; }
h1 { font: 400 clamp(36px, 5vw, 56px)/1.1 var(--hand); text-align: center; }
h2 { font: 700 clamp(24px, 3vw, 34px)/1.2 var(--hand); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 48px, var(--width)); margin-inline: auto; }
.center { text-align: center; }
.narrow { width: min(100% - 48px, 860px); margin-inline: auto; }

/* pulsanti */
.btn { display: inline-block; padding: .65em 1.4em; border-radius: 12px; background: var(--red-bright); color: #fff; font-weight: 600; font-size: 15px; line-height: 1.3; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--red); color: #fff; text-decoration: none; }
.btn-soft { background: var(--pink); color: var(--red-bright); font-size: 13px; text-transform: uppercase; letter-spacing: .02em; padding: 1em 1.6em; }
.btn-soft:hover { background: #f8dede; color: var(--red); }

/* intestazione */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; box-shadow: 0 1px 0 var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 120px; }
.brand img { width: 280px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 36px; margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; }
.site-nav li { position: relative; }
.site-nav a { color: var(--black); font-weight: 500; font-size: 16px; padding: 8px 0; display: inline-block; }
.site-nav a:hover, .site-nav a.is-current { color: var(--red); text-decoration: none; }
.site-nav .btn-soft { color: var(--red-bright); font-weight: 500; padding: 1em 1.6em; }
.has-sub > a::after { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 0 3px 9px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.sub { position: absolute; left: -16px; top: 100%; min-width: 240px; flex-direction: column; gap: 0; padding: 10px 0; background: #fff; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14); display: none !important; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: flex !important; }
.sub a { display: block; padding: 10px 20px; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--black); border-radius: 2px; }

/* sezioni */
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.lead { font-size: 18px; max-width: 960px; margin-inline: auto; }
.kicker { color: var(--red); font-weight: 500; margin-bottom: .4em; }
.hero { padding: 56px 0 24px; }
.hero h1 { margin-bottom: 28px; }
.hero .lead { text-align: left; }
.pagehead { text-align: center; padding: 48px 0 16px; }
.pagehead .kicker { margin: 0 0 8px; font-size: 18px; }
.pagehead .tagline { font-style: italic; font-size: 18px; color: var(--black); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: 14px; }
.card-photo { position: relative; border-radius: 14px; overflow: hidden; min-height: 380px; background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.card-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,.05) 70%); }
.card-photo > div { position: relative; padding: 32px; color: #fff; }
.card-photo h2 { color: #fff; }
.card-photo p { margin-bottom: 1.2em; }

/* sponsor */
.sponsors { padding: 48px 0 72px; text-align: center; }
.sponsors-title { color: var(--grey); font-size: 14px; margin-bottom: 20px; }
.sponsors-list { list-style: none; padding: 0; margin: 0 auto; width: min(100% - 48px, var(--width)); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 48px; }
.sponsors-list img { height: 88px; width: auto; max-width: 180px; object-fit: contain; }

/* schede evento */
.talks { display: grid; gap: 28px; }
.talk { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: start; padding: 32px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.talk-flip { grid-template-columns: 1fr 280px; }
.talk-flip .talk-photo { order: 2; }
.talk-photo { width: 100%; border-radius: 12px; aspect-ratio: 1; object-fit: cover; }
.talk-body h2 { font-size: 28px; }
.talk-name { font-size: 20px; margin-bottom: .2em; }
.talk-role { color: var(--grey); font-style: italic; }
.when { display: inline-block; background: var(--pink); color: var(--red); font-weight: 600; padding: .35em .9em; border-radius: 999px; font-size: 15px; }
.where { font-size: 15px; }
.bio { font-size: 14.5px; color: #4b5563; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.talk-multi { display: grid; gap: 20px; }
.people { display: flex; flex-wrap: wrap; gap: 24px; margin: 10px 0 18px; }
.person { display: flex; align-items: center; gap: 14px; }
.person img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.person strong { display: block; color: var(--black); }
.person span { font-size: 14px; color: var(--grey); }
.banner img { border-radius: 14px; width: 100%; }

/* tabella convegno */
.schedule { width: 100%; border-collapse: collapse; margin: 16px 0; }
.schedule th, .schedule td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.schedule th { color: var(--grey); font-weight: 500; font-size: 14px; }
.schedule td:first-child { white-space: nowrap; font-weight: 600; color: var(--red); }

/* album e video */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.tile { display: block; color: var(--ink); }
.tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; transition: transform .2s; }
.tile:hover img { transform: scale(1.02); }
.tile:hover { text-decoration: none; }
.tile strong { display: block; margin-top: 10px; color: var(--black); }
.tile span { font-size: 14px; color: var(--grey); }

/* contatti */
.contact { text-align: center; padding: 56px 0 120px; font-size: 20px; }
.contact p { margin-bottom: 1.2em; }
.contact a { font-weight: 500; }

/* piè di pagina */
.site-footer { padding: 0 30px 30px; }
.footer-box { max-width: 1240px; margin: 0 auto; padding: 72px 40px 40px; border-radius: 6px; color: #fff; text-align: center; background: linear-gradient(160deg, #8c1412 0%, #b81c19 100%); }
.footer-cols { display: flex; justify-content: center; align-items: center; gap: 40px; max-width: 760px; margin: 0 auto 56px; text-align: left; }
.footer-cols p { margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-box .btn { background: var(--red-bright); font-size: 14px; white-space: nowrap; }
.footer-box .btn:hover { background: #e83a38; }
.footer-box a:not(.btn) { color: #f4b8b6; }
.copy { font-size: 15px; margin-bottom: 2em; }
.legal { font-size: 12px; margin: 0; }

/* telefono */
@media (max-width: 900px) {
  .header-row { min-height: 84px; flex-wrap: wrap; }
  .brand img { width: 200px; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav { display: none; flex-direction: column; align-items: stretch; width: 100%; gap: 12px; padding-bottom: 18px; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 0; }
  .has-sub > a::after { display: none; }
  .sub { position: static; display: block !important; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
  .split, .talk, .talk-flip { grid-template-columns: 1fr; gap: 24px; }
  .talk-flip .talk-photo { order: 0; }
  .talk { padding: 22px; }
  .section { padding: 48px 0; }
  .footer-cols { flex-direction: column; text-align: center; margin-bottom: 36px; }
  .footer-box { padding: 48px 22px 32px; }
  .site-footer { padding: 0 12px 12px; }
  .sponsors-list img { height: 64px; max-width: 130px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tile img { transition: none; } }

/* appuntamenti di novembre 2026 (home e Math4Med) */
.novembre h2 { font-family: var(--font); font-weight: 600; }
.nov-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 32px 0; align-items: start; }
.nov-card { background: var(--soft); border-radius: 14px; padding: 28px 32px; text-align: center; }
.nov-card h3 { font-size: 26px; font-weight: 600; color: #e05a2b; }
.nov-card-2 h3 { color: #1e5aa8; }
.nov-card h4 { font-size: 22px; font-weight: 400; margin: 0 0 .2em; }
.nov-card ul { text-align: left; margin: 0 0 1.2em; padding-left: 1.2em; }
.nov-card li { margin-bottom: .4em; }
.nov-credit { font-size: 13px; }
@media (max-width: 900px) { .nov-cards { grid-template-columns: 1fr; } .nov-card { padding: 22px; } }
.ciclo { margin-bottom: 32px; }
.novembre .btn-soft { text-transform: none; }
