/*─────────────────────────────────────────────────────────────────────────────
  Studio One Informatica — layout.css v2.0
  Header + Footer condivisi per tutte le pagine
  Design: "Industrial Precision Tech" — navy · orange · glass · geometry
─────────────────────────────────────────────────────────────────────────────*/

/* ══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════════════════════════════ */
:root {
  /* Palette */
  --c-orange:      #ff6c3a;
  --c-orange-lt:   #ff8c5f;
  --c-orange-glow: rgba(255,108,58,.18);
  --c-navy:        #232c3b;
  --c-navy-dk:     #161d28;
  --c-navy-md:     #2d3a4e;
  --c-navy-glass:  rgba(35,44,59,.85);
  --c-gray:        #6a7483;
  --c-gray-lt:     #c6cad2;
  --c-bg:          #f9f9f9;
  --c-white:       #ffffff;

  /* Typography */
  --f-black:  'black',  'Nunito', sans-serif;
  --f-bold:   'bold',   'Nunito', sans-serif;
  --f-reg:    'regular','Nunito', sans-serif;
  --f-mono:   'Courier New', monospace;

  /* Layout */
  --topbar-h:  36px;
  --header-h:  88px;
  --header-sm: 64px;
  --total-h:   calc(var(--topbar-h) + var(--header-h));

  /* Effects */
  --shadow-header: 0 2px 24px rgba(0,0,0,.10);
  --shadow-drop:   0 4px 20px rgba(0,0,0,.18);
  --radius:        6px;
  --trans:         all .22s cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════════════════════════════════════════
   TOP BAR  (striscia navy sopra header)
══════════════════════════════════════════════════════════════════════════ */
#topbar {
  position: fixed;
  left: 0; top: 0; width: 100%;
  height: var(--topbar-h);
  background: var(--c-navy-dk);
  z-index: 200;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,108,58,.15);
}

/* Ticker tape scorrevole */
.topbar-ticker {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  overflow: hidden;
}
.ticker-track {
  display: flex;
  align-items: center;
  animation: ticker 30s linear infinite;
  gap: 0;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 28px;
  font-family: var(--f-reg);
  font-size: 12px;
  color: var(--c-gray-lt);
  border-right: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
}
.ticker-item i { color: var(--c-orange); font-size: 11px; }
.ticker-item a { color: var(--c-gray-lt); transition: color .15s; }
.ticker-item a:hover { color: var(--c-orange); }
.ticker-item strong { color: var(--c-white); font-family: var(--f-bold); }

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Right: orari + social mini */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 0 16px 0 0;
  flex-shrink: 0;
  margin-left: auto;
}
.topbar-hours {
  font-size: 11px;
  color: var(--c-gray-lt);
  font-family: var(--f-reg);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.topbar-hours i { color: var(--c-orange); }
.topbar-social { display: flex; align-items: center; gap: 8px; }
.topbar-social a {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 4px;
  color: var(--c-gray-lt);
  font-size: 12px;
  transition: var(--trans);
}
.topbar-social a:hover { color: var(--c-white); background: var(--c-orange); }

/* ══════════════════════════════════════════════════════════════════════════
   HEADER PRINCIPALE
══════════════════════════════════════════════════════════════════════════ */
#site-header {
  position: fixed;
  left: 0;
  top: var(--topbar-h);
  width: 100%;
  height: var(--header-h);
  background: var(--c-white);
  z-index: 199;
  box-shadow: var(--shadow-header);
  transition: height .2s cubic-bezier(.4,0,.2,1),
              background .2s ease,
              backdrop-filter .2s ease,
              top .2s ease;
  backface-visibility: hidden;
}

/* Bordo arancio animato in basso all'header */
#site-header::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--c-orange), #ff9a6c, var(--c-orange));
  background-size: 200% 100%;
  transition: width .4s ease;
  animation: borderPulse 3s ease-in-out infinite;
}
#site-header.scrolled::after { width: 100%; }

@keyframes borderPulse {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Glassmorphism on scroll */
#site-header.scrolled {
  height: var(--header-sm);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 2px 32px rgba(35,44,59,.12);
}

/* Header nascosto quando si è andati in cima con topbar */
#site-header.top-hidden {
  top: 0;
}

/* ── Header inner layout ───────────────────────────────────────────────── */
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
  padding: 0 8px;
}

/* ── Logo ─────────────────────────────────────────────────────────────── */
#logo-wrap {
  flex: 0 0 auto;
  padding: 0 20px 0 4px;
  display: flex; align-items: center;
}
#logo-wrap a {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
#logo-wrap img {
  height: 52px; width: auto;
  transition: height .2s ease;
}
#site-header.scrolled #logo-wrap img { height: 40px; }

