/* Base grafica InLoco website */
:root {
  --primary: #16b8b3;
  --primary-dark: #0e8f8b;
  --accent: #ff9f43;
  --text: #17202a;
  --muted: #667085;
  --bg: #f7fbfb;
  --surface: #ffffff;
  --border: #e6eeee;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(230, 238, 238, 0.8);
}

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 24px rgba(22, 184, 179, 0.24);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
  color: var(--muted);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary-dark);
}

.nav-cta {
  padding: 10px 16px;
  border-radius: 999px;
  color: #ffffff !important;
  background: var(--primary);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(22, 184, 179, 0.22);
}

/* Hero */
.hero {
  padding: 86px 0 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 56px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(22, 184, 179, 0.1);
  font-weight: 700;
  font-size: 0.9rem;
}

.hero h1 {
  margin: 18px 0 18px;
  max-width: 720px;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 14px 28px rgba(22, 184, 179, 0.25);
}

.button-secondary {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
}

/* Phone mockup */
.phone-card {
  position: relative;
  max-width: 390px;
  margin-left: auto;
  padding: 18px;
  border-radius: 42px;
  background: #101828;
  box-shadow: var(--shadow);
}

.phone-screen {
  min-height: 620px;
  padding: 22px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 15% 15%, rgba(22, 184, 179, 0.22), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #eefafa 100%);
  overflow: hidden;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.app-pill {
  width: 96px;
  height: 12px;
  border-radius: 999px;
  background: #d8eeee;
}

.map-preview {
  min-height: 280px;
  position: relative;
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(22, 184, 179, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(22, 184, 179, 0.16) 1px, transparent 1px),
    #f7ffff;
  background-size: 42px 42px;
  border: 1px solid #dceeee;
}

.pin {
  position: absolute;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  color: #ffffff;
  background: var(--primary);
  transform: rotate(-45deg);
  box-shadow: 0 12px 22px rgba(22, 184, 179, 0.28);
}

.pin span {
  transform: rotate(45deg);
  font-size: 1.1rem;
}

.pin-one {
  top: 72px;
  left: 78px;
}

.pin-two {
  right: 72px;
  bottom: 66px;
  background: var(--accent);
}

.place-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #e3eeee;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.place-card strong {
  display: block;
  margin-bottom: 6px;
}

.place-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Sections */
.section {
  padding: 76px 0;
}

