/* ==========================================================================
   MATTEO RICCI SVILUPPO - DESIGN SYSTEM & CORE STYLES
   Modern, High-Tech, Premium Aesthetic
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #070a13;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(26, 38, 66, 0.85);
  --bg-surface: #0b1120;
  --bg-glass: rgba(15, 23, 42, 0.65);
  --bg-glass-strong: rgba(11, 17, 32, 0.92);

  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-glow: rgba(56, 189, 248, 0.35);
  --border-active: #38bdf8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --amber-400: #fbbf24;
  --purple-500: #8b5cf6;

  --grad-primary: linear-gradient(135deg, #38bdf8 0%, #3b82f6 50%, #8b5cf6 100%);
  --grad-accent: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
  --grad-surface: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.7) 100%);
  --grad-badge: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px -5px rgba(56, 189, 248, 0.25);
  --shadow-glow-cyan: 0 0 40px -8px rgba(6, 182, 212, 0.35);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-main);
}

body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-dark);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmospheric Glow */
.bg-ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.18;
}

.ambient-orb-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #2563eb, transparent 70%);
  top: -150px;
  left: 15%;
}

.ambient-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  top: 40%;
  right: -100px;
}

.ambient-orb-3 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  bottom: 10%;
  left: -150px;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 100%);
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section {
  padding: 6.5rem 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }
}

/* Typography Helpers */
h1, h2, h3, h4, .brand-title {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-accent {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  background: var(--grad-badge);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--cyan-400);
  margin-bottom: 1.25rem;
  box-shadow: 0 0 20px -5px rgba(6, 182, 212, 0.2);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: var(--transition);
}

.site-header.scrolled {
  padding: 0.75rem 0;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px -4px rgba(56, 189, 248, 0.35);
  position: relative;
  overflow: hidden;
  padding: 4px;
}

.brand-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--cyan-400);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Official Logo Display Cards */
.hero-official-badge {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem 0.75rem 0.85rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), var(--shadow-glow);
  backdrop-filter: blur(12px);
}

.hero-official-badge-logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #ffffff;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-official-badge-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-official-badge-text {
  display: flex;
  flex-direction: column;
}

.hero-official-badge-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.hero-official-badge-sub {
  font-size: 0.75rem;
  color: var(--cyan-400);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.footer-logo-card {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem 0.6rem 0.75rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.25rem;
  text-decoration: none;
  transition: var(--transition);
}

.footer-logo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(56, 189, 248, 0.4);
}

.footer-logo-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.footer-logo-card-text {
  display: flex;
  flex-direction: column;
}

.footer-logo-card-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #0b1120;
  line-height: 1.1;
}

.footer-logo-card-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0284c7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--grad-primary);
  transition: var(--transition);
  border-radius: 2px;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--grad-primary);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px -3px rgba(37, 99, 235, 0.5);
  transition: var(--transition);
}

.btn-header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px -2px rgba(56, 189, 248, 0.7);
}

.btn-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

/* ==========================================================================
   BUTTONS & UI ELEMENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.85rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(148, 163, 184, 0.3);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--grad-accent);
  color: #070a13;
  font-weight: 700;
  box-shadow: var(--shadow-glow-cyan);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding-top: 9.5rem;
  padding-bottom: 5.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-full);
  padding: 0.35rem 1rem 0.35rem 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--emerald-400);
  box-shadow: 0 0 10px var(--emerald-400);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 15px var(--emerald-400); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: clamp(2.5rem, 4.5vw, 3.85rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.hero-subtitle strong {
  color: #ffffff;
  font-weight: 600;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 3rem;
}

.hero-guarantee {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.guarantee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.guarantee-item svg {
  color: var(--emerald-400);
  flex-shrink: 0;
}

/* Hero Visual & Floating Interactive Panels */
.hero-visual-wrapper {
  position: relative;
}

.hero-visual-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transition: var(--transition);
}

.hero-visual-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.6);
}

.hero-visual-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.hero-overlay-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(11, 17, 32, 0.85);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(12px);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan-400);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-floating-stat {
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  background: var(--bg-glass-strong);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  animation: float-stat 5s ease-in-out infinite;
}

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

.stat-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--grad-badge);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-400);
}

.stat-content .stat-number {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.stat-content .stat-label {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* ==========================================================================
   METRICS / TRUST COUNTER BAR
   ========================================================================== */
.stats-banner {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.stats-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.stat-card-item {
  text-align: center;
  position: relative;
}

.stat-card-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15%;
  right: -0.75rem;
  height: 70%;
  width: 1px;
  background: var(--border-subtle);
}

.stat-big-number {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   PUNTI DI FORZA / KEY PILLARS
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: var(--transition);
}

.pillar-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md), 0 0 25px rgba(56, 189, 248, 0.15);
}

.pillar-card:hover::before {
  background: var(--grad-primary);
}

.pillar-card.highlight {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.25) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.pillar-badge-top {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--amber-400);
}

.pillar-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--grad-badge);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-400);
  margin-bottom: 1.5rem;
}