/* Logo text accent — "Studio One" in monospace quando serve */
.logo-label {
  display: none; /* visibile solo su schermi molto grandi */
}
@media (min-width: 1400px) {
  .logo-label {
    display: flex; flex-direction: column;
    gap: 1px;
  }
  .logo-label .ll-top {
    font-family: var(--f-black);
    font-size: 13px; color: var(--c-navy);
    letter-spacing: 1px; text-transform: uppercase;
    line-height: 1;
  }
  .logo-label .ll-bot {
    font-family: var(--f-mono);
    font-size: 9px; color: var(--c-orange);
    letter-spacing: 3px; text-transform: uppercase;
    line-height: 1;
  }
}

/* ── Nav ──────────────────────────────────────────────────────────────── */
.header-nav-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

#main-nav {
  display: flex; align-items: center;
  list-style: none; padding: 0; margin: 0;
  height: 100%;
}

#main-nav > li {
  position: relative;
  height: 100%;
  display: flex; align-items: center;
}

#main-nav > li > a {
  display: flex; align-items: center; gap: 5px;
  padding: 0 16px;
  font-family: var(--f-reg);
  font-size: 14px;
  color: var(--c-navy);
  height: 100%;
  position: relative;
  transition: color .18s;
  white-space: nowrap;
}

/* Underline animata sul hover */
#main-nav > li > a::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--c-orange);
  transition: left .22s ease, right .22s ease;
}
#main-nav > li:hover > a::before,
#main-nav > li.active > a::before {
  left: 12px; right: 12px;
}
#main-nav > li:hover > a,
#main-nav > li.active > a { color: var(--c-orange); }

#main-nav > li > a .caret {
  font-size: 9px;
  transition: transform .2s ease;
  opacity: .6;
}
#main-nav > li:hover > a .caret { transform: rotate(180deg); }

/* ── Dropdown ─────────────────────────────────────────────────────────── */
.nav-drop {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.04);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s;
  z-index: 300;

  /* Freccia */
  &::before {
    content: '';
    position: absolute;
    top: -6px; left: 50%; transform: translateX(-50%);
    width: 12px; height: 6px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: var(--c-white);
  }
}

/* Aperto da JS — sia desktop (hover) sia mobile (click) */
.nav-drop.js-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.nav-drop a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--c-navy);
  transition: background .15s, color .15s, padding-left .15s;
  border-left: 2px solid transparent;
}
.nav-drop a i {
  width: 16px; text-align: center;
  color: var(--c-gray);
  font-size: 12px;
  transition: color .15s;
  flex-shrink: 0;
}
.nav-drop a:hover {
  background: var(--c-bg);
  color: var(--c-orange);
  padding-left: 22px;
  border-left-color: var(--c-orange);
}
.nav-drop a:hover i { color: var(--c-orange); }

/* ── Header Right ─────────────────────────────────────────────────────── */
.header-right {
  display: flex; align-items: center; gap: 10px;
  padding: 0 0 0 8px;
  flex-shrink: 0;
}

.hdr-phone {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 1px; padding-right: 6px;
}
.hdr-phone-main {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--f-bold);
  font-size: 16px;
  color: var(--c-navy);
  line-height: 1;
  transition: color .15s;
}
.hdr-phone-main i { color: var(--c-orange); font-size: 14px; }
.hdr-phone-main:hover { color: var(--c-orange); }

.hdr-phone-img { display: block; }
.hdr-phone-img img { height: 24px; width: auto; opacity: .8; }
.hdr-phone-img:hover img { opacity: 1; }

