:root {
  --navy: #142B45;
  --blue: #1763A6;
  --yellow: #F2B632;
  --coral: #C94B45;
  --green: #176B52;
  --bg: #F3F6FA;
  --surface: #FFFFFF;
  --text: #142B45;
  --text-soft: #34495E;
  --border: #B9C6D6;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(20, 43, 69, .12);
  --nav-h: 64px;
  font-family: Poppins, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: 1.85rem; font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 5px var(--navy); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--yellow); color: var(--navy); padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { left: 8px; }


/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  background: var(--navy); color: #fff;
  padding: .6rem 1rem; padding-top: calc(.6rem + env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; margin-right: auto; }
.brand img { border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.2rem; }
.brand-name span { color: var(--yellow); }
.brand-payoff { font-size: .8rem; font-weight: 500; color: #fff; }

.nav-desktop { display: none; gap: .25rem; }
.nav-desktop a {
  color: #fff; text-decoration: none; font-weight: 600; padding: .5rem .85rem; border-radius: 999px;
}
.nav-desktop a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.nav-desktop a[aria-current="page"] { background: var(--yellow); color: var(--navy); }

.nav-mobile {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--navy); border-top: 3px solid var(--yellow);
}
.nav-mobile a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #fff; text-decoration: none; font-size: .72rem; font-weight: 600; min-height: 48px;
}
.nav-mobile a svg { width: 22px; height: 22px; }
.nav-mobile a[aria-current="page"] { color: var(--yellow); }

/* Layout */
main { max-width: 1040px; margin: 0 auto; padding: 1.25rem 1rem 2rem; outline: none; }
main:focus, main:focus-visible { outline: none; box-shadow: none; }
.page-head { margin-bottom: 1.25rem; }
.page-head p { color: var(--text-soft); max-width: 60ch; }


