/* ============================================
   B2B Common Styles
   Shared CSS for all B2B pages
   ============================================ */

/* --- Gradient Animations --- */
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes gradientShift {
  0%, 100% { opacity: 1; transform: translateX(0); }
  50% { opacity: 0.8; transform: translateX(20px); }
}

/* --- Gradient Utilities --- */
.gradient-title {
  background: linear-gradient(135deg, #4d96ff 0%, #6bcb77 33%, #ff6b6b 66%, #a95cbb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 8s ease infinite;
  background-size: 200% 200%;
}

.gradient-tagline {
  font-size: 0.8rem;
  margin-top: 3px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #4d96ff 0%, #6bcb77 33%, #ff6b6b 66%, #a95cbb 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 8s ease infinite;
}

.gradient-icon {
  background: linear-gradient(135deg, #4d96ff 0%, #6bcb77 33%, #ff6b6b 66%, #a95cbb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* --- B2B Language Switcher --- */

/* Desktop: bandierine accanto al nav */
.lang-switcher-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switcher-header .lang-flag {
  display: inline-flex;
  text-decoration: none;
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.lang-switcher-header .lang-flag img {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.lang-switcher-header .lang-flag:hover {
  opacity: 0.85;
  transform: scale(1.1);
}

.lang-switcher-header .lang-flag.active {
  opacity: 1;
  transform: scale(1.15);
}

.lang-switcher-header .lang-flag.active img {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.7);
}

/* Mobile: bandierine dentro il pannello hamburger, nascondi il blocco header */
@media (max-width: 1199px) {
  .lang-switcher-header {
    display: none !important;
  }

  /* Riga bandiere dentro il nav mobile */
  .lang-switcher-mobile {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 14px 28px 10px;
    margin: 8px 12px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .lang-switcher-mobile .lang-flag {
    display: inline-flex;
    text-decoration: none;
    opacity: 0.45;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
  }

  .lang-switcher-mobile .lang-flag img {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  .lang-switcher-mobile .lang-flag:hover {
    opacity: 0.85;
    transform: scale(1.1);
  }

  .lang-switcher-mobile .lang-flag.active {
    opacity: 1;
    transform: scale(1.12);
  }

  .lang-switcher-mobile .lang-flag.active img {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.7);
  }
}

/* Su schermi grandi: nascondi la versione mobile */
@media (min-width: 1200px) {
  .lang-switcher-mobile {
    display: none !important;
  }
}

/* --- B2B Header --- */
.header.b2b-header {
  background: rgba(26, 26, 46, 0.95) !important;
  z-index: 997 !important;
  padding: 10px 0;
  transition: all 0.4s ease;
}

.header.b2b-header .logo {
  display: flex !important;
  align-items: center !important;
  line-height: normal;
}

.header.b2b-header .logo > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header.b2b-header .logo img {
  max-height: 70px !important;
  transition: max-height 0.4s ease;
}

.header.b2b-header .logo .site-name {
  font-size: 1.2rem;
  transition: font-size 0.4s ease;
  line-height: 1.2;
}

.header.b2b-header .logo .gradient-tagline {
  transition: all 0.3s ease;
}

/* B2B Header compatto quando si scrolla */
body.scrolled .header.b2b-header {
  padding: 4px 0 !important;
}

body.scrolled .header.b2b-header .logo img {
  max-height: 32px !important;
}

body.scrolled .header.b2b-header .logo .site-name {
  font-size: 0.9rem;
}

body.scrolled .header.b2b-header .logo .gradient-tagline {
  font-size: 0;
  margin: 0;
  opacity: 0;
}

/* Su mobile: tagline nascosta, site-name centrato verticalmente */
@media (max-width: 767px) {
  .header.b2b-header .logo .gradient-tagline {
    display: none !important;
  }
  .header.b2b-header .logo .site-name {
    line-height: 1;
  }
}

/* --- Section Titles --- */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1a1a2e;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 50px;
}

/* --- CTA Buttons --- */
.cta-button {
  background: #343A40;
  color: white;
  padding: 15px 40px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  font-size: 1.1rem;
}

.cta-button:hover {
  background: #23272b;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(52, 58, 64, 0.3);
  color: white;
}

.cta-button-gradient {
  background: linear-gradient(135deg, #4d96ff 0%, #6bcb77 33%, #ff6b6b 66%, #a95cbb 100%);
  background-size: 200% 200%;
  animation: gradientFlow 8s ease infinite;
  color: white;
  padding: 15px 40px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  font-size: 1.1rem;
}

.cta-button-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  color: white;
}

/* --- Feature Cards --- */
.feature-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  font-size: 3rem;
  color: #343A40;
  margin-bottom: 20px;
}

/* --- B2B Hamburger Menu Styles --- */
@media (max-width: 1199px) {

  /* Bottone hamburger - bianco, glassmorphism */
  .b2b-page .mobile-nav-toggle {
    color: #ffffff;
    font-size: 28px;
    line-height: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .b2b-page .mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(77, 150, 255, 0.25);
  }

  .b2b-page .mobile-nav-toggle:active {
    transform: scale(0.95);
  }

  /* Bottone X quando menu è aperto - bianco sul pannello scuro */
  .b2b-page.mobile-nav-active .mobile-nav-toggle {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    font-size: 26px;
    z-index: 9999;
    position: fixed;
    top: 22px;
    right: 22px;
  }

  .b2b-page.mobile-nav-active .mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
  }

  /* Pannello menu - scuro, scorre da destra, non full-width */
  .b2b-page .navmenu ul {
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5) !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 78vw !important;
    max-width: 340px !important;
    padding: 100px 0 40px !important;
    margin: 0 !important;
    transform: translateX(100%) !important;
    opacity: 1 !important;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
    overflow-y: auto;
    display: block !important;
    border-left: 1px solid rgba(77, 150, 255, 0.15) !important;
  }

  .b2b-page.mobile-nav-active .navmenu > ul {
    transform: translateX(0) !important;
  }

  /* Linea decorativa gradient in cima al pannello */
  .b2b-page .navmenu ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4d96ff, #6bcb77, #ff6b6b, #a95cbb);
    background-size: 200% 200%;
    animation: gradientFlow 4s ease infinite;
  }

  /* Voci di menu - testo bianco */
  .b2b-page .navmenu a,
  .b2b-page .navmenu a:focus {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 16px;
    padding: 15px 28px;
    margin: 3px 12px;
    border-radius: 10px;
    background: transparent;
    border-left: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    letter-spacing: 0.3px;
  }

  .b2b-page .navmenu a::before {
    display: none !important;
  }

  .b2b-page .navmenu a:hover,
  .b2b-page .navmenu .active,
  .b2b-page .navmenu .active:focus {
    color: #ffffff !important;
    background: rgba(77, 150, 255, 0.12) !important;
    border-left-color: #4d96ff;
    transform: translateX(4px) !important;
    box-shadow: 0 4px 20px rgba(77, 150, 255, 0.15) !important;
  }

  /* Overlay semi-trasparente a sinistra */
  .b2b-page.mobile-nav-active .navmenu {
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }

  /* Animazione entrata voci menu */
  .b2b-page.mobile-nav-active .navmenu a {
    animation: b2bSlideIn 0.35s ease-out both;
  }
  .b2b-page.mobile-nav-active .navmenu li:nth-child(1) a { animation-delay: 0.08s; }
  .b2b-page.mobile-nav-active .navmenu li:nth-child(2) a { animation-delay: 0.13s; }
  .b2b-page.mobile-nav-active .navmenu li:nth-child(3) a { animation-delay: 0.18s; }
  .b2b-page.mobile-nav-active .navmenu li:nth-child(4) a { animation-delay: 0.23s; }
  .b2b-page.mobile-nav-active .navmenu li:nth-child(5) a { animation-delay: 0.28s; }
  .b2b-page.mobile-nav-active .navmenu li:nth-child(6) a { animation-delay: 0.33s; }
  .b2b-page.mobile-nav-active .navmenu li:nth-child(7) a { animation-delay: 0.38s; }

  @keyframes b2bSlideIn {
    from {
      opacity: 0;
      transform: translateX(30px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}

/* --- B2B Scroll to Top Button --- */
.b2b-page .scroll-top {
  background: linear-gradient(135deg, #4d96ff 0%, #6bcb77 33%, #ff6b6b 66%, #a95cbb 100%);
  background-size: 200% 200%;
  animation: gradientFlow 8s ease infinite;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(77, 150, 255, 0.4);
  transition: all 0.3s ease;
}

.b2b-page .scroll-top:hover {
  background: linear-gradient(135deg, #4d96ff 0%, #6bcb77 33%, #ff6b6b 66%, #a95cbb 100%);
  background-size: 200% 200%;
  animation: gradientFlow 4s ease infinite;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 25px rgba(77, 150, 255, 0.6);
}

.b2b-page .scroll-top i {
  color: #ffffff;
  font-size: 26px;
}

.b2b-page .scroll-top:active {
  transform: translateY(-2px) scale(1.05);
}

/* Hide scroll-top button on desktop */
@media (min-width: 992px) {
  .b2b-page .scroll-top {
    display: none !important;
  }
}

/* --- B2B Dark Section Background --- */
.b2b-dark-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.b2b-dark-section-overlay {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(77, 150, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(255, 102, 196, 0.1) 0%, transparent 50%);
  animation: gradientShift 10s ease infinite;
  pointer-events: none;
}

/* --- B2B PDF Section --- */
.b2b-pdf-section {
  padding-top: 120px;
  padding-bottom: 60px;
  background: #f8f9fa;
  min-height: calc(100vh - 200px);
}

.b2b-pdf-section h1 {
  color: #1a1a2e;
  font-weight: 700;
  margin-bottom: 30px;
}

.b2b-pdf-section object {
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.b2b-pdf-section .pdf-fallback {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.b2b-pdf-section .pdf-fallback a {
  color: #4D96FF;
  font-weight: 600;
}

/* --- Demo Panel Gradient --- */
.demo-panel-gradient {
  background: linear-gradient(135deg, #4d96ff 0%, #6bcb77 33%, #ff6b6b 66%, #a95cbb 100%);
  background-size: 200% 200%;
  animation: gradientFlow 8s ease infinite;
  color: white;
}

/* --- Demo Modal Image --- */
.demo-modal-image {
  width: 100%;
  border-radius: 10px;
  margin: 10px 0;
}

/* --- Tech Badge --- */
.tech-badge {
  display: inline-block;
  background: #f0f0f0;
  padding: 8px 16px;
  border-radius: 20px;
  margin: 5px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Screenshot Preview --- */
.screenshot-preview {
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  height: auto;
  margin: 20px 0;
}