/* Status badge "online" — tocco hi-tech */
.hdr-status {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: #22c55e;
  letter-spacing: .5px;
  transition: color .3s ease;
}
.hdr-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,.3);
  animation: blink-online 2s ease-in-out infinite;
  flex-shrink: 0;
  transition: background .3s ease, box-shadow .3s ease;
}
@keyframes blink-online {
  0%,100% { box-shadow: 0 0 0 2px rgba(34,197,94,.3); }
  50%      { box-shadow: 0 0 0 4px rgba(34,197,94,.15); }
}
/* Stato OFFLINE */
.hdr-status.offline { color: #ef4444; }
.hdr-status.offline::before {
  background: #ef4444;
  animation: blink-offline 2s ease-in-out infinite;
}
@keyframes blink-offline {
  0%,100% { box-shadow: 0 0 0 2px rgba(239,68,68,.3); }
  50%      { box-shadow: 0 0 0 4px rgba(239,68,68,.15); }
}

/* CTA button preventivo */
.btn-hdr {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 20px;
  background: var(--c-orange);
  color: var(--c-white);
  font-family: var(--f-bold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: var(--radius);
  border: none;
  box-shadow: 0 2px 12px var(--c-orange-glow);
  transition: var(--trans);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
/* Shimmer effect */
.btn-hdr::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transition: left .5s ease;
}
.btn-hdr:hover {
  color: var(--c-white);
  background: var(--c-orange-lt);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,108,58,.4);
}
.btn-hdr:hover::before { left: 150%; }

/* ── Hamburger ─────────────────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  width: 40px; height: 40px;
  cursor: pointer;
  background: none; border: 1px solid rgba(35,44,59,.12);
  border-radius: var(--radius);
  gap: 5px;
  margin-left: auto;
  transition: var(--trans);
  flex-shrink: 0;
}
.hamburger:hover { border-color: var(--c-orange); }
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--c-navy);
  border-radius: 2px;
  transition: var(--trans);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hamburger.open { border-color: var(--c-orange); background: var(--c-orange-glow); }
.hamburger.open span { background: var(--c-orange); }

/* ── Content padding ──────────────────────────────────────────────────── */
#content-wrapper {
  padding-top: calc(var(--topbar-h) + var(--header-h));
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE MENU
══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  #topbar { display: none; }

  #site-header {
    top: 0;
    height: var(--header-sm);
  }
  #site-header.scrolled { height: var(--header-sm); }

  #content-wrapper { padding-top: var(--header-sm); }

  .hamburger { display: flex; }
  .topbar-right { display: none; }

  .header-nav-wrap {
    position: fixed;
    left: 0; top: var(--header-sm);
    width: 100%;
    height: calc(100dvh - var(--header-sm));
    background: var(--c-white);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    transform: translateX(-100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    z-index: 198;
    border-top: 3px solid var(--c-orange);
  }
  .header-nav-wrap.open { transform: translateX(0); }

  #main-nav {
    flex-direction: column;
    align-items: stretch;
    height: auto;
  }
  #main-nav > li {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--c-bg);
    /* Stagger animation */
    opacity: 0;
    transform: translateX(-16px);
    transition: opacity .3s ease, transform .3s ease;
  }
  .header-nav-wrap.open #main-nav > li { opacity: 1; transform: translateX(0); }
  .header-nav-wrap.open #main-nav > li:nth-child(1) { transition-delay: .05s; }
  .header-nav-wrap.open #main-nav > li:nth-child(2) { transition-delay: .1s; }
  .header-nav-wrap.open #main-nav > li:nth-child(3) { transition-delay: .15s; }
  .header-nav-wrap.open #main-nav > li:nth-child(4) { transition-delay: .2s; }

  #main-nav > li > a {
    height: auto;
    padding: 16px 24px;
    font-size: 18px;
    justify-content: space-between;
  }
  #main-nav > li > a::before { display: none; }

  .nav-drop {
    position: static;
    transform: none;
    box-shadow: none;
    border-radius: 0;
    background: var(--c-bg);
    padding: 4px 0;
    opacity: 1;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, visibility .3s;
    pointer-events: none;
  }
  .nav-drop::before { display: none; }
  .nav-drop.mobile-open {
    visibility: visible;
    max-height: 500px;
    pointer-events: all;
  }
  .nav-drop a {
    font-size: 15px;
    padding: 10px 36px;
    border-left: none;
    border-top: 1px solid rgba(0,0,0,.04);
    color: var(--c-navy);        /* forza testo visibile su mobile */
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .nav-drop a i {
    color: var(--c-gray);
    font-size: 13px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
  }
  .nav-drop a:hover {
    padding-left: 42px;
    color: var(--c-orange);
  }
  .nav-drop a:hover i { color: var(--c-orange); }

  .header-right {
    padding: 20px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    border-top: 1px solid var(--c-bg);
    opacity: 0; transform: translateX(-16px);
    transition: opacity .3s ease .25s, transform .3s ease .25s;
  }
  .header-nav-wrap.open .header-right { opacity: 1; transform: translateX(0); }

  .hdr-phone { align-items: flex-start; }
  .btn-hdr { width: 100%; justify-content: center; padding: 14px 20px; }
}

@media (min-width: 992px) {
  .header-right { display: flex !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════════════ */
footer {
  position: relative;
  background: var(--c-navy);
  color: var(--c-gray-lt);
  font-size: 14px;
  line-height: 22px;
  font-family: var(--f-reg);
}

/* Linea arancio animata top footer */
footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg,
    var(--c-navy-dk) 0%,
    var(--c-orange) 30%,
    #ff9a6c 50%,
    var(--c-orange) 70%,
    var(--c-navy-dk) 100%
  );
  background-size: 200% 100%;
  animation: gradLine 4s linear infinite;
}
@keyframes gradLine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Footer main body */
.footer-body { padding: 56px 0 20px; }