.section-alt {
  background: #ffffff;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.info-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}

.icon-bubble {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  color: var(--primary-dark);
  background: rgba(22, 184, 179, 0.12);
  font-size: 1.45rem;
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

/* Privacy & Dati */

.trust-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: linear-gradient(135deg, #263241, #42566b);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.trust-copy {
  max-width: 610px;
}

.trust-badge {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.trust-copy h2 {
  margin: 26px 0 20px;
}

.trust-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

.trust-links {
  display: grid;
  gap: 14px;
}

.trust-card {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 16px 22px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.trust-card:hover,
.trust-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.18);
}

.trust-card>div {
  display: grid;
  gap: 5px;
}

.trust-card-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.trust-card-text {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.5;
}

.trust-card-arrow {
  flex: 0 0 auto;
  color: #ff7566;
  font-size: 1.35rem;
  font-weight: 800;
  transition: transform 180ms ease;
}

.trust-card:hover .trust-card-arrow,
.trust-card:focus-visible .trust-card-arrow {
  transform: translateX(4px);
}

@media (max-width: 900px) {
  .trust-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .trust-panel {
    padding: 26px 20px;
    border-radius: 22px;
  }

  .trust-card {
    min-height: auto;
    padding: 18px;
  }

  .trust-card-text {
    font-size: 0.86rem;
  }
}

/* Footer */
.site-footer {
  padding: 36px 0;
  background: #101828;
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.footer-small {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 54px;
  }

  .hero-grid,
  .trust-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .phone-card {
    margin: 0 auto;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 22px, var(--max-width));
  }

  .hero h1 {
    font-size: 3rem;
  }

  .phone-screen {
    min-height: 520px;
  }
}

/* Language switch */
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(22, 184, 179, 0.08);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.language-link {
  color: var(--muted);
}

.language-link:hover,
.language-link.active {
  color: var(--primary-dark);
}

/* =========================================================
   InLoco dark visual tuning
   Blocchetto di override sicuro: non modifica la struttura.
   ========================================================= */

body {
  color: #f4f7fb;
  background: #2f3c4d;
}

.site-header {
  background: rgba(47, 60, 77, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  color: #ffffff;
}

.nav-links {
  color: #c4d0da;
}

.nav-links a:hover {
  color: #ffffff;
}

.hero {
  background:
    radial-gradient(circle at 78% 24%, rgba(74, 163, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #2f3c4d 0%, #263241 100%);
}

.hero h1,
.section-heading h2,
.info-card h3 {
  color: #ffffff;
}

.hero p,
.section-heading p,
.info-card p {
  color: #c4d0da;
}

.badge {
  color: #f06a5c;
  background: rgba(240, 106, 92, 0.12);
}

.section {
  background: #2f3c4d;
}

.section-alt {
  background: #263241;
}

.info-card {
  background: #42566b;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.icon-bubble {
  color: #f06a5c;
  background: rgba(74, 163, 255, 0.14);
}

.button-primary,
.nav-cta {
  color: #ffffff !important;
  background: #f06a5c;
  box-shadow: 0 14px 28px rgba(240, 106, 92, 0.28);
}

.button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.language-switch {
  background: rgba(255, 255, 255, 0.08);
  color: #c4d0da;
}

.language-link {
  color: #c4d0da;
}

.language-link:hover,
.language-link.active {
  color: #ffffff;
}

.phone-card {
  background: #111827;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.28);
}

.phone-screen {
  background:
    radial-gradient(circle at 15% 15%, rgba(74, 163, 255, 0.18), transparent 26%),
    linear-gradient(180deg, #314254 0%, #2b3949 100%);
}

.map-preview {
  background:
    linear-gradient(90deg, rgba(74, 163, 255, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(74, 163, 255, 0.16) 1px, transparent 1px),
    #dce8e3;
  background-size: 42px 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.place-card {
  background: rgba(66, 86, 107, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.place-card strong {
  color: #ffffff;
}

.place-card span {
  color: #d8e1e8;
}

.site-footer {
  background: #1d2632;
}

/* Real InLoco logo */
.brand-logo {
  display: block;
  width: auto;
  height: 48px;
  object-fit: contain;
}

.footer-brand-logo {
  height: 42px;
}

@media (max-width: 480px) {
  .brand-logo {
    height: 42px;
  }

  .footer-brand-logo {
    height: 38px;
  }
}

/* Real app screenshot inside phone mockup */
.real-app-preview {
  max-width: 360px;
}

.screenshot-screen {
  padding: 0;
  min-height: auto;
  aspect-ratio: 832 / 1808;
  border-radius: 32px;
  overflow: hidden;
  background: #2f3c4d;
}

.app-screenshot {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 32px;
}

/* Mobile menu */
.navbar {
  position: relative;
}

.mobile-menu-check {
  display: none;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-menu-button span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
}

@media (max-width: 860px) {
  .mobile-menu-button {
    display: inline-flex;
  }

  .mobile-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 30;
    padding: 18px;
    border-radius: 22px;
    background: rgba(38, 50, 65, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  }

  .mobile-menu-check:checked~.mobile-nav {
    display: grid;
    gap: 14px;
  }

  .mobile-nav a {
    color: #f4f7fb;
    font-weight: 700;
  }

  .mobile-nav .language-switch {
    width: fit-content;
  }

  .mobile-nav-cta {
    display: inline-flex;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 999px;
    color: #ffffff !important;
    background: #f06a5c;
    box-shadow: 0 14px 28px rgba(240, 106, 92, 0.25);
  }
}

/* Internal legal/content pages */
.page-hero {
  padding: 78px 0 54px;
  background:
    radial-gradient(circle at 78% 22%, rgba(240, 106, 92, 0.16), transparent 34%),
    linear-gradient(180deg, #2f3c4d 0%, #263241 100%);
}

.page-hero h1 {
  margin: 18px 0 14px;
  max-width: 780px;
  color: #ffffff;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #c4d0da;
  font-size: 1.1rem;
}

.legal-panel {
  max-width: 880px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: #42566b;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.legal-panel h2 {
  margin: 30px 0 10px;
  color: #ffffff;
  font-size: 1.35rem;
}

.legal-panel h2:first-of-type {
  margin-top: 0;
}

.legal-panel p {
  margin: 0 0 14px;
  color: #d8e1e8;
}

.legal-note {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(240, 106, 92, 0.12);
  border: 1px solid rgba(240, 106, 92, 0.22);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 640px) {
  .page-hero {
    padding: 52px 0 38px;
  }

  .legal-panel {
    padding: 24px;
  }
}

/* Footer brand alignment */
.footer-brand-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .footer-brand-block {
    align-items: flex-start;
  }

  .footer-tagline {
    text-align: left;
  }
}

/* Hero vertical balance */
@media (min-width: 861px) {
  .hero {
    padding-top: 62px;
  }

  .hero-grid>div:first-child {
    transform: translateY(-42px);
  }
}

@media (max-width: 860px) {
  .hero-grid>div:first-child {
    transform: none;
  }
}

/* Hero vertical balance v2 */
@media (min-width: 861px) {
  .hero {
    padding-top: 44px;
    padding-bottom: 56px;
  }

  .hero-grid {
    align-items: flex-start;
  }

  .hero-grid>div:first-child {
    transform: none;
    padding-top: 92px;
  }

  .real-app-preview {
    margin-top: 28px;
  }
}

/* Hero main logo */
.hero-main-logo {
  width: min(210px, 58vw);
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.24));
}

@media (max-width: 860px) {
  .hero-main-logo {
    width: min(190px, 64vw);
    margin-bottom: 18px;
  }
}

/* Editorial section art */
.section-heading-split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 42px;
}

.section-heading-split>div:first-child {
  max-width: 720px;
}

.section-logo-art {
  display: flex;
  justify-content: center;
  align-items: center;
}

.section-logo-art img {
  width: min(260px, 100%);
  height: auto;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.26));
  opacity: 0.96;
}

@media (max-width: 860px) {
  .section-heading-split {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .section-logo-art {
    justify-content: flex-start;
  }

  .section-logo-art img {
    width: 190px;
  }
}

/* Refine first editorial section logo placement */
@media (min-width: 861px) {
  #come-funziona .section-heading-split {
    position: relative;
    display: block;
    margin-bottom: 38px;
    padding-right: 36%;
  }

  #come-funziona .section-logo-art {
    position: absolute;
    right: 4.5%;
    top: -44px;
    width: 26%;
    justify-content: center;
    pointer-events: none;
  }

  #come-funziona .section-logo-art img {
    width: 220px;
    max-width: 100%;
  }
}

/* Editorial pin cluster */
.section-heading-reverse {
  grid-template-columns: 320px minmax(0, 1fr);
}

.section-heading-reverse>div:last-child {
  max-width: 760px;
  justify-self: end;
  text-align: right;
}

.pin-cluster-art {
  position: relative;
  width: 280px;
  height: 210px;
  margin-left: 18px;
}

.pin-art {
  position: absolute;
  width: auto;
  height: auto;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.28));
}

