/* ==========================================================================
   LA PRIMAVERA - CAMPIONARIO FINITURE HPL STRATIFICATI
   Stile Elegante e Professionale per Arredo & Interior Design Contemporaneo
   ========================================================================== */

:root {
  --primary-color: #1a1e24;
  --primary-light: #2c323d;
  --accent-gold: #c5a059;
  --accent-gold-hover: #b08d47;
  --accent-gold-soft: rgba(197, 160, 89, 0.12);
  --bg-body: #f7f8fa;
  --bg-card: #ffffff;
  --bg-card-hover: #fafbfc;
  --text-main: #212529;
  --text-muted: #6c757d;
  --text-light: #9aa1a9;
  --border-color: #e5e8ed;
  --border-color-dark: #d0d5dd;
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.2s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   HEADER PRINCIPALE
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 34px;
  background-color: var(--border-color);
}

.brand-info h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primary-color);
}

.brand-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Navigazione 3 Pagine */
.pages-nav {
  display: flex;
  gap: 0.4rem;
  background: var(--bg-body);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.page-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.page-tab:hover {
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.8);
}

.page-tab.active {
  background: #ffffff;
  color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.page-tab.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-tab .badge-state {
  font-size: 0.62rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

/* ==========================================================================
   HERO / BANNER TITOLO
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, #1b2028 0%, #28303d 100%);
  color: #ffffff;
  padding: 2.2rem 2rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  right: -5%;
  bottom: -50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(197, 160, 89, 0.15);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: #adb5bd;
  max-width: 760px;
  font-weight: 400;
  line-height: 1.5;
}

/* ==========================================================================
   BARRA STRUMENTI: RICERCA & FILTRI CATEGORIA
   ========================================================================== */
.controls-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 67px;
  z-index: 90;
}

.controls-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  font-size: 0.88rem;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  background: var(--bg-body);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-soft);
}

/* Navigazione Filtro Categorie */
.categories-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-body);
  padding: 0.25rem 0.35rem;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.cat-filter-btn {
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.cat-filter-btn:hover {
  color: var(--primary-color);
}

.cat-filter-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   CONTENUTO PRINCIPALE / SEZIONI
   ========================================================================== */
.main-container {
  max-width: 1440px;
  margin: 2rem auto 4.5rem;
  padding: 0 2rem;
}

.category-section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 155px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.85rem;
}

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

.category-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.category-badge {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  background: var(--primary-color);
  color: #ffffff;
}