.pillar-title {
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 0.85rem;
  line-height: 1.25;
}

.pillar-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   SOLUZIONI & SERVIZI (SERVICES)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: var(--shadow-md), 0 0 20px rgba(56, 189, 248, 0.12);
}

.service-header {
  margin-bottom: 1.5rem;
}

.service-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-400);
  margin-bottom: 1.25rem;
}

.service-title {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.service-features {
  list-style: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.service-features li svg {
  color: var(--emerald-400);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   PORTFOLIO & CASE STUDIES
   ========================================================================== */
.portfolio-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--blue-600);
  border-color: var(--cyan-400);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.25rem;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.portfolio-thumb-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.portfolio-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover .portfolio-thumb-wrapper img {
  transform: scale(1.05);
}

.portfolio-badge-domain {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(11, 17, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--cyan-400);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.portfolio-badge-category {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(37, 99, 235, 0.85);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.portfolio-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-title {
  font-size: 1.45rem;
  color: #ffffff;
  margin-bottom: 0.65rem;
}

.portfolio-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.portfolio-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan-400);
  text-decoration: none;
  transition: var(--transition);
}

.portfolio-link:hover {
  color: #ffffff;
  gap: 0.65rem;
}

.portfolio-metric {
  font-size: 0.8rem;
  color: var(--emerald-400);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   INTERACTIVE QUOTE ESTIMATOR / CONFIGURATORE PREVENTIVO
   ========================================================================== */
.estimator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  backdrop-filter: blur(20px);
}

.estimator-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 3.5rem;
  align-items: start;
}

.estimator-step-group {
  margin-bottom: 2.25rem;
}

.estimator-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.estimator-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.option-select-btn {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.option-select-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(56, 189, 248, 0.3);
}

.option-select-btn.active {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--cyan-400);
  box-shadow: 0 0 15px -3px rgba(6, 182, 212, 0.3);
}

.opt-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
}

.opt-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* Result Box */
.estimator-summary-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  position: sticky;
  top: 6rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.est-summary-header {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.est-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.est-row strong {
  color: #ffffff;
}

.est-price-container {
  margin: 1.75rem 0 1.25rem;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  text-align: center;
}

.est-price-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan-400);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.est-price-amount {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.est-timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.825rem;
  color: var(--emerald-400);
  font-weight: 600;
}

.est-price-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* ==========================================================================
   METODO DI LAVORO / 4-STEP DELIVERY
   ========================================================================== */
.timeline-process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.process-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  position: relative;
  transition: var(--transition);
}

.process-step-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(56, 189, 248, 0.15);
  line-height: 1;
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
}

.step-days-badge {
  display: inline-block;
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--cyan-400);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.step-title {
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 0.65rem;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: rgba(148, 163, 184, 0.3);
}

.faq-item.active {
  border-color: var(--border-glow);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1.35rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--cyan-400);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-answer-inner {
  padding: 0 1.75rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  position: relative;
  overflow: hidden;
}

.contact-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-primary);
}

.contact-main-title {
  font-size: 1.85rem;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.contact-main-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  line-height: 1.6;
}

.contact-details-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.detail-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--grad-badge);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-400);
  flex-shrink: 0;
}

.detail-label {
  font-size: 0.775rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.detail-value {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
}

.detail-value:hover {
  color: var(--cyan-400);
}

.company-legal-badge {
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.company-legal-badge strong {
  color: #ffffff;
}

/* Contact Form */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  box-shadow: var(--shadow-md);
}

.form-group-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.45rem;
}

.form-control {
  width: 100%;
  background: rgba(11, 17, 32, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #ffffff;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--cyan-400);
  box-shadow: 0 0 15px -3px rgba(6, 182, 212, 0.35);
  background: rgba(15, 23, 42, 0.95);
}

.form-control::placeholder {
  color: var(--text-dim);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
  padding-right: 2.5rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-actions-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #04070e;
  border-top: 1px solid var(--border-subtle);
  padding: 5rem 0 2.5rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--cyan-400);
  transform: translateX(3px);
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   MODAL DIALOG / LIGHTBOX
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.modal-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
}

.modal-img-wrap {
  aspect-ratio: 16 / 9;
  background: #020617;
}

.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-content-pad {
  padding: 2.25rem;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--cyan-500);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  color: #ffffff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slide-toast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-toast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .stats-card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .stat-card-item:nth-child(2)::after {
    display: none;
  }
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .timeline-process {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .estimator-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
  }
  .nav-menu.open {
    right: 0;
  }
  .btn-mobile-toggle {
    display: block;
    z-index: 101;
  }
  .btn-header-cta {
    display: none;
  }
  .pillars-grid, .services-grid, .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .timeline-process {
    grid-template-columns: 1fr;
  }
  .estimator-card {
    padding: 1.75rem 1.25rem;
  }
  .estimator-options-grid {
    grid-template-columns: 1fr;
  }
  .form-group-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-floating-stat {
    position: static;
    margin-top: 1.5rem;
  }
}