.pin-art-large {
  width: 128px;
  left: 72px;
  top: 22px;
  z-index: 4;
}

.pin-art-medium {
  width: 92px;
  left: 168px;
  top: 70px;
  z-index: 3;
  opacity: 0.96;
}

.pin-art-small {
  width: 78px;
  left: 20px;
  top: 86px;
  z-index: 2;
  opacity: 0.92;
}

.pin-art-tiny {
  width: 62px;
  left: 128px;
  top: 136px;
  z-index: 1;
  opacity: 0.88;
}

@media (max-width: 860px) {
  .section-heading-reverse {
    grid-template-columns: 1fr;
  }

  .section-heading-reverse>div:last-child {
    justify-self: start;
    text-align: left;
  }

  .pin-cluster-art {
    width: 240px;
    height: 170px;
    margin-left: 0;
  }

  .pin-art-large {
    width: 105px;
    left: 62px;
    top: 10px;
  }

  .pin-art-medium {
    width: 78px;
    left: 148px;
    top: 52px;
  }

  .pin-art-small {
    width: 68px;
    left: 8px;
    top: 64px;
  }

  .pin-art-tiny {
    width: 54px;
    left: 112px;
    top: 112px;
  }
}

/* Refine second editorial section pin placement */
@media (min-width: 861px) {
  #vantaggi .section-heading-reverse {
    position: relative;
    display: block;
    margin-bottom: 38px;
    padding-left: 34%;
  }

  #vantaggi .pin-cluster-art {
    position: absolute;
    left: 3.5%;
    top: -58px;
    width: 26%;
    height: 170px;
    margin-left: 0;
    pointer-events: none;
  }

  #vantaggi .section-heading-reverse>div:last-child {
    max-width: 820px;
    margin-left: auto;
    text-align: right;
  }
}

