/* Layout — Header, Footer, Navigazione (corporate) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-primary);
}
.logo svg,
.logo img.logo-img,
.logo object.logo-img {
  width: auto;
  height: 2rem;
  max-width: 180px;
  object-fit: contain;
  color: var(--color-primary);
}
.logo object.logo-img { pointer-events: none; overflow: hidden; }
.logo:hover { color: var(--color-primary); }

.nav-main {
  display: none;
}
@media (min-width: 768px) {
  .nav-main {
    display: flex;
    align-items: center;
    gap: 0;
  }
  .nav-main a {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
  }
  .nav-main a:hover {
    color: var(--color-primary);
  }
  .nav-main a.active {
    color: var(--color-primary);
    font-weight: 600;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.header-actions .btn { white-space: nowrap; }

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-primary);
  cursor: pointer;
}
@media (min-width: 768px) { .menu-toggle { display: none; } }
.menu-toggle svg { width: 1.25rem; height: 1.25rem; }

.nav-mobile {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-surface);
  padding: var(--space-8);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  z-index: 99;
}
.nav-mobile.is-open { transform: translateX(0); }
@media (min-width: 768px) { .nav-mobile { display: none; } }

.nav-mobile a {
  display: block;
  padding: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
}
.nav-mobile a:hover { background: var(--color-surface-alt); }

.nav-mobile .header-actions {
  margin-top: var(--space-8);
  flex-direction: column;
  align-items: stretch;
}
.nav-mobile .header-actions .btn { justify-content: center; }

/* Footer — istituzionale */
.site-footer {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-20) 0 var(--space-10);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}
.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--space-10); }
}

.footer-brand .logo { color: #fff; }
.footer-brand .logo svg,
.footer-brand .logo object.logo-img { color: rgba(255, 255, 255, 0.9); }
.footer-brand .logo object.logo-img { height: 1.75rem; width: auto; max-width: 140px; }
.footer-brand p {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 22rem;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 var(--space-4);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-col a { font-size: var(--text-sm); }

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer-bottom p {
  margin: 0;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
}
