/* ============================================
   SINENG ITALIA — Portale Tecnico
   Design system: tecnico, pulito, professionale
   ============================================ */

/* --- Variables --- */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --bg-dark: #0c1829;
  --bg-dark-2: #111f36;
  --bg-dark-3: #182a45;

  --text: #1a2332;
  --text-light: #5a6a7e;
  --text-muted: #8896a7;
  --text-inverse: #e8ecf1;

  --brand: #00b96b;
  --brand-dark: #009a59;
  --brand-light: #e6f9f0;

  --accent: #0066cc;
  --accent-light: #e8f2ff;

  --line: #dfe4ea;
  --line-dark: rgba(255,255,255,.1);

  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 4px 16px rgba(0,0,0,.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);

  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --max: 1200px;
  --header-h: 72px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* --- Utilities --- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================
   HEADER
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.topbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.logo-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-box img {
  height: 36px;
  width: auto;
}
.logo-box span {
  font-weight: 800;
  font-size: 17px;
  color: var(--bg-dark);
  letter-spacing: -.02em;
}

/* Navigation */
nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
}
nav a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  border-radius: 6px;
  transition: all .15s;
}
nav a:hover,
nav a.active {
  color: var(--text);
  background: var(--bg-soft);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* CTA evidenziato nel menu (Diventa Partner) */
.nav-cta a {
  background: var(--brand);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  transition: background .15s, transform .15s;
}
.nav-cta a:hover {
  background: #00a85f;
  transform: translateY(-1px);
}
.mobile-nav .nav-cta a {
  background: var(--brand);
  color: #fff !important;
  text-align: center;
  font-weight: 700;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  cursor: pointer;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .2s;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary {
  background: var(--brand);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,185,107,.25);
}
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.2);
  color: var(--white);
}
.btn-outline:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.35);
}
.btn-light {
  background: var(--white);
  color: var(--text);
  border-color: var(--line);
}
.btn-light:hover {
  background: var(--bg-soft);
  border-color: #c8cfd8;
}
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: linear-gradient(135deg, rgba(12,24,41,.92) 0%, rgba(17,31,54,.88) 50%, rgba(24,42,69,.85) 100%),
              url('../img/hero-bg.jpg') center/cover no-repeat;
  color: var(--white);
  padding: 56px 0 48px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a {
  color: rgba(255,255,255,.5);
  transition: color .15s;
}
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: rgba(255,255,255,.25); }
.breadcrumb .current { color: rgba(255,255,255,.8); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1 {
  margin: 16px 0 14px;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
}
h1 .accent {
  display: block;
  color: var(--brand);
  margin-top: 4px;
}
.hero-desc {
  max-width: 600px;
  color: rgba(255,255,255,.6);
  font-size: 16px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* Hero panel */
.hero-panel {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.04);
  padding: 28px;
}
.hero-panel h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.hero-panel > p {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  margin-bottom: 20px;
  line-height: 1.65;
}
.hero-points { display: grid; gap: 8px; }
.hero-point {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.8);
  font-size: 14px;
  font-weight: 500;
}
.hero-point::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
}

/* Product image placeholder in hero */
.hero-product-img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-dark);
  background: rgba(255,255,255,.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
}
.hero-product-img .placeholder-text {
  color: rgba(255,255,255,.2);
  font-size: 13px;
  text-align: center;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.stat-card strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--bg-dark);
  margin-bottom: 4px;
  letter-spacing: -.02em;
}
.stat-card span {
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.5;
}

/* ============================================
   SECTIONS
   ============================================ */
section { padding: 56px 0; }
.section-soft {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head .small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}
.section-head h2 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--text);
}
.section-head p {
  max-width: 520px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
}

/* ============================================
   CARDS — Category & Group
   ============================================ */
.category-grid,
.group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.category-card,
.group-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}
.group-card-img {
  text-align: center;
  margin: -4px 0 12px;
}
.group-card-img img {
  max-height: 120px;
  width: auto;
  object-fit: contain;
}
.category-card:hover,
.group-card:hover {
  box-shadow: var(--shadow);
  border-color: #c8cfd8;
  transform: translateY(-2px);
}

/* Card image area */
.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-img .placeholder-text {
  color: var(--text-muted);
  font-size: 12px;
}

