:root {
  /* Official ELEKTROVENT brand palette derived from the logo (#3F8DB0) */
  --ev-brand: #3F8DB0;          /* primary logo blue */
  --ev-brand-dark: #2A6A88;     /* darker variant */
  --ev-brand-deep: #194962;     /* deepest, for hero / navbars */
  --ev-brand-ink: #0E2F42;      /* near-black brand ink */
  --ev-brand-light: #71ACC5;    /* lighter accent */
  --ev-brand-pale: #D7E7EC;     /* pale tint, surfaces */

  /* Backward-compat aliases (used throughout existing markup) */
  --ev-navy: var(--ev-brand-deep);
  --ev-navy-2: var(--ev-brand-dark);
  --ev-blue: var(--ev-brand);
  --ev-cyan: var(--ev-brand-light);

  /* Accent (used sparingly) */
  --ev-red: #E30613;
  --ev-red-dark: #B8050F;

  /* Neutrals */
  --ev-gray-50: #F4F7F9;
  --ev-gray-100: #E2EAEF;
  --ev-gray-500: #6B7A88;
  --ev-text: #102434;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--ev-text); background: #fff; }
.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.02em; }

/* Brand utility classes (used together with Tailwind) */
.bg-ev-navy { background-color: var(--ev-brand-deep); }
.bg-ev-navy-2 { background-color: var(--ev-brand-dark); }
.bg-ev-blue { background-color: var(--ev-brand); }
.bg-ev-brand { background-color: var(--ev-brand); }
.bg-ev-brand-dark { background-color: var(--ev-brand-dark); }
.bg-ev-brand-deep { background-color: var(--ev-brand-deep); }
.bg-ev-red { background-color: var(--ev-red); }
.text-ev-navy { color: var(--ev-brand-deep); }
.text-ev-brand { color: var(--ev-brand); }
.text-ev-brand-dark { color: var(--ev-brand-dark); }
.text-ev-red { color: var(--ev-red); }
.text-ev-cyan { color: var(--ev-brand-light); }
.border-ev-red { border-color: var(--ev-red); }
.border-ev-navy { border-color: var(--ev-brand-deep); }
.border-ev-brand { border-color: var(--ev-brand); }

/* Hero gradient — steel-blue brand world */
.hero-gradient {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(113, 172, 197, 0.35), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(63, 141, 176, 0.30), transparent 60%),
    linear-gradient(135deg, #0E2F42 0%, #194962 55%, #2A6A88 100%);
}

/* Tech grid background */
.tech-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Animated blade icon */
.blade {
  display: inline-block;
  transform-origin: center;
  animation: spin 8s linear infinite;
}
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Storia — carosello a scorrimento automatico */
.timeline-carousel {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}
.timeline-track {
  display: flex;
  width: max-content;
  animation: timeline-scroll 55s linear infinite;
  will-change: transform;
}
.timeline-carousel:hover .timeline-track,
.timeline-carousel:focus-within .timeline-track { animation-play-state: paused; }
.timeline-card {
  flex: 0 0 320px;
  max-width: 320px;
  margin-right: 1.25rem;
}
@keyframes timeline-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (max-width: 640px) {
  .timeline-card { flex-basis: 280px; max-width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .timeline-carousel { overflow-x: auto; }
  .timeline-track { animation: none; }
}

/* Card hover */
.card-tech {
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.card-tech:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(25, 73, 98, 0.45);
  border-color: var(--ev-brand);
}

/* Category card — discreet top accent bar revealed on hover.
   Set inline `style="--cat-c: #XXXXXX"` to override per category.
   Defaults to brand teal so unset cards stay on-brand.            */
.cat-card { position: relative; --cat-c: var(--ev-brand); }
.cat-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--cat-c);
  border-top-left-radius: inherit; border-top-right-radius: inherit;
  transform: scaleX(.18); transform-origin: left;
  opacity: .55;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
}
.cat-card:hover::before { transform: scaleX(1); opacity: 1; }
.cat-card:hover { border-color: color-mix(in srgb, var(--cat-c) 55%, transparent) !important; }
.cat-dot { background: var(--cat-c) !important; }

/* Section dividers */
.diag-divider {
  height: 6px;
  background: linear-gradient(90deg, var(--ev-brand) 0%, var(--ev-brand) 70%, var(--ev-red) 70%, var(--ev-red) 100%);
}