/* Footer col */
.footer-col { margin-bottom: 40px; }
.footer-col .fc-title {
  font-family: var(--f-black);
  font-size: 15px;
  color: var(--c-white);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
  position: relative;
  padding-bottom: 10px;
}
.footer-col .fc-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 28px; height: 2px;
  background: var(--c-orange);
  border-radius: 2px;
}
.footer-col p {
  color: var(--c-gray-lt);
  line-height: 1.75;
  font-size: 13.5px;
}

/* Geek detail: circuit pattern sul testo about */
.footer-about-text {
  position: relative;
  padding-left: 0;
}

/* Footer links */
.footer-links { padding: 0; margin: 0; list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a {
  color: var(--c-gray-lt);
  font-size: 13.5px;
  display: flex; align-items: center; gap: 7px;
  transition: color .15s, padding-left .15s;
}
.footer-links a i {
  font-size: 10px;
  color: var(--c-orange);
  opacity: 0;
  transition: opacity .15s;
  flex-shrink: 0;
}
.footer-links a:hover {
  color: var(--c-white);
  padding-left: 6px;
}
.footer-links a:hover i { opacity: 1; }

/* Footer contact items */
.footer-contact-item {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 14px;
}
.footer-contact-item .fci-icon {
  width: 34px; height: 34px;
  background: rgba(255,108,58,.12);
  border: 1px solid rgba(255,108,58,.2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.footer-contact-item .fci-icon i { color: var(--c-orange); font-size: 13px; }
.footer-contact-item .fci-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-gray-lt);
}
.footer-contact-item .fci-text a { color: var(--c-white); transition: color .15s; }
.footer-contact-item .fci-text a:hover { color: var(--c-orange); }
.footer-contact-item .fci-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-gray);
  font-family: var(--f-mono);
  margin-bottom: 1px;
}

/* Social icons */
.footer-social { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  transition: var(--trans);
  position: relative;
  overflow: hidden;
}
.footer-social a::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--c-orange);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .25s ease;
}
.footer-social a img,
.footer-social a i {
  position: relative; z-index: 1;
  width: 18px; height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .65;
  transition: opacity .2s;
  font-size: 16px; color: rgba(255,255,255,.65);
}
.footer-social a:hover::before { transform: scaleY(1); }
.footer-social a:hover img,
.footer-social a:hover i { opacity: 1; }

/* ── Footer Line (contacts strip) ─────────────────────────────────────── */
.footer-line {
  background: var(--c-navy-dk);
  border-top: 1px solid rgba(255,255,255,.04);
  padding: 4px 0;
}
.footer-line-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 12px;
  border-right: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
}
.footer-line-item:hover { background: rgba(255,108,58,.04); }
.footer-line-item:last-child { border-right: none; }

.fli-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  position: relative;
}
.fli-icon img { width: 44px; height: 44px; object-fit: contain; }

.fli-text { flex: 1; min-width: 0; }
.fli-text .fli-label {
  font-family: var(--f-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--c-orange);
  line-height: 1;
  margin-bottom: 3px;
}
.fli-text a, .fli-text span {
  display: block;
  font-family: var(--f-bold);
  font-size: 14px;
  color: var(--c-white);
  line-height: 1.3;
  transition: color .15s;
}
.fli-text a:hover { color: var(--c-orange); }

/* ── Footer Bottom ──────────────────────────────────────────────────────*/
.footer-bottom {
  background: var(--c-navy-dk);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 14px 0;
}
.footer-menu {
  display: flex; flex-wrap: wrap; gap: 0 20px;
  list-style: none; padding: 0; margin: 0;
}
.footer-menu a {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  transition: color .15s;
}
.footer-menu a:hover { color: var(--c-orange); }

.footer-copyright {
  text-align: right;
  font-size: 12px;
  color: rgba(255,255,255,.35);
  font-family: var(--f-mono);
}
.footer-copyright span { color: var(--c-orange); }

/* Tech badge footer */
.footer-tech-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: rgba(255,255,255,.25);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 3px;
  padding: 3px 8px;
  margin-top: 4px;
}
.footer-tech-badge i { color: var(--c-orange); font-size: 9px; }