.category-badge.badge-cat-a { background: #334e68; }
.category-badge.badge-cat-b { background: #276749; }
.category-badge.badge-cat-c { background: #c05621; }
.category-badge.badge-cat-d { background: #6b46c1; }
.category-badge.badge-fenix { background: #000000; color: var(--accent-gold); border: 1px solid var(--accent-gold); }

.category-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-color);
}

.category-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   GRIGLIA E CARD TASSELLI (CAMPIONARIO)
   Layout proporzionato per tasselli d'arredo a scala naturale
   ========================================================================== */
.decor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.35rem;
}

.decor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.decor-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
}

/* Tassello Texture Campione */
.card-media {
  position: relative;
  width: 100%;
  height: 180px; /* Altezza tassello bilanciata per evitare ingrandimenti eccessivi */
  background-color: #f1f3f5;
  overflow: hidden;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Overlay Ingrandimento al passaggio del mouse */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 30, 36, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.decor-card:hover .card-overlay {
  opacity: 1;
}

.overlay-btn {
  background: #ffffff;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

/* Contenuto Card: SOLO Codice e Nome */
.card-content {
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.decor-code {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--primary-color);
}

.decor-category-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.decor-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.card-actions {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.btn-view-slab {
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--primary-color);
  background: var(--bg-body);
  border: 1px solid var(--border-color-dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-view-slab:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.btn-view-slab svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.btn-view-slab.btn-has-slab {
  background: #ffffff;
  border-color: var(--accent-gold);
  color: #8c6b24;
}

.btn-view-slab.btn-has-slab:hover {
  background: var(--accent-gold);
  color: #1a1e24;
  border-color: var(--accent-gold);
}

/* Empty State / Categoria D */
.empty-category-box {
  background: #ffffff;
  border: 2px dashed var(--border-color-dark);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-category-box svg {
  width: 44px;
  height: 44px;
  color: var(--text-light);
  margin-bottom: 0.85rem;
}

.empty-category-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.35rem;
}

.empty-category-box p {
  font-size: 0.88rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Nessun Risultato */
.no-results-box {
  display: none;
  text-align: center;
  padding: 3.5rem 2rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.no-results-box.show {
  display: block;
}

/* ==========================================================================
   MODALE / LIGHTBOX VISUALIZZATORE
   ========================================================================== */
.slab-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(12, 15, 18, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.slab-modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  background: rgba(22, 26, 32, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.modal-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-meta-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-btn:hover {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #1a1e24;
}

.modal-btn-close {
  background: rgba(255, 255, 255, 0.15);
}

.modal-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
}

.slab-image-wrapper {
  max-width: 95%;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
  cursor: zoom-in;
}

.slab-image-wrapper.zoomed {
  cursor: zoom-out;
  transform: scale(1.6);
  transform-origin: center center;
}

.slab-full-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111;
}

/* Frecce Navigazione Modale */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(26, 30, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.nav-arrow:hover {
  background: var(--accent-gold);
  color: #1a1e24;
  border-color: var(--accent-gold);
}

.nav-prev { left: 1.5rem; }
.nav-next { right: 1.5rem; }

.modal-footer {
  padding: 0.65rem 2rem;
  background: rgba(18, 22, 28, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #adb5bd;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  margin-top: 4.5rem;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Pulsante Ritorno in Alto */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 80;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-gold);
  transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .controls-bar {
    top: auto;
    position: relative;
  }
  .controls-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    max-width: 100%;
  }
  .categories-nav {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .pages-nav {
    width: 100%;
    overflow-x: auto;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .decor-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.9rem;
  }
  .card-media {
    height: 140px;
  }
  .nav-arrow {
    display: none;
  }
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumb-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 30px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bc-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: var(--transition);
}

.bc-link:hover {
  color: var(--accent-gold);
}

.bc-sep {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.95rem;
}

.bc-active {
  color: var(--accent-gold);
  font-weight: 600;
}

/* ==========================================================================
   HOME PAGE: HERO & STATS
   ========================================================================== */
.home-hero {
  background: linear-gradient(135deg, #13171d 0%, #1e2530 60%, #283344 100%);
  color: #ffffff;
  padding: 3.5rem 2rem 3rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.09) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(197, 160, 89, 0.15);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
}

.home-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #ffffff;
}

.home-hero-title span {
  color: var(--accent-gold);
}

.home-hero-desc {
  font-size: 1.05rem;
  color: #c0c7d2;
  max-width: 780px;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.85rem;
  color: #a4b0be;
  font-weight: 500;
}

/* ==========================================================================
   STRUTTURA AD ALBERO (TREE VIEW NAVIGATION)
   ========================================================================== */
.tree-section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.section-head {
  margin-bottom: 2.2rem;
  text-align: left;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 680px;
}

/* Contenitore dell'Albero */
.tree-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.5rem 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* Nodo Radice (Root) */
.tree-root {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #1a1e24 0%, #2b3340 100%);
  color: #ffffff;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
  position: relative;
  border-left: 4px solid var(--accent-gold);
}

.tree-root-icon {
  width: 38px;
  height: 38px;
  background: rgba(197, 160, 89, 0.2);
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.tree-root-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tree-root-sub {
  font-size: 0.78rem;
  color: #a4b0be;
  font-weight: 500;
}

/* Tronco e Rami */
.tree-trunk {
  position: relative;
  padding-left: 2.5rem;
}

/* Linea verticale guida */
.tree-trunk::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: -1.8rem;
  bottom: 2.2rem;
  width: 2px;
  background: #d8dee8;
}

/* Singolo Ramo */
.tree-branch {
  position: relative;
  margin-bottom: 1.5rem;
}

.tree-branch:last-child {
  margin-bottom: 0;
}

/* Connettore orizzontale dal tronco al ramo */
.tree-branch::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 50%;
  width: 1.25rem;
  height: 2px;
  background: #d8dee8;
  transform: translateY(-50%);
  transition: var(--transition);
}

.tree-node-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.6rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  position: relative;
}

/* Effetto Hover sul Ramo */
.tree-node-link:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 24px rgba(197, 160, 89, 0.15);
  transform: translateX(6px);
}

.tree-branch:hover::before {
  background: var(--accent-gold);
}

/* Ramo Attivo (HPL Stratificati) */
.tree-branch.active-branch .tree-node-link {
  border-color: rgba(197, 160, 89, 0.4);
  background: linear-gradient(90deg, #ffffff 0%, #fdfbf7 100%);
}

.tree-branch.active-branch .tree-node-link:hover {
  border-color: var(--accent-gold);
  background: #ffffff;
}

/* Dettagli del Nodo */
.tree-node-main {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex: 1;
}

.tree-node-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.tree-node-icon.icon-gold {
  background: var(--accent-gold-soft);
  color: var(--accent-gold-hover);
}

.tree-node-icon.icon-muted {
  background: #f1f3f7;
  color: var(--text-muted);
}

.tree-node-info h4 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tree-node-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.45rem;
}

/* Sotto-ramificazioni (Pill Tags) */
.tree-leaves {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tree-leaf-tag {
  font-size: 0.72rem;
  font-weight: 600;
  background: #f3f5f8;
  color: #4b5563;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  border: 1px solid #e2e6ed;
}

.tree-leaf-tag.gold {
  background: rgba(197, 160, 89, 0.1);
  color: #8c6823;
  border-color: rgba(197, 160, 89, 0.25);
}

/* Lato Destro del Nodo: Badge e Azione */
.tree-node-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.branch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-live {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.badge-pending {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.tree-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.tree-btn-gold {
  background: var(--accent-gold);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(197, 160, 89, 0.35);
}

.tree-btn-gold:hover {
  background: var(--accent-gold-hover);
  box-shadow: 0 4px 10px rgba(197, 160, 89, 0.45);
}

.tree-btn-muted {
  background: #eef1f6;
  color: #8a94a3;
  cursor: default;
}

/* ==========================================================================
   CARDS HUB: PANORAMICA DELLE 4 COLLEZIONI
   ========================================================================== */
.hub-section {
  max-width: 1200px;
  margin: 1rem auto 4rem;
  padding: 0 2rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.hub-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-color-dark);
}

.hub-card.active-hub-card {
  border-top: 4px solid var(--accent-gold);
}

.hub-card.active-hub-card:hover {
  border-color: var(--accent-gold);
}

.hub-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.hub-card-num {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hub-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.hub-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.2rem;
}

.hub-specs-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.hub-specs-list li {
  font-size: 0.82rem;
  color: #4b5563;
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px dashed #f0f2f5;
}

.hub-specs-list li svg {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.hub-card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hub-cta-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-gold-hover);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   RESPONSIVE PER HOME & TREE
   ========================================================================== */
@media (max-width: 840px) {
  .home-hero-title {
    font-size: 2rem;
  }
  .tree-container {
    padding: 1.5rem;
  }
  .tree-trunk {
    padding-left: 1.5rem;
  }
  .tree-trunk::before {
    left: 0.75rem;
  }
  .tree-branch::before {
    left: -0.75rem;
    width: 0.75rem;
  }
  .tree-node-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.2rem;
  }
  .tree-node-action {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================================================
   FOOTER ISTITUZIONALE
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 2.8rem 2rem 2.2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.footer-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem 1.8rem;
}

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

.footer-link:hover:not(.disabled) {
  color: var(--accent-gold-hover);
}

.footer-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-light);
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  width: 100%;
}

/* ==========================================================================
   SEZIONE COMPARATIVA TECNICA PIANI TAVOLO
   ========================================================================== */
.tech-guide-section {
  max-width: 1200px;
  margin: 3rem auto 1.5rem;
  padding: 0 1.5rem;
}

.tech-guide-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  box-shadow: var(--shadow-sm);
}

.tech-guide-header {
  margin-bottom: 1.5rem;
}

.tech-guide-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tech-guide-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.55;
}

.tech-table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
  background: #ffffff;
}

.tech-table th {
  background: #f8fafc;
  color: var(--primary-color);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.tech-table th:last-child {
  border-right: none;
}

.tech-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  color: #334155;
  vertical-align: top;
  line-height: 1.5;
}

.tech-table td:last-child {
  border-right: none;
}

.tech-table tr:last-child td {
  border-bottom: none;
}

.tech-table td strong {
  color: var(--primary-color);
}

/* ==========================================================================
   DISCLAIMER BANNER DISPONIBILITA' PER MODELLO
   ========================================================================== */
.disclaimer-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(197, 160, 89, 0.12);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #5c4415;
}

.disclaimer-alert svg {
  flex-shrink: 0;
  color: var(--accent-gold);
}

/* ==========================================================================
   BADGES SCHEDA TECNICA & MODALE PRODOTTO
   ========================================================================== */
.specs-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

.specs-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.specs-badge.badge-highlight {
  background: rgba(197, 160, 89, 0.12);
  color: #8c6b24;
  border-color: rgba(197, 160, 89, 0.35);
}

.modal-tech-box {
  margin-top: 1.25rem;
  background: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 680px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.modal-tech-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.82rem;
}

.modal-tech-table th {
  width: 32%;
  background: #f8fafc;
  font-weight: 700;
  color: var(--primary-color);
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  white-space: nowrap;
  text-align: left;
}

.modal-tech-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
  text-align: left;
}

.modal-tech-table tr:last-child th,
.modal-tech-table tr:last-child td {
  border-bottom: none;
}

/* Pulsante Download Scheda Flukso PDF nel Header Categoria */
.btn-download-pdf-doc {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #c5a059;
  color: #1a1e24;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(197, 160, 89, 0.25);
  white-space: nowrap;
}

.btn-download-pdf-doc:hover {
  background: #b08d47;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(176, 141, 71, 0.35);
}

/* Link Footer Istituzionale La Primavera */
.footer-copy a,
.footer-bottom a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: var(--transition);
}

.footer-copy a:hover,
.footer-bottom a:hover {
  color: var(--accent-gold);
}

/* Footer Modale per Download Scheda PDF */
.modal-tech-pdf-footer {
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.modal-pdf-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #2b3a4a;
}

.modal-pdf-badge-text {
  display: flex;
  flex-direction: column;
}

.modal-pdf-badge-text strong {
  font-size: 0.82rem;
  color: var(--primary-color);
}

.modal-pdf-badge-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-modal-pdf-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  background: #2b3a4a;
  color: #ffffff;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-modal-pdf-action:hover {
  background: #1a2430;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}





