:root {
  --bg-body: #f4f6f9;
  --bg-card: #ffffff;
  --bg-muted: #f8fafc;
  --bg-header: #1e293b;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --accent-green: #15803d;
  --accent-green-bg: #f0fdf4;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.14);
  --container: 1040px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-body);
  color: var(--text-body);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Bar senza logo */
.topbar {
  background-color: var(--bg-header);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand-link {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-link:hover {
  color: #cbd5e1;
  text-decoration: none;
}

.lang-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lang-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.lang-nav a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.lang-nav img {
  width: 22px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #ffffff;
  padding: 48px 0 56px;
  margin-bottom: 32px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3.5vw, 2.65rem);
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #cbd5e1;
  margin: 0 0 24px;
  max-width: 720px;
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 20px;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  color: #f1f5f9;
}

.hero-features a {
  color: #93c5fd;
  text-decoration: underline;
}

.check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #4ade80;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* Bottoni */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background-color: #1d4ed8;
  color: #ffffff;
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-outline {
  background-color: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background-color: var(--bg-muted);
  color: var(--primary);
}

/* Card Sezioni */
.card-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 34px);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.card-section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.3;
}

.card-section h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--text-main);
  font-weight: 600;
}

.section-lead {
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 20px;
}

/* Carosello Lightweight Vanilla JS */
.slider {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f172a;
}

.slider-track {
  display: flex;
  transition: transform 0.35s ease;
}

.slider-slide {
  min-width: 100%;
  margin: 0;
  position: relative;
}

.slider-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #f8fafc;
}

.slider-caption {
  padding: 10px 16px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.9rem;
  text-align: center;
}

.slider-btn {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  z-index: 2;
}

.slider-btn:hover {
  background: rgba(15, 23, 42, 0.92);
}

.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  padding: 0;
}

.slider-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

/* Video Responsive */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid var(--border);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-meta {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Download & Prezzi */
.download-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 820px) {
  .download-grid {
    grid-template-columns: 1fr;
  }
}

.istruzioni {
  padding-left: 20px;
  margin: 18px 0;
}

.istruzioni li {
  margin-bottom: 8px;
}

.certificazione {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.certificazione img {
  width: 28px;
  height: 28px;
}

.pricing-card {
  background: var(--bg-muted);
  border: 2px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.pricing-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  margin: 10px 0 4px;
}

.pricing-amount span {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.clean-table th,
.clean-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.clean-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--text-main);
}

.clean-table td:last-child,
.clean-table th:last-child {
  text-align: right;
  font-weight: 600;
}

.clean-table tr:last-child td {
  border-bottom: none;
}

.sub-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.service-item {
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: var(--bg-muted);
}

.service-item.bundle {
  border-left-color: var(--accent-green);
  background: var(--accent-green-bg);
}

.service-price {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  color: var(--text-main);
}

/* Testimonianze */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.quote-card {
  margin: 0;
  padding: 18px;
  background: var(--bg-muted);
  border-radius: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid #64748b;
  font-style: italic;
  color: var(--text-body);
}

/* Tutorial List */
.tutorial-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.tutorial-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  color: var(--text-main);
}

.tutorial-grid a:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* Barcode Responsive Grid */
.barcode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.barcode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-muted);
}

.barcode-tier {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  margin-bottom: 10px;
}

.barcode-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 8px 0 12px;
}

.barcode-name {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

/* Sondaggio */
.micro-question {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-muted);
  max-width: 640px;
}

.micro-question .title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.micro-question label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.micro-question label:hover {
  border-color: var(--primary);
}

.micro-question .sent {
  background: var(--accent-green-bg) !important;
  border-color: var(--accent-green) !important;
  font-weight: 600;
}

.micro-question .anon {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* FAQ Accordion Nativo */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  background: var(--bg-muted);
  overflow: hidden;
}

.faq-item summary {
  padding: 15px 18px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 18px 16px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.faq-answer p:first-child {
  margin-top: 14px;
}

.faq-answer code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Rating & Google Review */
.rating-box {
  text-align: center;
}

.star-rating {
  font-size: 2.25rem;
  direction: rtl;
  unicode-bidi: bidi-override;
  display: inline-flex;
  gap: 4px;
}

.star-rating span {
  color: #cbd5e1;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.star-rating span:hover,
.star-rating span:hover ~ span,
.star-rating span.active,
.star-rating span.active ~ span {
  color: #f59e0b;
}

.rating-feedback {
  font-size: 0.9rem;
  color: var(--accent-green);
  font-weight: 600;
  min-height: 1.4em;
  margin-top: 6px;
}

/* Ultime Notizie */
.news-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.news-item h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.news-item p {
  margin: 0;
  font-size: 0.95rem;
}

.rss-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
}

/* =========================================================
   WIDGET BASSO A SINISTRA: Form Richiesta Contatto
   ========================================================= */
#contactPopup {
  position: fixed;
  bottom: 18px;
  left: 18px;
  width: 245px;
  max-width: calc(50vw - 24px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 12px 14px;
  z-index: 990;
}

.contact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

#contactHeader {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.contact-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 5px;
}

#contactField {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

#contactSendBtn {
  width: 100%;
  padding: 7px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}