/* Mobile refinement for editorial art */
@media (max-width: 860px) {

  #come-funziona .section-heading-split,
  #vantaggi .section-heading-reverse {
    display: block;
    padding: 0;
    margin-bottom: 28px;
  }

  #come-funziona .section-logo-art,
  #vantaggi .pin-cluster-art {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    height: auto;
    margin: 0 0 22px;
    display: flex;
    justify-content: flex-start;
    pointer-events: none;
  }

  #come-funziona .section-logo-art img {
    width: 150px;
  }

  #vantaggi .pin-cluster-art {
    width: 220px;
    height: 145px;
  }

  #vantaggi .section-heading-reverse>div:last-child {
    max-width: none;
    margin-left: 0;
    text-align: left;
  }

  #vantaggi .pin-art-large {
    width: 88px;
    left: 64px;
    top: 4px;
  }

  #vantaggi .pin-art-medium {
    width: 64px;
    left: 142px;
    top: 42px;
  }

  #vantaggi .pin-art-small {
    width: 56px;
    left: 8px;
    top: 54px;
  }

  #vantaggi .pin-art-tiny {
    width: 46px;
    left: 104px;
    top: 94px;
  }
}

/* Mobile refinement: logo and pins positioning */
@media (max-width: 860px) {
  #come-funziona .section-heading-split {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  #come-funziona .section-logo-art {
    order: -1;
    width: 100%;
    margin: 0 0 6px;
    justify-content: center;
  }

  #come-funziona .section-logo-art img {
    width: 165px;
  }

  #vantaggi .pin-cluster-art {
    margin: 0 auto 22px;
  }
}

/* Anchor offset for sticky header */
#come-funziona,
#vantaggi,
#privacy,
#download {
  scroll-margin-top: 110px;
}

@media (max-width: 860px) {

  #come-funziona,
  #vantaggi,
  #privacy,
  #download {
    scroll-margin-top: 92px;
  }
}

/* English homepage editorial alignment */
@media (min-width: 861px) {
  #how-it-works .section-heading-split {
    position: relative;
    display: block;
    margin-bottom: 38px;
    padding-right: 36%;
  }

  #how-it-works .section-logo-art {
    position: absolute;
    right: 4.5%;
    top: -44px;
    width: 26%;
    justify-content: center;
    pointer-events: none;
  }

  #how-it-works .section-logo-art img {
    width: 220px;
    max-width: 100%;
  }

  #benefits .section-heading-reverse {
    position: relative;
    display: block;
    margin-bottom: 38px;
    padding-left: 34%;
  }

  #benefits .pin-cluster-art {
    position: absolute;
    left: 3.5%;
    top: -58px;
    width: 26%;
    height: 170px;
    margin-left: 0;
    pointer-events: none;
  }

  #benefits .section-heading-reverse>div:last-child {
    max-width: 820px;
    margin-left: auto;
    text-align: right;
  }
}

/* Anchor offset for English sections */
#how-it-works,
#benefits {
  scroll-margin-top: 110px;
}

@media (max-width: 860px) {

  #how-it-works,
  #benefits {
    scroll-margin-top: 92px;
  }
}

/* Download section */
.download-section {
  background: #263241;
}

.download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 34px;
  align-items: center;
  padding: 38px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #42566b, #314254);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.download-panel h2 {
  margin: 18px 0 14px;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.download-panel p {
  max-width: 720px;
  margin: 0;
  color: #d8e1e8;
  font-size: 1.05rem;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.play-store-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 18px;
  border-radius: 18px;
  color: #ffffff;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.play-store-placeholder small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  line-height: 1;
}

.play-store-placeholder strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.2;
}

.play-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f06a5c;
}

