/* =====================================================
   SITE.CSS
   Base strutturale e tipografica del sito
   Governa Bootstrap, non lo sostituisce
   ===================================================== */

/* -----------------------------------------------------
   A. VARIABILI GLOBALI
   ----------------------------------------------------- */

:root {
  --font-base-size: 16px;
  --line-height-base: 1.6;

  --content-max-width: 1100px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;

  --color-text: #1a1a1a;
  --color-muted: #555;
  --color-background: #ffffff;
  --color-accent: #2c3e50;

  --menu-text: #1a1a1a;
  --menu-accent: #2b4f6b;
}

/* -----------------------------------------------------
   B. RESET E NORMALIZZAZIONE
   ----------------------------------------------------- */

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

html {
  font-size: var(--font-base-size);
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-background);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* -----------------------------------------------------
   C. TIPOGRAFIA
   ----------------------------------------------------- */

h1, h2, h3, h4 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

p.muted {
  color: var(--color-muted);
}

ul, ol {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  padding-left: 1.2rem;
}

/* -----------------------------------------------------
   D. LAYOUT STRUTTURALE
   ----------------------------------------------------- */

.site-wrapper {
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
}

.section {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.section-header {
  margin-bottom: var(--space-md);
}

.section-body {
  max-width: 800px;
}

/* -----------------------------------------------------
   E. STRUTTURE SEMANTICHE ASTRATTE
   ----------------------------------------------------- */

.page-header {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-md);
}

.page-footer {
  padding-top: var(--space-md);
  padding-bottom: var(--space-md);
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* -----------------------------------------------------
   F. UTILITY MINIME
   ----------------------------------------------------- */

.text-center { text-align: center; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Icone di sezione */
.section-icon {
  display: inline-block;
  margin-right: 0.4em;
  vertical-align: middle;
}

/* -----------------------------------------------------
   G. INTERAZIONI – SEZIONI COLLASSABILI
   ----------------------------------------------------- */

.section-toggle-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}


/* -----------------------------------------------------
   HEADER E NAVIGAZIONE
   ----------------------------------------------------- */

.site-header {
  padding: 2.5rem 0 3rem;
  overflow-x: hidden;
}

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

.site-logo svg {
  display: block;
}

.main-nav .nav-list {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  font-size: 0.95rem;
  color: #444;
  text-decoration: none;
}

.main-nav a.active {
  color: #000;
  font-weight: 600;
  text-decoration: underline;
}

/* Mobile */
.menu-toggle {
  background: none;
  border: none;
  font-size: 0.95rem;
  color: var(--menu-text);
  margin-left: auto;
}

.main-nav-mobile {
  margin-top: 1rem;
}

.main-nav-mobile .nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.main-nav-mobile .nav-list a {
  color: var(--menu-text);
  text-decoration: none;
}

.main-nav-mobile .nav-list a:hover,
.main-nav-mobile .nav-list a:focus {
  color: var(--menu-accent);
  text-decoration: underline;
}

.main-nav-mobile .nav-list a.active {
  color: var(--menu-accent);
  font-weight: 500;
}

/* -----------------------------------------------------
   LISTE OPERATIVE – SEPARATORI RAFFINATI
   ----------------------------------------------------- */

.tool-list,
.role-list,
.unit-list,
.flow-list,
.method-list,
.domain-list,
.case-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

/* Separatori standard */
.tool-item,
.role-list li,
.unit-list li,
.flow-list li,
.method-list li,
.domain-list li {
  display: block;
  width: 100%;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);

  background-image: linear-gradient(
    to right,
    transparent,
    rgba(0, 0, 0, 0.08),
    transparent
  );
  background-repeat: no-repeat;
  background-position: bottom;
  background-size: 100% 1px;
}

/* Separatori SOLO tra i casi studio (primo livello) */
.case-list > li {
  display: block;
  width: 100%;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);

  background-image: linear-gradient(
    to right,
    transparent,
    rgba(0, 0, 0, 0.08),
    transparent
  );
  background-repeat: no-repeat;
  background-position: bottom;
  background-size: 100% 1px;
}

/* Ultimo elemento: nessuna linea */
.tool-item:last-child,
.role-list li:last-child,
.unit-list li:last-child,
.flow-list li:last-child,
.method-list li:last-child,
.domain-list li:last-child,
.case-list > li:last-child {
  background-image: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.flusso-lock {
  pointer-events: none;
  opacity: .6;
}