.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--text-soft); }
.card .btn { margin-top: .25rem; }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { border-color: var(--blue); }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy); color: var(--yellow); margin-bottom: .6rem;
}
.card .icon svg { width: 24px; height: 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: .6rem 1.2rem; border-radius: 999px; border: 2px solid var(--blue);
  background: var(--blue); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-accent { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.btn-accent:hover { background: #fff; border-color: #fff; color: var(--navy); }
.btn-small { min-height: 40px; padding: .35rem .9rem; font-size: .9rem; }

.badge {
  display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
  background: var(--navy); color: #fff;
}
.badge-green { background: var(--green); }
.badge-coral { background: var(--coral); }
.badge-yellow { background: var(--yellow); color: var(--navy); }

.notice {
  border-left: 6px solid var(--yellow); background: #fff; border-radius: 10px; padding: .9rem 1rem;
  box-shadow: var(--shadow); color: var(--navy); margin-bottom: 1rem;
}
.notice strong { color: var(--navy); }
.notice.error { border-left-color: var(--coral); }
.notice.ok { border-left-color: var(--green); }

/* Form */
.filters { display: grid; gap: .75rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
label { font-weight: 700; display: block; margin-bottom: .25rem; }
input, select {
  width: 100%; min-height: 48px; padding: .55rem .8rem; border: 2px solid var(--navy); border-radius: 12px;
  background: #fff; color: var(--navy); font: inherit;
}
input::placeholder { color: #4A5C70; }

.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tab {
  min-height: 44px; padding: .4rem 1rem; border-radius: 999px; border: 2px solid var(--navy);
  background: #fff; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer;
}
.tab[aria-pressed="true"] { background: var(--navy); color: #fff; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.seduta .when { font-weight: 800; font-size: 1.1rem; }
.meta { color: var(--text-soft); font-size: .92rem; margin: 0 0 .4rem; }

.map-frame {
  width: 100%; height: 62vh; min-height: 360px; border: 2px solid var(--navy); border-radius: var(--radius); background: #fff;
}
.stack { display: grid; gap: .75rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

.price { font-size: 1.9rem; font-weight: 800; color: var(--navy); margin: 0 0 .25rem; }
.price small { font-size: .95rem; font-weight: 600; color: var(--text-soft); }
.check { list-style: none; padding: 0; margin: .5rem 0 0; }
.check li { padding-left: 1.5rem; position: relative; margin-bottom: .35rem; }
.check li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

.skeleton { height: 90px; border-radius: var(--radius); background: linear-gradient(90deg, #DCE4EE 25%, #EEF2F7 50%, #DCE4EE 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.footer { max-width: 1040px; margin: 0 auto; padding: 0 1rem 2rem; font-size: .85rem; color: var(--text-soft); }

@media (min-width: 720px) {
  h1 { font-size: 2.4rem; }
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  :root { --nav-h: 0px; }
  body { padding-bottom: 0; }
  .nav-mobile { display: none; }
  .nav-desktop { display: flex; }
  .filters { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* ---- Prima schermata (slide con il logo banner) ---- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.slide { margin: 0 0 .25rem; border-radius: 22px; overflow: hidden; background: #0B3B8C; border-bottom: 6px solid var(--yellow); box-shadow: var(--shadow); }
.slide picture, .slide-img { display: block; width: 100%; }
.slide-img { height: auto; aspect-ratio: 760 / 608; object-fit: cover; }
.slide-cue {
  display: flex; flex-direction: column; align-items: center; margin: 0 auto 1rem; width: fit-content;
  color: var(--navy); text-decoration: none; font-weight: 700; min-height: 48px; padding: .25rem 1rem;
}
.slide-cue:hover { color: var(--blue); }
.cue-icon svg { width: 28px; height: 28px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* ---- Installazione: loghi Android / Apple ---- */
.install-banner { background: var(--surface); border: 2px solid var(--navy); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; text-align: center; }
.install-banner h2 { font-size: 1.05rem; margin-bottom: .75rem; }
.install-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.os-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 96px;
  background: var(--bg); border: 2px solid var(--navy); border-radius: 16px; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer;
}
.os-btn:hover { background: #fff; border-color: var(--blue); }
.os-btn img { height: 40px; width: auto; }

/* ---- Pulsanti grandi della home (solo titoli) ---- */
.home-cards { display: grid; gap: .85rem; grid-template-columns: 1fr; margin-bottom: 1.5rem; }
.card.big { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; min-height: 84px; }
.card.big .icon { margin: 0; flex: none; }
.card.big h2 { font-size: 1.25rem; margin: 0; }
.card.featured { background: var(--navy); border-color: var(--yellow); border-width: 3px; }
.card.featured h2 { color: #fff; }
.card.featured .icon { background: var(--yellow); color: var(--navy); }
.card.featured:hover { border-color: #fff; }
.card h2 { font-size: 1.15rem; }
.uni-strip { margin-top: .5rem; }
.uni-strip h2 { font-size: 1.1rem; }

/* ---- Servizi di Organizza la tua laurea ---- */
.service { padding: 0; overflow: hidden; }
.service-img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; background: var(--navy); }
.service-body { padding: 1rem 1.1rem 1.1rem; }
.service-body h2 { margin-bottom: .3rem; }
.prose { white-space: pre-line; overflow-wrap: anywhere; }
.event-img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #EEF2F7; border-radius: 12px; margin-bottom: .75rem; }
textarea { width: 100%; padding: .55rem .8rem; border: 2px solid var(--navy); border-radius: 12px; background: #fff; color: var(--navy); font: inherit; }

/* ---- Viewer interno e mappa ---- */
.viewer-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.viewer-title { font-size: 1.1rem; margin: 0; }
.viewer-frame { display: block; width: 100%; height: calc(100svh - 64px - var(--nav-h) - 9rem); min-height: 400px; border: 2px solid var(--navy); border-radius: var(--radius); background: #fff; }
.map-wrap { width: 100%; }
.map-frame { display: block; width: 100%; min-height: 400px; height: 70svh; border: 2px solid var(--navy); border-radius: var(--radius); background: #fff; }

/* ---- WhatsApp ---- */
.btn-wa { background: #0F7A5B; border-color: #0F7A5B; color: #fff; }
.btn-wa:hover { background: var(--navy); border-color: var(--navy); }
.wa-float {
  position: fixed; right: 14px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); z-index: 70;
  display: inline-flex; align-items: center; gap: .45rem; min-height: 52px; padding: 0 1.1rem 0 .9rem;
  border-radius: 999px; background: #0F7A5B; color: #fff; text-decoration: none; font-weight: 700;
  border: 2px solid #fff; box-shadow: 0 6px 18px rgba(20, 43, 69, .4);
}
.wa-float:hover { background: var(--navy); color: #fff; }
.wa-float svg { width: 26px; height: 26px; }

/* ---- Guida installazione ---- */
.modal-backdrop { position: fixed; inset: 0; z-index: 300; background: rgba(20, 43, 69, .85); display: grid; place-items: center; padding: 1rem; }
.modal { background: #fff; color: var(--navy); border-radius: 20px; padding: 1.4rem 1.25rem; width: min(460px, 100%); max-height: 92svh; overflow: auto; border-top: 6px solid var(--yellow); }
.modal h2 { font-size: 1.25rem; }
.guide { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .8rem; }
.guide-step { display: grid; grid-template-columns: 28px 52px 1fr; gap: .7rem; align-items: center; }
.guide-step p { margin: 0; }
.guide-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: .9rem; }
.guide-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: var(--yellow); }
.guide-icon svg { width: 28px; height: 28px; }

@media (min-width: 720px) {
  .home-cards { grid-template-columns: repeat(3, 1fr); }
  .card.big { flex-direction: column; text-align: center; padding: 1.5rem 1rem; }
  .slide-img { aspect-ratio: 1600 / 506; }
  .install-btns { max-width: 420px; margin: 0 auto; }
}
@media (min-width: 900px) {
  .wa-float { bottom: 20px; right: 20px; }
  .viewer-frame { height: calc(100svh - 64px - 9rem); }
}
@media (max-width: 380px) {
  .wa-float span { display: none; }
  .wa-float { padding: 0 .9rem; }
}