.qr-card {
  padding: 20px;
  border-radius: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.qr-placeholder {
  width: 132px;
  height: 132px;
  margin: 0 auto 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: #f4f7fb;
}

.qr-placeholder span {
  border-radius: 8px;
  background: #1d2632;
}

.qr-card p {
  font-size: 0.9rem;
  color: #c4d0da;
}

#scarica {
  scroll-margin-top: 110px;
}

@media (max-width: 860px) {
  .download-panel {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .qr-card {
    max-width: 240px;
  }

  #scarica {
    scroll-margin-top: 92px;
  }
}

/* Customize section */
.customize-section {
  background: #2f3c4d;
}

#personalizza {
  scroll-margin-top: 110px;
}

@media (max-width: 860px) {
  #personalizza {
    scroll-margin-top: 92px;
  }
}

/* Slightly larger heart icon */
.icon-bubble-heart {
  font-size: 2rem;
  line-height: 1;
}

#personalize {
  scroll-margin-top: 110px;
}

@media (max-width: 860px) {
  #personalize {
    scroll-margin-top: 92px;
  }
}

#download {
  scroll-margin-top: 110px;
}

@media (max-width: 860px) {
  #download {
    scroll-margin-top: 92px;
  }
}

/* Compact layout for internal pages */
.inner-page main>section:first-child {
  padding-top: 54px;
  padding-bottom: 28px;
}

.inner-page main>section:first-child h1 {
  margin-top: 22px;
  margin-bottom: 16px;
  font-size: clamp(2.6rem, 4.8vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.inner-page main>section:first-child p {
  margin-bottom: 0;
}

.inner-page main>section:nth-child(2) {
  padding-top: 28px;
}

/* Active navigation item */
.nav-links a.nav-active,
.mobile-nav a.nav-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  padding: 8px 12px;
}

.nav-links a.nav-active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mobile-nav a.nav-active {
  width: fit-content;
}

/* Customize section artwork */
@media (min-width: 861px) {

  #personalizza .customize-heading,
  #personalize .customize-heading {
    position: relative;
    display: block;
    max-width: none;
    margin-bottom: 34px;
    padding-right: 34%;
  }

  #personalizza .customize-heading>div:first-child,
  #personalize .customize-heading>div:first-child {
    max-width: 720px;
  }

  #personalizza .customize-art,
  #personalize .customize-art {
    position: absolute;
    right: 4%;
    top: -50px;
    width: 300px;
    display: flex;
    justify-content: center;
    pointer-events: none;
  }

  #personalizza .customize-art img,
  #personalize .customize-art img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.22));
  }
}

@media (max-width: 860px) {

  #personalizza .customize-heading,
  #personalize .customize-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 26px;
  }

  #personalizza .customize-art,
  #personalize .customize-art {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
  }

  #personalizza .customize-art img,
  #personalize .customize-art img {
    width: min(250px, 82vw);
    height: auto;
    display: block;
  }
}

/* FIX DEFINITIVO — Card Privacy homepage */

#privacy .trust-links {
  display: grid;
  gap: 14px;
}

#privacy .trust-links .trust-card {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  width: 100%;
  min-height: 78px;
  padding: 16px 22px;

  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);

  color: #ffffff;
  text-decoration: none !important;

  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

#privacy .trust-links .trust-card:hover,
#privacy .trust-links .trust-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.19);
}

#privacy .trust-card>div {
  display: grid;
  gap: 6px;
}

#privacy .trust-card-title {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

#privacy .trust-card-text {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}

#privacy .trust-card-arrow {
  display: block;
  flex: 0 0 auto;
  color: #ff7566;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 180ms ease;
}

#privacy .trust-card:hover .trust-card-arrow,
#privacy .trust-card:focus-visible .trust-card-arrow {
  transform: translateX(4px);
}

@media (max-width: 640px) {
  #privacy .trust-links .trust-card {
    min-height: auto;
    padding: 18px;
  }

  #privacy .trust-card-text {
    font-size: 0.86rem;
  }
}

/* Video promozionale */

.video-section {
  background:
    radial-gradient(circle at 50% 0%,
      rgba(255, 111, 97, 0.08),
      transparent 38%);
}

.video-heading {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.video-heading h2 {
  margin: 22px 0 16px;
}

.video-heading p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.75;
}

.video-frame {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .video-frame {
    border-radius: 18px;
  }

  .video-heading {
    margin-bottom: 26px;
  }
}