.label {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.label-hybrid { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.label-battery { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; }
.label-string { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.label-mono { background: #f3e8ff; color: #7c3aed; border: 1px solid #c4b5fd; }
.label-tri { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.label-res { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.label-com { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }
.label-ind { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }

.category-card h3,
.group-card h3 {
  margin: 10px 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.category-card > p,
.group-card > p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.chip {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-light);
}
.category-actions,
.group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

/* ============================================
   CONTENT CARDS — Documentation blocks
   ============================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}
.content-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.content-card h3 .icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.content-card h3 .icon svg {
  width: 16px;
  height: 16px;
}
.icon-commercial { background: #ecfdf5; color: #047857; }
.icon-technical { background: #eff6ff; color: #1d4ed8; }
.icon-cert { background: #fef3c7; color: #92400e; }
.icon-video { background: #fef2f2; color: #dc2626; }

.content-card > p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
}

/* File list */
.file-list { display: grid; gap: 8px; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--bg-soft);
  transition: all .15s;
}
.file-item:hover {
  border-color: #c0c9d4;
  background: var(--white);
}
.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.file-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
}
.file-icon-pdf { background: #fef2f2; color: #dc2626; }
.file-icon-video { background: #fef2f2; color: #dc2626; }
.file-icon-doc { background: #eff6ff; color: #2563eb; }
.file-icon-cert { background: #fef3c7; color: #d97706; }

.file-text { min-width: 0; }
.file-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text);
}
.file-text span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-action {
  flex-shrink: 0;
}

/* ============================================
   PILL NAVIGATION (breadcrumb bar in content)
   ============================================ */
.pill-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.pill-nav a {
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  transition: all .15s;
}
.pill-nav a:hover {
  color: var(--text);
  border-color: #c0c9d4;
}
.pill-nav a.active {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

/* ============================================
   NOTICE
   ============================================ */
.notice {
  border: 1px dashed #c8cfd8;
  border-radius: var(--radius);
  padding: 14px 18px;
  background: var(--white);
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  margin-top: 24px;
}
.notice strong {
  color: var(--text);
}

/* ============================================
   SUPPORT SECTION
   ============================================ */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.support-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.support-card .support-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-light);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.support-card .support-icon svg {
  width: 22px;
  height: 22px;
  color: var(--brand);
}
.support-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.support-card p {
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.6;
}
.support-card .support-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  transition: color .15s;
}
.support-card .support-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* Chatbot WhatsApp Banner */
.chatbot-banner {
  margin-top: 36px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%);
  padding: 2px;
}
.chatbot-banner-inner {
  background: var(--bg-dark);
  border-radius: calc(var(--radius-xl) - 2px);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.chatbot-info {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex: 1;
}
.chatbot-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(37,211,102,.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chatbot-icon svg {
  width: 28px;
  height: 28px;
  color: #25d366;
}
.chatbot-info h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.chatbot-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  background: #25d366;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
  border: none;
}
.btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,211,102,.3);
}
.btn-whatsapp svg {
  flex-shrink: 0;
}

/* ============================================
   DOCUMENTATION INDEX
   ============================================ */
.doc-family {
  margin-bottom: 32px;
}
.doc-family h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
  color: var(--text);
}
.doc-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.doc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: all .15s;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.doc-link:hover {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-dark);
}
.doc-link .arrow {
  margin-left: auto;
  color: var(--text-muted);
  transition: .15s;
}
.doc-link:hover .arrow {
  color: var(--brand);
  transform: translateX(2px);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid var(--line);
  background: var(--bg-dark);
  color: rgba(255,255,255,.5);
  padding: 40px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.footer-brand img { height: 28px; }
.footer-brand span {
  font-weight: 700;
  color: var(--white);
  font-size: 15px;
}
footer p {
  font-size: 13px;
  line-height: 1.65;
}
footer h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.7);
  margin-bottom: 14px;
}
footer ul { display: grid; gap: 8px; }
footer ul a {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  transition: color .15s;
}
footer ul a:hover { color: var(--brand); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: rgba(255,255,255,.35);
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(12px);
  z-index: 90;
  padding: 24px;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { display: grid; gap: 4px; }
.mobile-nav a {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius);
  transition: background .15s;
}
.mobile-nav a:hover { background: var(--bg-soft); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid,
  .group-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .support-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 36px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head h2 { font-size: 28px; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  nav { display: none; }
  .hamburger { display: flex; }
  .header-actions .btn { display: none; }

  .hero { padding: 36px 0 32px; }
  h1 { font-size: 30px; }
  .hero-desc { font-size: 15px; }

  .stats-grid,
  .category-grid,
  .group-grid,
  .support-grid { grid-template-columns: 1fr; }

  .content-grid { grid-template-columns: 1fr; }

  .file-item { flex-direction: column; align-items: stretch; gap: 10px; }
  .file-action { align-self: flex-start; }

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

  .doc-links { grid-template-columns: 1fr; }

  .chatbot-banner-inner { flex-direction: column; text-align: center; }
  .chatbot-info { flex-direction: column; align-items: center; }
  .chatbot-icon { margin: 0 auto; }
}
