/* =====================
   BASE
===================== */
:root{
  --bg:#0b1220;
  --card:#ffffff;
  --text:#101828;
  --muted:#667085;
  --line:#e4e7ec;
  --brand:#101828;
  --accent:#1d4ed8;
  --accent-soft:rgba(29,78,216,.08);
  --accent-glow:rgba(29,78,216,.14);
  --radius:22px;
  --shadow:0 20px 45px rgba(16,24,40,.08);
  --shadow-lg:0 24px 60px rgba(16,24,40,.12);
  --max:1180px;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:Inter, system-ui, Arial, sans-serif;
  color:var(--text);
  background:#fff;
  line-height:1.5;
}

a{
  text-decoration:none;
  color:inherit;
}

.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:0 22px;
}

/* =====================
   HEADER
===================== */

.topbar{
  position:sticky;
  top:0;
  z-index:30;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(16,24,40,.06);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:78px;
  gap:18px;
}

.brand{
  display:flex;
  align-items:center;
  height:78px;
}

.logo-link{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
}

.site-logo{
  height:32px;
  width:auto;
  display:block;
}

/* =====================
   MENU
===================== */

.menu{
  display:flex;
  gap:24px;
  align-items:center;
  font-size:15px;
  color:#344054;
}

.menu > a,
.menu-parent{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 8px;
  font-weight:600;
  color:inherit;
  background:transparent;
  border:none;
  border-radius:12px;
  cursor:pointer;
  font:inherit;
  transition:
    color .18s ease,
    transform .18s ease;
}

.menu-parent-button{
  appearance:none;
  -webkit-appearance:none;
}

/* linea sotto animata */
.menu > a::after,
.menu-parent::after{
  content:'';
  position:absolute;
  left:8px;
  right:8px;
  bottom:-6px;
  height:3px;
  background:linear-gradient(90deg, #1d4ed8, #60a5fa);
  border-radius:999px;
  box-shadow:0 0 8px rgba(96,165,250,.65);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .25s ease;
}

.menu > a:hover,
.menu-parent:hover,
.menu-dropdown.open .menu-parent{
  color:#0b1f48;
  transform:translateY(-1px);
}

.menu > a:hover::after,
.menu-parent:hover::after,
.menu-dropdown.open .menu-parent::after{
  transform:scaleX(1);
}

.menu-dropdown{
  position:relative;
  display:flex;
  align-items:center;
}

.menu-caret{
  font-size:12px;
  line-height:1;
  transition:transform .18s ease;
}

.menu-dropdown:hover .menu-caret,
.menu-dropdown.open .menu-caret{
  transform:rotate(180deg);
}

.dropdown-panel{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  min-width:300px;
  background:rgba(255,255,255,.98);
  backdrop-filter:blur(12px);
  border:1px solid #e5eaf1;
  border-radius:20px;
  box-shadow:0 24px 60px rgba(16,24,40,.14);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:6px;
  opacity:0;
  visibility:hidden;
  transform:translateY(10px);
  transition:opacity .22s ease, transform .22s ease, visibility .22s ease;
  z-index:120;
}

.menu-dropdown:hover .dropdown-panel,
.menu-dropdown.open .dropdown-panel{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

.dropdown-panel a{
  display:block;
  padding:14px 16px;
  border-radius:14px;
  color:#344054;
  font-size:15px;
  font-weight:600;
  background:transparent;
  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

.dropdown-panel a:hover{
  background:linear-gradient(135deg, #e4efff, #d6e6ff);
  color:#0b1f48;
  transform:translateX(6px);
  box-shadow:
    inset 0 0 0 1px #bcd3ff,
    0 10px 24px rgba(29,78,216,.18);
}
/* =====================
   LANGUAGE + CTA
===================== */

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

.lang-link{
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  font-size:13px;
  font-weight:800;
  color:#475467;
  background:#fff;
  min-width:46px;
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.lang-link:hover{
  transform:translateY(-1px);
}

.lang-link.active{
  background:#101828;
  color:#fff;
  border-color:#101828;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:14px 22px;
  border-radius:18px;
  font-weight:700;
  font-size:15px;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
  cursor:pointer;
  border:none;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn-dark{
  background:var(--brand);
  color:#fff;
  box-shadow:var(--shadow);
  white-space:nowrap;
}

.btn-light{
  background:#fff;
  border:1px solid var(--line);
  color:var(--text);
}
/* =====================
   FOOTER
===================== */

.site-footer{
  background:#0f172a;
  color:#cbd5e1;
  padding:60px 0 30px;
  margin-top:60px;
}

.footer-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:40px;
}

.footer-logo{
  height:36px;
  width:auto;
  display:block;
  margin-bottom:16px;
}

.footer-links{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.footer-links a{
  color:#cbd5e1;
  transition:color .2s ease;
}

.footer-links a:hover{
  color:#fff;
}

/* SOCIAL */
.footer-social{
  display:flex;
  gap:14px;
  margin-top:10px;
}

.footer-social a{
  width:50px;
  height:50px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.04);
  border:2px solid rgba(255,255,255,0.32);
  transition:transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}

.footer-social a svg{
  width:24px;
  height:24px;
}

/* colori */
.footer-social a:nth-child(1){ color:#1877F2; }
.footer-social a:nth-child(2){ color:#E1306C; }
.footer-social a:nth-child(3){ color:#34E0A1; }

/* hover */
.footer-social a:nth-child(1):hover{
  background:#1877F2;
  color:#fff;
  border-color:#1877F2;
  transform:translateY(-3px) scale(1.05);
}

.footer-social a:nth-child(2):hover{
  background:radial-gradient(circle at 30% 30%, #feda75, #d62976, #962fbf, #4f5bd5);
  color:#fff;
  border-color:#d62976;
  transform:translateY(-3px) scale(1.05);
}

.footer-social a:nth-child(3):hover{
  background:#34E0A1;
  color:#000;
  border-color:#34E0A1;
  transform:translateY(-3px) scale(1.05);
}

.footer-bottom{
  margin-top:40px;
  border-top:1px solid rgba(255,255,255,0.1);
  padding-top:20px;
}

/* =====================
   TABLET
===================== */

@media (max-width:1024px){
  .footer-grid{
    grid-template-columns:1fr 1fr;
  }

  .menu{
    gap:18px;
    font-size:14px;
  }

  .dropdown-panel{
    min-width:280px;
  }
}

/* =====================
   MOBILE HEADER
===================== */

@media (max-width:768px){
  .nav{
    gap:10px;
    min-height:68px;
  }

  .brand{
    height:68px;
  }

  .menu{
    display:none;
  }

  .site-logo{
    height:30px;
  }

  .lang-switch{
    gap:6px;
  }

  .lang-link{
    min-width:40px;
    height:36px;
    padding:0 10px;
    font-size:13px;
  }

  .lang-switch .btn.btn-dark{
    padding:10px 14px;
    font-size:14px;
    border-radius:14px;
  }
}

/* =====================
   SMALL MOBILE
===================== */

@media (max-width:720px){
  .footer-grid{
    grid-template-columns:1fr;
    gap:28px;
  }

  .site-footer{
    padding:50px 0 26px;
  }

  .footer-social a{
    width:46px;
    height:46px;
    border-radius:14px;
  }
}

@media (max-width:560px){
  .wrap{
    padding:0 16px;
  }

  .site-logo{
    height:26px;
  }

  .lang-link{
    min-width:38px;
    height:34px;
    font-size:12px;
  }

  .lang-switch .btn.btn-dark{
    padding:9px 12px;
    font-size:13px;
  }
}