:root {
  /* Colors */
  --c-white: #ffffff;
  --c-light-gray: #f8f9fb;
  --c-border: #e2e8f0;
  --c-text-primary: #1e293b;
  --c-text-secondary: #475569;
  
  --c-navy: #0f172a;
  --c-charcoal: #111827;
  --c-electric-blue: #0ea5e9;
  --c-cyan: #06b6d4;
  
  /* Typography */
  --font-main: 'Inter', sans-serif;
  
  /* Spacing */
  --section-padding: 100px 0;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  color: var(--c-text-primary);
  line-height: 1.6;
  font-size: 16px;
}

body {
  background-color: var(--c-white);
  overflow-x: hidden;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center { text-align: center; }
.bg-light { background-color: var(--c-light-gray); }
.mt-4 { margin-top: 3rem; }
.mb-4 { margin-bottom: 3rem; }

.section {
  padding: var(--section-padding);
}

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-text-secondary);
  margin-bottom: 1rem;
  font-weight: 500;
}

h1, h2, h3, h4 {
  color: var(--c-charcoal);
  font-weight: 600;
  line-height: 1.2;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
}

p {
  color: var(--c-text-secondary);
  font-size: 1.125rem;
  line-height: 1.8;
}

.section-subtitle {
  max-width: 700px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-cyan) 0%, #0284c7 100%);
  color: var(--c-white);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.5);
}

.btn-outline {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--c-white);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: var(--transition-smooth);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
  transition: var(--transition-smooth);
}

/* Make logo white initially if background is dark, but the provided logo is colored. We might need a filter or let it be. Assuming standard dark text logo, we might need a white version. Since we don't have one, we make navbar text white on hero, but logo might not be legible. If scrolled, background is white, logo is visible. To ensure logo visibility on hero, we'll keep it as is, maybe with a drop shadow or CSS brightness */
.navbar:not(.scrolled) .logo img {
  border-radius: 6px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--c-white);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--c-cyan);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after {
  width: 100%;
}

.navbar.scrolled .nav-links a {
  color: var(--c-text-primary);
}

.navbar:not(.scrolled) .btn-primary {
  background-color: var(--c-navy);
  color: var(--c-white);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: none;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--c-white);
  margin-bottom: 5px;
  transition: 0.3s;
}

.navbar.scrolled .mobile-menu-btn span {
  background-color: var(--c-charcoal);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--c-white);
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  flex-direction: column;
  gap: 15px;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--c-text-primary);
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border);
}

/* 1. Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  color: var(--c-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/hero-bg.png');
  background-size: cover;
  background-position: center;
  z-index: -1;
  background-color: var(--c-navy);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(15,23,42,0.8));
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--c-white);
  font-size: 4rem;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero .subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 1.25rem;
  margin-bottom: 3rem;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* 2. Identità aziendale */
.identita-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: center;
}

/* 3. Tappe della crescita */
.timeline-container {
  width: 100%;
  padding: 40px 0;
}

.timeline-glass-wrapper {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
  margin: 0 auto;
  max-width: 1000px;
}

.timeline-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.quote {
  font-size: 1.5rem;
  color: var(--c-charcoal);
  font-weight: 500;
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
}

/* 4. Chi siamo */
.chi-siamo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.chi-siamo-image-card {
  position: relative;
  border-radius: 16px;
  background: var(--c-white);
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.1);
  z-index: 1;
}

.chi-siamo-image-card::before {
  content: '';
  position: absolute;
  top: 20px;
  right: -20px;
  bottom: -20px;
  left: 20px;
  background: linear-gradient(135deg, var(--c-cyan) 0%, rgba(6, 182, 212, 0.2) 100%);
  border-radius: 16px;
  z-index: -1;
}

.image-wrapper {
  overflow: hidden;
}

.boss-img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-smooth);
}

.chi-siamo-image-card:hover .boss-img {
  transform: scale(1.05);
}

.card-info {
  padding: 24px;
}

.card-info h3 {
  margin-bottom: 4px;
  font-size: 1.25rem;
}

.card-info p {
  font-size: 0.9rem;
  color: var(--c-text-secondary);
}

/* 5. Servizi */
.servizi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--c-white);
  padding: 40px 30px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.5);
  text-align: left;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.04);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.08), transparent 70%);
  opacity: 0;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.2);
}

.service-card:hover::before {
  opacity: 1;
}

.icon-wrapper {
  width: 54px;
  height: 54px;
  background: var(--c-light-gray);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-cyan);
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

.service-card:hover .icon-wrapper {
  background: linear-gradient(135deg, var(--c-cyan) 0%, #0284c7 100%);
  color: var(--c-white);
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 20px rgba(6, 182, 212, 0.3);
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.service-card p {
  font-size: 1rem;
}

/* 6. Visione tecnologica */
.section-visione {
  position: relative;
  padding: 120px 0;
  background-color: var(--c-navy);
  color: var(--c-white);
  overflow: hidden;
}

.visione-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.tech-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  border-radius: 50%;
  animation: float 10s infinite ease-in-out alternate;
}

.tech-glow-2 {
  top: auto;
  bottom: -200px;
  left: -200px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
  animation-duration: 14s;
  animation-direction: alternate-reverse;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-50px, 50px); }
}

