/* Ambassador microsite — shared layout (nav, footer, tokens) */
    @font-face { font-family:'FactorA'; src:url('FactorA-Light.otf') format('opentype'),url('FactorA-Light.ttf') format('truetype'); font-weight:300; font-style:normal; font-display:swap; }
    @font-face { font-family:'FactorA'; src:url('FactorA-Regular.otf') format('opentype'),url('FactorA-Regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
    @font-face { font-family:'FactorA'; src:url('FactorA-Italic.otf') format('opentype'),url('FactorA-Italic.ttf') format('truetype'); font-weight:400; font-style:italic; font-display:swap; }
    @font-face { font-family:'FactorA'; src:url('FactorA-Medium.otf') format('opentype'),url('FactorA-Medium.ttf') format('truetype'); font-weight:500; font-style:normal; font-display:swap; }
    @font-face { font-family:'FactorA'; src:url('FactorA-MediumItalic.otf') format('opentype'),url('FactorA-MediumItalic.ttf') format('truetype'); font-weight:500; font-style:italic; font-display:swap; }
    @font-face { font-family:'FactorA'; src:url('FactorA-Bold.otf') format('opentype'),url('FactorA-Bold.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
    @font-face { font-family:'FactorA'; src:url('FactorA-BoldItalic.otf') format('opentype'),url('FactorA-BoldItalic.ttf') format('truetype'); font-weight:700; font-style:italic; font-display:swap; }
    @font-face { font-family:'FactorA'; src:url('FactorA-Extrabold.otf') format('opentype'),url('FactorA-Extrabold.ttf') format('truetype'); font-weight:800; font-style:normal; font-display:swap; }
    @font-face { font-family:'FactorA'; src:url('FactorA-Black.otf') format('opentype'),url('FactorA-Black.ttf') format('truetype'); font-weight:900; font-style:normal; font-display:swap; }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --purple: #2F2A82;
      --purple-dark: #1E1A60;
      --purple-light: #4540A8;
      --purple-pale: #F0EFFA;
      --purple-mid: #3B358E;
      --white: #FFFFFF;
      --off-white: #F8F8FC;
      --gray-50: #F5F5F8;
      --gray-100: #EBEBF2;
      --gray-200: #D8D7E8;
      --gray-400: #9896B8;
      --gray-500: #6b6a8c;
      --gray-600: #5C5A80;
      --gray-800: #2A2850;
      --text: #1A1840;
      --radius: 16px;
      --radius-sm: 8px;
      --radius-xl: 24px;
      --shadow: 0 2px 16px rgba(47,42,130,0.08);
      --shadow-md: 0 8px 32px rgba(47,42,130,0.14);
      --shadow-lg: 0 20px 60px rgba(47,42,130,0.18);
      --accent: #22CBBF;
      --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
    }

    html {
      scroll-behavior: smooth;
      overflow-x: hidden;
      max-width: 100%;
    }

    body {
      font-family: 'FactorA', sans-serif;
      color: var(--text);
      background: var(--white);
      line-height: 1.6;
      overflow-x: clip;
      max-width: 100%;
    }

    /* ── NAV ─────────────────────────────────────── */
    #ambassador-nav-mount {
      display: block;
      width: 100%;
      max-width: 100%;
    }
    nav {
      position: fixed;
      top: 0; left: 0; right: 0;
      z-index: 200;
      height: 65px;
      max-width: 100%;
      background: var(--white);
      border-bottom: 1px solid #e8e8ee;
      box-sizing: border-box;
    }
    .nav-inner {
      max-width: 1130px;
      margin: 0 auto;
      padding: 0 clamp(20px, 5vw, 155px);
      height: 100%;
      min-width: 0;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .nav-left {
      display: flex; align-items: center; gap: 0;
      min-width: 0;
      flex: 1 1 auto;
    }
    .nav-logo {
      display: flex; align-items: center;
      text-decoration: none;
      margin-right: 20px;
    }
    .nav-logo img { height: 20px; display: block; }
    .brand-terrarossa .nav-logo img {
      background: transparent;
      height: 20px;
      width: auto;
      max-width: min(200px, 40vw);
      object-fit: contain;
      object-position: left center;
    }
    .nav-sep {
      width: 1px; height: 22px;
      background: #d0d0db;
      margin-right: 20px;
      flex-shrink: 0;
    }
    /* Weebora: Accademie / Vacanze / Tornei. Terrarossa: optional BRANDS.terrarossa.ambassadorNavLinks */
    body.brand-terrarossa .nav-sep { display: none; }
    body.brand-terrarossa .nav-left:has(.nav-links:not(:empty)) .nav-sep { display: block; }
    body.brand-terrarossa .nav-links:empty { display: none; }

    .nav-links {
      display: flex; align-items: center; gap: 4px;
    }
    .nav-link {
      font-size: 1rem;
      font-weight: 400;
      color: #1a1840;
      text-decoration: none;
      padding: 6px 12px;
      border-radius: 6px;
      transition: var(--transition);
      white-space: nowrap;
      display: flex; align-items: center; gap: 4px;
    }
    .nav-link:hover { background: none; color: var(--accent); }
    .nav-link .nav-chevron {
      width: 14px; height: 14px; color: #9896B8;
    }

    /* Di più dropdown */
    .nav-more { position: relative; }
    .nav-more-menu {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      background: var(--white);
      border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06);
      padding: 6px;
      min-width: 200px;
      z-index: 1100;
    }
    .nav-more:hover .nav-more-menu { display: block; }
    .nav-more-item {
      display: block;
      padding: 10px 14px;
      font-size: 0.875rem;
      color: #1a1840;
      text-decoration: none;
      border-radius: 8px;
      transition: var(--transition);
    }
    .nav-more-item:hover { background: var(--purple-pale); }

    .nav-right {
      display: flex; align-items: center; gap: 8px;
      flex-shrink: 0;
    }

    /* Nav icons */
    .nav-icon-btn {
      display: flex; align-items: center; justify-content: center;
      width: 36px; height: 36px;
      background: none;
      border: none;
      cursor: pointer;
      border-radius: 8px;
      color: #1a1840;
      transition: var(--transition);
      text-decoration: none;
    }
    .nav-icon-btn:hover { background: var(--gray-50); }
    .nav-icon-btn svg { width: 20px; height: 20px; }

    /* Language selector */
    .lang-selector { position: relative; }
    .lang-trigger {
      display: flex; align-items: center; gap: 6px;
      background: none;
      border: none;
      cursor: pointer;
      font-family: 'FactorA', sans-serif;
      font-size: 0.875rem;
      font-weight: 500;
      color: #1a1840;
      padding: 6px 8px;
      border-radius: 8px;
      transition: var(--transition);
    }
    .lang-trigger:hover { background: var(--gray-50); }
    /* Flag image used in trigger and dropdown */
    .flag-img {
      width: 26px; height: 26px;
      border-radius: 50%;
      object-fit: cover;
      display: block;
      flex-shrink: 0;
    }
    .lang-trigger .chevron {
      width: 13px; height: 13px; color: #9896B8;
      transition: transform var(--transition);
    }
    .lang-selector.open .chevron { transform: rotate(180deg); }

    .lang-dropdown {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      background: var(--white);
      border-radius: 14px;
      box-shadow: 0 4px 24px rgba(0,0,0,0.13), 0 0 0 1px rgba(0,0,0,0.07);
      min-width: 180px;
      padding: 6px;
      display: none;
      z-index: 1100;
    }
    .lang-selector.open .lang-dropdown { display: block; }
    .lang-option {
      display: flex; align-items: center; justify-content: space-between;
      width: 100%;
      background: none;
      border: none;
      font-family: 'FactorA', sans-serif;
      font-size: 0.9rem;
      font-weight: 500;
      color: #1a1840;
      padding: 11px 14px;
      border-radius: 8px;
      cursor: pointer;
      text-align: left;
      transition: var(--transition);
      gap: 12px;
    }
    .lang-option:hover { background: var(--gray-50); }
    .lang-option.active { font-weight: 700; text-decoration: underline; }

    .nav-eur {
      font-size: 0.875rem;
      font-weight: 500;
      color: #1a1840;
      padding: 0 4px;
    }

    /* Burger button */
    .nav-burger {
      display: none;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      width: 36px; height: 36px;
      background: none;
      border: none;
      cursor: pointer;
      padding: 4px;
      margin-left: 4px;
    }
    .nav-burger span {
      display: block;
      width: 22px;
      height: 2px;
      background: #1a1840;
      border-radius: 2px;
      transition: all 0.25s ease;
      transform-origin: center;
    }
    .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Mobile menu */
    .mobile-menu {
      display: none;
      position: fixed;
      top: 65px;
      left: 0; right: 0;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      background: #fff;
      border-bottom: 1px solid #e8e8ee;
      box-shadow: 0 8px 24px rgba(0,0,0,0.1);
      z-index: 999;
      padding: 20px 24px 28px;
      transform: translateY(-8px);
      opacity: 0;
      transition: opacity 0.2s ease, transform 0.2s ease;
      overflow-x: hidden;
    }
    .mobile-menu.open {
      display: block;
      transform: translateY(0);
      opacity: 1;
    }
    .mobile-menu-links {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-bottom: 20px;
    }
    .mobile-menu-links:empty {
      display: none;
      margin-bottom: 0;
    }
    .mobile-menu-links a {
      font-size: 1rem;
      font-weight: 500;
      color: #1a1840;
      text-decoration: none;
      padding: 10px 0;
      border-bottom: 1px solid #f0f0f0;
      transition: color 0.15s;
      max-width: 100%;
      overflow-wrap: anywhere;
      word-wrap: break-word;
    }
    .mobile-menu-links a:last-child { border-bottom: none; }
    .mobile-menu-links a:hover { color: var(--accent); }
    .mobile-menu-cta {
      display: inline-block;
      margin-top: 4px;
      width: 100%;
      max-width: 100%;
      text-align: center;
      white-space: normal;
      box-sizing: border-box;
    }

    .nav-cta {
      background: var(--purple);
      color: var(--white);
      font-family: 'FactorA', sans-serif;
      font-size: 0.85rem;
      font-weight: 700;
      padding: 9px 22px;
      border-radius: 50px;
      text-decoration: none;
      display: inline-block;
      transition: var(--transition);
      border: none;
      cursor: pointer;
      white-space: nowrap;
    }
    .nav-cta:hover { background: var(--purple-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(47,42,130,0.3); }
    /* Drawer CTA has both .nav-cta and .mobile-menu-cta — must not inherit nowrap from .nav-cta */
    a.nav-cta.mobile-menu-cta { white-space: normal; }

    /* ── FOOTER ──────────────────────────────────── */
    footer {
      background: var(--white);
      border-top: 1px solid #e8e8ee;
    }
    .footer-main {
      padding: 40px 48px 32px;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 48px;
    }
    .footer-logo img { height: 22px; display: block; }
    .brand-terrarossa .footer-logo img {
      background: transparent;
      height: 22px;
      width: auto;
      max-width: min(220px, 85vw);
      object-fit: contain;
      object-position: left center;
    }
    .footer-partners { }
    .footer-partners-label {
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: #ADADAD;
      margin-bottom: 16px;
    }
    .footer-logos {
      display: flex;
      align-items: center;
      gap: 28px;
      flex-wrap: wrap;
    }
    .footer-logos a {
      display: block;
      color: #ADADAD;
      transition: var(--transition);
      flex-shrink: 0;
    }
    .footer-logos a:hover { color: #888; }
    .footer-logos svg { display: block; height: 32px; width: auto; }
    .footer-nav { }
    .footer-nav a {
      display: block;
      font-size: 0.83rem;
      color: #1a1840;
      text-decoration: none;
      line-height: 2.2;
      transition: var(--transition);
    }
    .footer-nav a:hover { color: var(--purple); }
    .footer-bottom {
      padding: 18px 48px;
      border-top: 1px solid #e8e8ee;
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 12px;
    }
    .footer-copy { font-size: 0.78rem; color: #888; justify-self: start; }
    .footer-tagline {
      font-size: 0.82rem;
      font-weight: 500;
      color: #555;
      display: flex; align-items: center;
      line-height: 1;
      justify-self: center;
    }
    .footer-vat { font-size: 0.75rem; color: #aaa; justify-self: end; text-align: right; }


/* Shared responsive — nav & footer only */
@media (min-width: 1440px) {
  .nav-inner { max-width: none; padding: 0 155px; }
  footer .footer-main   { padding-left: 155px; padding-right: 155px; }
  footer .footer-bottom { padding-left: 155px; padding-right: 155px; }
}
@media (max-width: 1024px) {
  nav {
    padding: 0 20px;
    max-width: 100%;
  }
  /* One horizontal inset (nav) — avoid nav + .nav-inner padding double-count */
  .nav-inner {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }
  .nav-links { display: none; }
  .nav-sep { display: none; }
  .nav-burger { display: flex; }
  /* Bar CTA only — drawer CTA is outside <nav> (.mobile-menu .nav-cta) */
  nav .nav-right .nav-cta { display: none; }
  .nav-eur { display: none; }
  .mobile-menu {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
  footer .footer-main { padding: 40px 24px 28px; }
  footer .footer-bottom { padding: 18px 24px; }
}
@media (max-width: 768px) {
  nav .nav-right .nav-cta { display: none; }
  .nav-eur { display: none; }
  .footer-main { padding: 32px 24px 24px; }
  .footer-bottom { padding: 16px 24px; grid-template-columns: 1fr; gap: 4px; justify-items: center; text-align: center; }
  .footer-copy, .footer-vat { justify-self: center; text-align: center; }
  .footer-logos { gap: 20px; }
}
@media (max-width: 480px) {
  nav { padding: 0 16px; }
  .mobile-menu {
    padding-left: 16px;
    padding-right: 16px;
  }
}