/* Spec table */
.spec-table th { background: var(--ev-brand-deep); color: #fff; font-weight: 600; }
.spec-table tr:nth-child(even) td { background: var(--ev-gray-50); }
.spec-table td, .spec-table th { padding: .65rem .9rem; border-bottom: 1px solid var(--ev-gray-100); font-size: .9rem; }

/* Badge */
.badge-cert {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .7rem; border-radius: 999px;
  background: rgba(63, 141, 176, 0.10); color: var(--ev-brand-dark);
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
  border: 1px solid rgba(63, 141, 176, 0.28);
}

/* Mobile menu */
.menu-open { max-height: 600px; }
.menu-closed { max-height: 0; overflow: hidden; }

/* Stat ticker */
.stat-num { font-variant-numeric: tabular-nums; }

/* ─────────────────────────────────────────────
   CATEGORY ACCENT SYSTEM
   Each product family carries a discreet accent
   color used only as a "signature" — thin top
   stripe, small dot, hover ring. The brand steel
   blue always remains dominant. Set --cat-accent
   on <body data-cat="..."> to override.
   ───────────────────────────────────────────── */
:root { --cat-accent: var(--ev-brand); --cat-accent-soft: rgba(63, 141, 176, 0.10); }

body[data-cat="elicoidali"]    { --cat-accent: #3F8DB0; --cat-accent-soft: rgba(63,141,176,.10); }   /* steel blue (brand) */
body[data-cat="assiali"]       { --cat-accent: #2D6E8E; --cat-accent-soft: rgba(45,110,142,.10); }   /* deep teal */
body[data-cat="torrini"]       { --cat-accent: #5C8AA0; --cat-accent-soft: rgba(92,138,160,.10); }   /* slate blue */
body[data-cat="centrifughi"]   { --cat-accent: #C58B2A; --cat-accent-soft: rgba(197,139,42,.08); }   /* warm amber */
body[data-cat="cassonati"]     { --cat-accent: #475569; --cat-accent-soft: rgba(71,85,105,.08); }    /* graphite */
body[data-cat="anticorrosione"]{ --cat-accent: #5E8B6E; --cat-accent-soft: rgba(94,139,110,.08); }   /* sage */
body[data-cat="eci"]           { --cat-accent: #2F7A56; --cat-accent-soft: rgba(47,122,86,.08); }    /* emerald (efficienza) */
body[data-cat="atex"]          { --cat-accent: #1F3A5F; --cat-accent-soft: rgba(31,58,95,.10); }     /* cobalt navy */
body[data-cat="fumi"]          { --cat-accent: #B43A2E; --cat-accent-soft: rgba(180,58,46,.08); }    /* muted ember */
body[data-cat="regolatori"]    { --cat-accent: #334155; --cat-accent-soft: rgba(51,65,85,.08); }     /* slate */

/* Thin signature stripe shown directly under the fixed header on category pages */
.cat-stripe {
  position: fixed; top: 80px; left: 0; right: 0;
  height: 3px; background: var(--cat-accent);
  z-index: 40; pointer-events: none;
}

/* Small inline category tag — sits in the breadcrumb area */
.cat-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .25rem .6rem; border-radius: 999px;
  background: var(--cat-accent-soft);
  color: var(--cat-accent);
  border: 1px solid color-mix(in srgb, var(--cat-accent) 25%, transparent);
  font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.cat-pill::before {
  content: ""; width: .45rem; height: .45rem; border-radius: 999px;
  background: var(--cat-accent);
}

/* Cat-accent helpers (use sparingly inside category pages) */
.text-cat   { color: var(--cat-accent); }
.bg-cat-soft{ background: var(--cat-accent-soft); }
.border-cat { border-color: color-mix(in srgb, var(--cat-accent) 35%, transparent); }
.cat-rule   { height: 2px; background: linear-gradient(90deg, var(--cat-accent), transparent); }

/* Product gallery */
.gallery-thumb { transition: outline-color .2s ease, transform .2s ease; outline: 2px solid transparent; }
.gallery-thumb.active { outline-color: var(--ev-brand); }
.gallery-thumb:hover { transform: translateY(-2px); }

/* ===== Configuratore rapido (sticky bar) ===== */
.qc-bar { background: linear-gradient(180deg, #f8fbfd 0%, #eef5fa 100%); border-top: 1px solid #e2ebf1; border-bottom: 1px solid #d6e3ec; }
.qc-inner { max-width: 64rem; margin: 0 auto; padding: 8px 1.25rem; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
@media (min-width: 1024px) { .qc-inner { flex-wrap: nowrap; } }
.qc-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ev-brand-dark, #2a6a85); white-space: nowrap; }
.qc-field { display: flex; flex-direction: column; gap: 2px; flex: 0 1 180px; min-width: 150px; }
.qc-field--fam { flex: 0 1 340px; min-width: 260px; }
.qc-field label { font-size: 9px; font-weight: 600; letter-spacing: .02em; text-transform: none; color: #64748b; padding-left: 2px; }
.qc-native { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 10px center; border: 1px solid #cfd9e2; border-radius: 8px; padding: 8px 32px 8px 12px; font-size: 13.5px; color: #1e293b; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.qc-native:hover, .qc-native:focus { border-color: var(--ev-brand, #3F8DB0); box-shadow: 0 0 0 3px rgba(63,141,176,.12); outline: none; }
.qc-select { position: relative; }
.qc-trigger { width: 100%; display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #cfd9e2; border-radius: 8px; padding: 7px 10px 7px 10px; font-size: 13.5px; color: #1e293b; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.qc-trigger:hover { border-color: var(--ev-brand, #3F8DB0); box-shadow: 0 0 0 3px rgba(63,141,176,.12); }
.qc-trigger-icon { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qc-trigger-icon svg { width: 22px; height: 22px; }
.qc-trigger-text { flex: 1; text-align: left; font-weight: 600; }
.qc-caret { color: #64748b; transition: transform .15s ease; flex-shrink: 0; }
.qc-select.open .qc-caret { transform: rotate(180deg); }
.qc-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid #d6e3ec; border-radius: 10px; box-shadow: 0 14px 40px -12px rgba(15,23,42,.18); padding: 6px; margin: 0; list-style: none; z-index: 60; max-height: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .15s ease, max-height .15s ease; }
.qc-select.open .qc-menu { max-height: min(70vh, 480px); overflow-y: auto; opacity: 1; pointer-events: auto; }
.qc-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; color: #1e293b; }
.qc-option:hover { background: #eef5fa; }
.qc-opt-icon { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.qc-opt-icon svg { width: 24px; height: 24px; }
.qc-go { display: inline-flex; align-items: center; gap: 6px; background: var(--ev-red, #B43A2E); color: #fff; font-weight: 600; font-size: 13.5px; padding: 9px 16px; border-radius: 8px; border: none; cursor: pointer; white-space: nowrap; transition: background .15s ease, transform .15s ease; align-self: flex-end; }
.qc-go:hover { background: #9a2f25; transform: translateY(-1px); }

/* Page-content offset compensation: the existing fixed header rules already account for h-20 via various pt-* utilities. The qc-spacer dynamically reserves the full header (menu + bar) height. */
#qc-spacer { width: 100%; }
/* Remove redundant top padding from hero since spacer handles it */
.hero-gradient { padding-top: 0 !important; }

/* ===== Home: 10 categorie cards ===== */
.cat9-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; position: relative; }
.cat9-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--cat-c); z-index: 2; }
.cat9-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px -16px rgba(15,23,42,.22); border-color: var(--cat-c); }
.cat9-img { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #f1f5f9 0%, #fafcfd 100%); display: flex; align-items: center; justify-content: center; padding: 18px; overflow: hidden; }
.cat9-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .35s ease; }
.cat9-card:hover .cat9-img img { transform: scale(1.04); }
.cat9-body { padding: 18px 20px 22px; }
.cat9-head { display: flex; align-items: center; gap: 10px; }
.cat9-num { font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: .08em; }
.cat9-color { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; color: #fff; background: var(--cat-c); }
.cat9-body h3 { font-family: var(--font-display, 'Sora', sans-serif); font-size: 1.15rem; color: var(--ev-navy, #0F2A44); margin-top: 8px; line-height: 1.25; }
.cat9-body p { font-size: 0.85rem; color: #64748b; margin-top: 6px; line-height: 1.5; }

/* ===== News listing & navigation ===== */
.news-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.news-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px -16px rgba(15,23,42,.18); border-color: var(--ev-brand, #3F8DB0); }
.news-card-img { aspect-ratio: 16 / 10; position: relative; overflow: hidden; }
.news-card-body { padding: 18px 20px 22px; }
.news-card-meta { display: flex; align-items: center; gap: 8px; font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: .08em; }
.news-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-weight: 700; letter-spacing: .14em; }
.news-tag-red { background: var(--ev-red, #B43A2E); color: #fff; }
.news-tag-grey { background: #e2e8f0; color: #64748b; }
.news-card-body h3 { font-family: var(--font-display, 'Sora', sans-serif); font-size: 1.05rem; color: var(--ev-navy, #0F2A44); margin-top: 8px; line-height: 1.3; }
.news-card-body p { font-size: 0.85rem; color: #64748b; margin-top: 6px; line-height: 1.5; }
.news-card-cta { display: inline-block; margin-top: 12px; color: var(--ev-red, #B43A2E); font-weight: 600; font-size: 0.85rem; }
.news-card-empty { opacity: .65; }

.news-nav-card { display: flex; align-items: center; gap: 14px; padding: 18px 22px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
a.news-nav-card:hover { border-color: var(--ev-brand, #3F8DB0); box-shadow: 0 10px 24px -14px rgba(15,23,42,.18); transform: translateY(-2px); }
.news-nav-arrow { font-size: 1.5rem; color: var(--ev-brand, #3F8DB0); font-weight: 600; }
.news-nav-label { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.news-nav-title { font-family: var(--font-display, 'Sora', sans-serif); color: var(--ev-navy, #0F2A44); font-size: 0.95rem; font-weight: 600; margin-top: 2px; }
.news-nav-disabled { opacity: .5; cursor: not-allowed; }
.news-nav-back .news-nav-arrow { color: var(--ev-red, #B43A2E); }

/* ===== Famiglia card thumbnail (prodotti.html) ===== */
.fam-card { display: grid; grid-template-columns: 200px 1fr; gap: 1.25rem; align-items: center; }
.fam-thumb { position: relative; width: 200px; height: 200px; border-radius: 12px; background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); border: 1px solid #e2e8f0; border-left: 4px solid var(--cat-c, #3F8DB0); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.fam-thumb img { max-width: 92%; max-height: 92%; object-fit: contain; opacity: .95; mix-blend-mode: multiply; }
.fam-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.fam-thumb-tag { display: none; }

/* Media page tabs */
.media-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #475569; background: transparent; border: 0; cursor: pointer; transition: all .18s ease; white-space: nowrap; }
.media-tab:hover { color: #0F2A44; }
.media-tab.is-active { background: #fff; color: #0F2A44; box-shadow: 0 1px 3px rgba(15,23,42,.12), 0 4px 12px -6px rgba(15,23,42,.16); }
.video-play-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; background: rgba(255,255,255,.92); color: #B43A2E; border: 0; cursor: pointer; box-shadow: 0 8px 24px -6px rgba(0,0,0,.4); transition: transform .18s ease, background .18s ease; padding-left: 3px; }
.video-play-btn svg { width: 18px; height: 18px; }
.video-play-btn:hover { transform: scale(1.08); background: #fff; }
.video-play-btn-lg { width: 64px; height: 64px; padding-left: 4px; }
.video-play-btn-lg svg { width: 24px; height: 24px; }
@media (min-width: 768px) {
  .video-play-btn { width: 56px; height: 56px; }
  .video-play-btn svg { width: 20px; height: 20px; }
  .video-play-btn-lg { width: 80px; height: 80px; }
  .video-play-btn-lg svg { width: 32px; height: 32px; }
}
.news-tag-navy { background: #0F2A44; color: #fff; padding: 2px 8px; border-radius: 4px; font-weight: 700; }

/* ===== Mega menu Media (desktop only) ===== */
.media-menu { position: relative; }
.media-menu-trigger { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.media-chevron { transition: transform .22s ease; opacity: .7; }
.media-menu:hover .media-chevron,
.media-menu.is-open .media-chevron { transform: rotate(180deg); opacity: 1; }
.media-menu:hover .media-menu-trigger,
.media-menu.is-open .media-menu-trigger { color: var(--ev-red, #B43A2E); }

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  width: min(680px, calc(100vw - 32px));
  max-width: 92vw;
  margin-top: 18px;
  transform: translateX(-50%) translateY(-8px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(15,23,42,.20), 0 8px 24px -12px rgba(15,23,42,.10);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 60;
}
.mega-menu::before { content: ""; position: absolute; top: -18px; left: 0; right: 0; height: 18px; }
.media-menu:hover .mega-menu,
.media-menu.is-open .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mega-col { display: flex; flex-direction: column; gap: 8px; }
.mega-cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--ev-navy, #0F2A44); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-decoration: none; transition: background .18s ease, transform .18s ease; }
.mega-cta:hover { background: var(--ev-red, #B43A2E); transform: translateY(-1px); }
.mega-cta svg { transition: transform .18s ease; }
.mega-cta:hover svg { transform: translateX(3px); }
.mega-cta.is-video { background: var(--ev-brand, #3F8DB0); }
.mega-cta.is-video:hover { background: var(--ev-navy, #0F2A44); }
.mega-card { display: block; padding: 12px; border-radius: 12px; border: 1px solid transparent; background: #fff; text-decoration: none; transition: all .18s ease; }
.mega-card:hover { border-color: var(--ev-brand, #3F8DB0); background: #F8FAFC; transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(63,141,176,.28); }
.mega-thumb { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #0F2A44; margin-bottom: 12px; }
.mega-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mega-label { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ev-red, #B43A2E); }
.mega-label.is-video { color: #0F2A44; }
.mega-title { font-family: var(--font-display, 'Space Grotesk', sans-serif); font-size: 15px; color: var(--ev-navy, #0F2A44); margin-top: 3px; line-height: 1.3; font-weight: 600; }
.mega-desc { font-size: 12px; color: #64748b; margin-top: 4px; line-height: 1.45; }
.mega-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.mega-play span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.94); color: #B43A2E; padding-left: 3px; box-shadow: 0 6px 18px -4px rgba(0,0,0,.35); }
@media (max-width: 1023px) { .mega-menu { display: none !important; } .media-chevron { display: none; } }
/* Edge-safe positioning on narrower desktops: anchor right instead of center to avoid overflow */
@media (min-width: 1024px) and (max-width: 1199px) {
  .mega-menu { left: auto; right: -16px; transform: translateY(-8px); }
  .media-menu:hover .mega-menu,
  .media-menu.is-open .mega-menu { transform: translateY(0); }
}

/* Wide variant (Prodotti — 4 category cards) */
.mega-menu.mega-menu--wide {
  width: min(880px, calc(100vw - 32px));
  left: 0;
  right: auto;
  transform: translateX(-16px) translateY(-8px);
}
.media-menu:hover .mega-menu.mega-menu--wide,
.media-menu.is-open .mega-menu.mega-menu--wide {
  transform: translateX(-16px) translateY(0);
}
.mega-grid.mega-grid--4 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mega-grid.mega-grid--3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mega-thumb-light { background: #F1F5F9; }
.mega-thumb-light img { object-fit: contain; padding: 8px; }
.mega-card--cat { position: relative; padding: 12px 12px 12px 14px; border: 1px solid #e2e8f0; overflow: hidden; }
.mega-card--cat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat-c, #3F8DB0); border-radius: 12px 0 0 12px; transition: width .18s ease; }
.mega-card--cat:hover { border-color: var(--cat-c, #3F8DB0); background: #F8FAFC; transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(15,23,42,.18); }
.mega-card--cat:hover::before { width: 6px; }
.mega-card--cat .mega-label { color: var(--cat-c, #B43A2E); font-size: 9px; }
.mega-card--cat .mega-title { font-size: 14px; margin-top: 2px; }
.mega-card--cat .mega-desc { font-size: 11px; margin-top: 3px; }
@media (min-width: 1024px) and (max-width: 1199px) {
  .mega-menu.mega-menu--wide { width: min(720px, calc(100vw - 32px)); left: 0; right: auto; transform: translateX(-16px) translateY(-8px); }
  .media-menu:hover .mega-menu.mega-menu--wide,
  .media-menu.is-open .mega-menu.mega-menu--wide { transform: translateX(-16px) translateY(0); }
  .mega-grid.mega-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .mega-grid.mega-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

/* Hero slider */
.hero-slider { z-index: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 800ms ease; }
.hero-slide.is-active { opacity: 1; }

.hero-dots { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 10px; z-index: 5; }
.hero-dot { width: 10px; height: 10px; border-radius: 9999px; background: transparent; border: 1.5px solid rgba(255,255,255,.75); padding: 0; cursor: pointer; transition: background-color .25s ease, transform .25s ease; }
.hero-dot:hover { transform: scale(1.15); }
.hero-dot.is-active { background: #ffffff; border-color: #ffffff; }

/* Azienda mini dropdown */
.mega-menu.mega-menu--mini { left: 0; width: min(300px, calc(100vw - 32px)); padding: 12px; transform: translateX(-16px) translateY(-8px); }
.media-menu:hover .mega-menu.mega-menu--mini,
.media-menu.is-open .mega-menu.mega-menu--mini { transform: translateX(-16px) translateY(0); }
.mega-grid.mega-grid--1 { display: grid; grid-template-columns: 1fr; gap: 6px; }