.visione-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.visione-text h2 {
  color: var(--c-white);
}

.visione-text p {
  color: rgba(255,255,255,0.8);
}

.abstract-network {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.node {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--c-cyan);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--c-cyan);
}

.node-1 { top: 20%; left: 20%; animation: pulse 3s infinite; }
.node-2 { top: 70%; left: 30%; animation: pulse 4s infinite 1s; }
.node-3 { top: 40%; left: 70%; animation: pulse 3.5s infinite 0.5s; }
.node-4 { top: 80%; left: 80%; animation: pulse 4.5s infinite 1.5s; }

.lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* 7. Contatti */
.section-contatti {
  background-color: #2b333e;
  color: var(--c-white);
  padding: 100px 0;
}

.section-contatti .section-label {
  color: rgba(255,255,255,0.7);
}

.section-contatti h2 {
  color: var(--c-white);
}

.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  text-align: center;
}

.company-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  margin-top: 30px;
}

.company-details p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-icon {
  width: 20px;
  height: 20px;
  color: var(--c-cyan);
  flex-shrink: 0;
}

.company-details p a {
  color: var(--c-cyan);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.company-details p a:hover {
  color: var(--c-white);
}

.contatti-map {
  width: 100%;
}

.form-row {
  margin-bottom: 20px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

input, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--c-text-primary);
  background: var(--c-light-gray);
  transition: var(--transition-smooth);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--c-cyan);
  background: var(--c-white);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form .btn {
  width: 100%;
  margin-top: 10px;
}

/* 8. Footer */
.footer {
  background: #1d2328;
  padding: 40px 0;
  color: #8c959f;
  font-size: 0.9rem;
}

.footer p {
  color: #8c959f;
  margin: 0;
}

.footer-links-inline a {
  color: #8c959f;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-links-inline a:hover {
  color: var(--c-white);
}

.footer-links a:hover, .footer-legal a:hover {
  color: var(--c-cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--c-border);
  padding-top: 30px;
  font-size: 0.875rem;
  color: var(--c-text-secondary);
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 992px) {
  .identita-grid, .chi-siamo-grid, .visione-content, .contatti-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .servizi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
  
  .servizi-grid {
    grid-template-columns: 1fr;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

/* 9. GDPR Page */
.page-gdpr {
  background-color: var(--c-light-gray);
}

.page-gdpr .navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.page-gdpr .navbar a {
  color: var(--c-text-primary);
}

.gdpr-main {
  padding-top: 140px;
  min-height: calc(100vh - 100px);
}

.gdpr-title {
  font-size: 2.2rem;
  color: var(--c-navy);
  margin-bottom: 15px;
  font-weight: 700;
}

.gdpr-subtitle {
  font-size: 1.05rem;
  color: var(--c-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.gdpr-box {
  background: var(--c-white);
  border-radius: 12px;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
  overflow: hidden;
  margin-top: 40px;
}

.gdpr-tabs-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: #1a1b24; /* Dark navy from image */
  padding: 20px;
  border-radius: 12px 12px 0 0;
  overflow: visible; /* Prevent any scrollbar forcing */
}

.gdpr-tab {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08); /* Clear button background */
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15); /* Visible border */
  font-size: 0.8rem; /* Smaller font to save space */
  letter-spacing: -0.01em; /* Tighter letter spacing */
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  border-radius: 6px; /* Slightly smaller radius for a compact look */
  flex-shrink: 0;
}

.gdpr-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.gdpr-tab.active {
  background: var(--c-white);
  color: #111827; /* Dark charcoal text */
  border-color: var(--c-white);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gdpr-tabs-content {
  padding: 40px;
  background: var(--c-white);
}

.gdpr-tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.gdpr-tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.pane-header {
  margin-bottom: 35px;
}

.pane-header h2 {
  font-size: 1.25rem;
  color: #111827;
  margin-bottom: 6px;
  font-weight: 700;
}

.pane-header p {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0;
}

.docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.doc-card:hover {
  background: var(--c-white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  border-color: #fee2e2;
}

.doc-icon {
  width: 42px;
  height: 42px;
  background: #fee2e2;
  color: #ef4444;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-icon svg {
  width: 20px;
  height: 20px;
}

.doc-info h4 {
  font-size: 0.9rem;
  color: #111827;
  margin: 0 0 4px 0;
  font-weight: 600;
  display: inline-block;
}

.doc-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  display: inline-block;
  margin-left: 6px;
}

@media (max-width: 768px) {
  .docs-grid {
    grid-template-columns: 1fr;
  }
  .gdpr-tabs-content {
    padding: 25px 20px;
  }
}