@media (max-width: 767px) {
  .footer-bottom .footer-copyright { text-align: left; margin-top: 6px; }
  .footer-line-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.04); }
  .footer-line-item:last-child { border-bottom: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   FLOATING BUTTONS CLUSTER (WhatsApp + AI Chat)
══════════════════════════════════════════════════════════════════════════ */
.float-cluster {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Etichette tooltip */
.float-btn-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.float-tooltip {
  background: var(--c-navy-dk);
  color: var(--c-white);
  font-family: var(--f-bold);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.float-btn-wrap:hover .float-tooltip {
  opacity: 1;
  transform: translateX(0);
}
.float-tooltip::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid var(--c-navy-dk);
}
.float-tooltip { position: relative; }

/* Base button */
.float-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  text-decoration: none;
  flex-shrink: 0;
}
.float-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}
.float-btn img { width: 30px; height: 30px; object-fit: contain; }
.float-btn i { font-size: 24px; }

/* WhatsApp */
.float-btn-wa {
  background: #25D366;
  color: #fff;
}
/* Pulse ring WhatsApp */
.float-btn-wa::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #25D366;
  opacity: .35;
  animation: fPulse 2.5s ease-out infinite;
}
@keyframes fPulse {
  0%   { transform: scale(1); opacity: .35; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { opacity: 0; }
}

/* AI Chat button — stili gestiti da chat.css */
/* 24H badge */
.float-btn-ai .ai-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--c-orange);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 8px;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 3px;
  letter-spacing: .5px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  animation: badgePop .5s ease;
}
@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE OTTIMIZZAZIONI AGGIUNTIVE (fix touch / overflow / float-buttons)
══════════════════════════════════════════════════════════════════════════ */

/* Blocca scroll orizzontale a livello root */
html { overflow-x: hidden; }

@media (max-width: 576px) {
  /* Float buttons: sposta verso il basso per non coprire contenuto */
  .float-cluster { right: 14px; bottom: 16px; gap: 8px; }
  .float-btn { width: 48px; height: 48px; }
  .float-tooltip { display: none; }

  /* Footer menu su mobile: wrap su più righe */
  .footer-menu { flex-wrap: wrap; gap: 4px 14px; }
  .footer-copyright { font-size: 12px; }

  /* Topbar ticker testo più piccolo */
  .ticker-item { font-size: 11px; }

  /* Cookie bar più compatta */
  #cookie-bar { flex-direction: column; gap: 8px; text-align: center; padding: 12px 16px; }
  #cookie-bar p { margin: 0; }
}

@media (max-width: 400px) {
  :root { --header-sm: 58px; }
  .hdr-phone-main { font-size: 13px; }
  .btn-hdr { font-size: 12px; padding: 10px 14px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE NAVBAR LOGO nel pannello — nascosto su desktop
══════════════════════════════════════════════════════════════════════════ */
.mob-nav-logo { display: none; }
.mob-icon     { display: none; }

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE NAVBAR — Smartphone only (≤ 767px)
   Ridisegna il pannello con logo fisso in cima e icone per ogni voce
══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── Logo nella barra header: riempie la testata con margine ─────── */
  #logo-wrap img { height: 52px !important; }
  #site-header.scrolled #logo-wrap img { height: 52px !important; }

  /* ── Logo nel pannello: nascosto (già visibile in testata) ─────────── */
  .mob-nav-logo { display: none !important; }

  /* ── Icone mobili: box stile desktop ──────────────────────────────── */
  .mob-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: rgba(35,44,59,.07);
    font-size: 13px;
    color: var(--c-navy);
    flex-shrink: 0;
    transition: background .15s, color .15s;
  }

  /* Icone Web Agency e Shop (già presenti nel DOM): stesso trattamento */
  #main-nav > li > a > i:not(.caret):not(.mob-icon) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    border-radius: 7px;
    background: rgba(255,108,58,.10) !important;
    font-size: 13px !important;
    margin-right: 0 !important;
    flex-shrink: 0;
    transition: background .15s;
  }

  /* Allineamento link con icona a sinistra, caret a destra */
  #main-nav > li > a {
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
  }
  #main-nav > li > a .caret { margin-left: auto; font-size: 12px; }

  /* Highlight icona quando voce attiva o hover */
  #main-nav > li > a:hover .mob-icon,
  #main-nav > li.active > a .mob-icon,
  #main-nav > li > a.active .mob-icon {
    background: rgba(255,108,58,.18);
    color: var(--c-orange);
  }
  #main-nav > li > a:hover > i:not(.caret):not(.mob-icon),
  #main-nav > li.active > a > i:not(.caret):not(.mob-icon) {
    background: rgba(255,108,58,.22) !important;
  }
}
