/* ═══════════════════════════════════════════
   BONUS DIGITALE – SHARED STYLESHEET
   Advanced Solutions / Mr. Foschino
═══════════════════════════════════════════ */

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Manrope', sans-serif;
  background: #0d0d0d;
  color: #fff;
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ─── TOKENS ─── */
:root {
  --purple:      #7a00df;
  --purple-mid:  #9c2ff5;
  --purple-dark: #5a00a8;
  --purple-glow: rgba(122,0,223,.35);
  --dark:        #0d0d0d;
  --dark-2:      #161616;
  --dark-3:      #1e1e1e;
  --gray:        #313131;
  --muted:       rgba(255,255,255,.55);
  --white:       #fff;
  --green:       #4ade80;
  --red:         #f87171;
  --gold:        #f59e0b;
  --grad:        linear-gradient(135deg, #5a00a8, #7a00df 55%, #9c2ff5);
}

/* ─── UTILS ─── */
.container { max-width: 1120px; margin: 0 auto; }
section { padding: 5rem 1.5rem; }

.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: #c084fc;
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.75;
}
.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(122,0,223,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122,0,223,.04) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

/* ─── BUTTONS ─── */
.btn-grad {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  background: var(--grad);
  color: #fff;
  padding: .9rem 2.1rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 4px 24px var(--purple-glow);
  transition: transform .25s, box-shadow .25s;
  border: none;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
}
.btn-grad:hover { transform: translateY(-3px); box-shadow: 0 10px 36px var(--purple-glow); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  background: transparent;
  color: #fff;
  padding: .85rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: .93rem;
  border: 2px solid rgba(122,0,223,.6);
  transition: background .2s, border-color .2s;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
}
.btn-outline:hover { background: rgba(122,0,223,.12); border-color: var(--purple); }

/* ═══════════════════════════════════════════
   HEADER & NAV
═══════════════════════════════════════════ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background .35s, box-shadow .35s;
}
#header.scrolled {
  background: rgba(13,13,13,.93);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 24px rgba(122,0,223,.18);
}
.logo img { height: 40px; width: auto; display: block; }

/* Desktop nav */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: .25rem;
}
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: block;
  padding: .5rem .9rem;
  font-size: .88rem;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  border-radius: 8px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li.active > a { color: #fff; background: rgba(122,0,223,.12); }
.nav-links > li.active > a { color: #c084fc; }

/* Dropdown */
.has-drop > a::after { content: ' ▾'; font-size: .7rem; }
.has-drop {
  /* estende l'area hover verso il basso per coprire il gap */
  padding-bottom: .6rem;
  margin-bottom: -.6rem;
}
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1a1a1a;
  border: 1px solid rgba(122,0,223,.25);
  border-radius: 14px;
  padding: .6rem;
  list-style: none;
  min-width: 230px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 100;
  margin-top: .4rem;
}
.has-drop:hover .dropdown { display: block; }
/* ponte trasparente che copre il gap tra nav item e dropdown */
.has-drop::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: .6rem;
  background: transparent;
}
.dropdown li a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .9rem;
  font-size: .84rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  border-radius: 8px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.dropdown li a:hover { background: rgba(122,0,223,.15); color: #fff; }
.dropdown li a .di { font-size: .8rem; width: 18px; text-align: center; color: #c084fc; }

.header-btn {
  background: var(--grad);
  color: #fff;
  padding: .55rem 1.3rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}
.header-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 22px var(--purple-glow); }

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: .25rem;
}

/* Mobile nav overlay */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,13,13,.97);
  z-index: 998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  transition: color .2s;
}
.nav-mobile a:hover { color: #c084fc; }
.nav-mobile .close-btn {
  position: absolute;
  top: 1.5rem; right: 1.75rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}
.mob-servizi-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.mob-sub-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  padding: .3rem;
  line-height: 1;
  transition: color .2s;
}
.mob-sub-toggle i { transition: transform .3s; display: block; }
.mob-sub-toggle.open i { transform: rotate(180deg); }
.nav-mobile .mob-sub {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.nav-mobile .mob-sub.open { display: flex; }
.nav-mobile .mob-sub a { font-size: .95rem; color: var(--muted); font-weight: 600; }
.nav-mobile .mob-sub a:hover { color: #c084fc; }
.nav-mobile .mob-cta {
  margin-top: 1rem;
  background: var(--grad);
  color: #fff;
  padding: .9rem 2.5rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
footer {
  background: #080808;
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 3rem 1.5rem 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand .logo img { height: 34px; margin-bottom: 1rem; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.4); line-height: 1.7; max-width: 240px; }
.footer-col h4 { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.4); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer-col ul li a { font-size: .88rem; color: rgba(255,255,255,.5); transition: color .2s; }
.footer-col ul li a:hover { color: #c084fc; }
.footer-col .contact-item { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .6rem; font-size: .88rem; color: rgba(255,255,255,.5); }
.footer-col .contact-item i { color: #c084fc; margin-top: 2px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.3); }
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  transition: background .2s, color .2s;
}
.footer-social a:hover { background: var(--purple); color: #fff; }

.footer-legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-legal a {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.38);
  transition: color .2s;
}
.footer-legal a:hover { color: #c084fc; }

/* ═══════════════════════════════════════════
   PAGE HERO (inner pages)
═══════════════════════════════════════════ */
.page-hero {
  padding: 140px 1.5rem 5rem;
  background:
    radial-gradient(ellipse 60% 60% at 70% 50%, rgba(122,0,223,.13), transparent),
    var(--dark);
  position: relative;
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.page-hero-eyebrow a { color: var(--muted); transition: color .2s; }
.page-hero-eyebrow a:hover { color: #c084fc; }
.page-hero-eyebrow span { color: rgba(255,255,255,.25); }
.page-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.1rem;
}
.page-hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.75;
}

/* ═══════════════════════════════════════════
   SHARED CARD STYLES
═══════════════════════════════════════════ */
.card-glass {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 1.75rem;
  transition: transform .3s, border-color .3s, background .3s;
}
.card-glass:hover {
  transform: translateY(-5px);
  border-color: rgba(122,0,223,.4);
  background: rgba(122,0,223,.07);
}
.icon-box {
  width: 48px; height: 48px;
  background: var(--grad);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

/* Stars */
.stars { color: var(--gold); font-size: .9rem; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .header-btn { display: none; }
}
@media (max-width: 600px) {
  section { padding: 3.5rem 1.1rem; }
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