#contactSendBtn:hover {
  background: var(--primary-hover);
}

/* =========================================================
   WIDGET BASSO A DESTRA: Chatbot MerciGest 2026
   ========================================================= */
#chatLauncher {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-md);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

#chatLauncher:hover {
  background: #0f172a;
  transform: translateY(-2px);
}

#chatWindow {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 360px;
  max-width: calc(100vw - 36px);
  height: 490px;
  max-height: calc(100vh - 36px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;
}

#chatWindow.open {
  display: flex;
}

.chat-header {
  background: #1e293b;
  color: #ffffff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.chat-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.chat-subtitle {
  font-size: 0.75rem;
  color: #cbd5e1;
}

.chat-close-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.chat-close-btn:hover {
  color: #ffffff;
}

.chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.chat-msg.bot {
  align-self: flex-start;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--primary);
  color: #ffffff;
  border-bottom-right-radius: 3px;
}

.chat-msg.typing {
  color: var(--text-muted);
  font-style: italic;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.chat-chip {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text-body);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chat-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

#chatInput {
  flex: 1;
  padding: 8px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
}

#chatInput:focus {
  outline: none;
  border-color: var(--primary);
}

#chatSendBtn {
  padding: 8px 14px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

#chatSendBtn:hover {
  background: var(--primary-hover);
}

#chatSendBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  #contactPopup {
    width: 195px;
    padding: 10px;
    bottom: 12px;
    left: 12px;
  }
  #chatLauncher {
    bottom: 12px;
    right: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  #chatWindow {
    bottom: 12px;
    right: 12px;
    max-width: calc(100vw - 24px);
  }
}

/* Footer */
footer {
  background-color: #1e293b;
  color: #cbd5e1;
  font-size: 0.9rem;
  text-align: center;
  padding: 36px 20px;
  margin-top: 40px;
}

footer a {
  color: #e2e8f0;
}

footer a:hover {
  color: #ffffff;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 18px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.copyright {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
}


/* Manuale Operativo MerciGest */
.hero-compact {
  padding: 32px 0 36px;
  margin-bottom: 24px;
}

.manual-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.manual-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-nav-list a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-body);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.manual-nav-list a:hover {
  background: #eff6ff;
  color: var(--primary);
  border-color: #bfdbfe;
  text-decoration: none;
}

.manual-nav-list a.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.manual-content p {
  margin-top: 0;
  margin-bottom: 14px;
}

.manual-content ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.manual-content li {
  margin-bottom: 6px;
}

.manual-media {
  margin: 18px 0;
}

.manual-media img,
.manual-media video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.manual-video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin: 18px 0;
}

.manual-video-caption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

.manual-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

@media (max-width: 780px) {
  .manual-video-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   COOKIE BANNER GDPR (Conformes Garante Privacy + GA4)
   ========================================================= */
#rgp-cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 780px;
  margin: 0 auto;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  padding: 20px 24px;
  z-index: 9999;
  display: none;
  font-size: 14px;
  line-height: 1.5;
}

#rgp-cookie-banner.visible {
  display: block;
}

.cookie-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cookie-banner-header strong {
  font-size: 16px;
  color: #1e293b;
}

.cookie-close-x {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
}

.cookie-close-x:hover {
  color: #0f172a;
}

.cookie-banner-text {
  margin-bottom: 16px;
  color: #475569;
}

.cookie-banner-text a {
  color: #2a4a85;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.btn-cookie {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #2a4a85;
  transition: all 0.2s ease;
}

.btn-cookie-reject {
  background: #ffffff;
  color: #2a4a85;
}

.btn-cookie-reject:hover {
  background: #f1f5f9;
}

.btn-cookie-accept {
  background: #2a4a85;
  color: #ffffff;
}

.btn-cookie-accept:hover {
  background: #1d3563;
}

@media (max-width: 600px) {
  #rgp-cookie-banner {
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 16px;
  }
  .cookie-banner-actions {
    flex-direction: column;
  }
  .btn-cookie {
    width: 100%;
    text-align: center;
  }
}

/* =========================================================
   STILI SPECIFICI HOME PAGE (index.php)
   ========================================================= */
header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #ffffff;
  padding: 20px 0;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.logo-box img {
  max-height: 70px;
  width: auto;
}

.hero-title {
  text-align: center;
  flex: 1;
}

.hero-title h1 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #ffffff;
}

.hero-title p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.98rem;
}

.lang-switcher {
  display: flex;
  gap: 12px;
}

.lang-switcher a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #e2e8f0;
  font-size: 0.8rem;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.lang-switcher a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  text-decoration: none;
}

.lang-switcher img {
  width: 24px;
  height: 16px;
  margin-bottom: 4px;
}

.top-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  margin-bottom: 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-nav ul {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.top-nav a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
}

.top-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
  color: var(--text-main);
}

.software-grid,
.two-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.software-card {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.badge-cat {
  display: inline-block;
  background: #dbeafe;
  color: var(--primary-hover);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.software-card .btn-primary,
.btn-recensione {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  text-decoration: none;
}

.btn-recensione {
  background: #ffffff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-recensione:hover {
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
}