/* =========================================================================
   81+ SAFETY OS · MASTER LAYOUT CSS (HEADER, FOOTER, LEGAL & COMPLIANCE)
   Unificazione Visual Identità Brand 81+ · Labo Tecnic Studio (dal 2003)
   ========================================================================= */

:root {
  --brand-green: #00875A;
  --brand-green-hover: #00704A;
  --brand-green-light: #EAF5EF;
  --brand-green-neon: #10B981;
  --brand-dark: #0A0A0A;
  --brand-dark-card: #0F172A;
  --brand-gray-dark: #1F2421;
  --brand-gray: #4A5568;
  --brand-gray-light: #F8FAFC;
  --brand-border: #E2E8F0;
  --brand-border-dark: rgba(255, 255, 255, 0.1);
  --brand-white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 28px rgba(0, 135, 90, 0.16);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  background-color: var(--brand-white);
  color: var(--brand-dark);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.master-page-body {
  flex: 1 0 auto;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================================================
   MASTER HEADER (STICKY)
   ========================================================================= */
.master-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--brand-border);
  padding: 12px 0;
  width: 100%;
}

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

.header-brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-square-badge {
  width: 44px;
  height: 44px;
  background: var(--brand-green);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 12px rgba(0, 135, 90, 0.25);
  flex-shrink: 0;
}

.header-payoff-badge {
  display: flex;
  flex-direction: column;
}

.payoff-text {
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--brand-dark);
  text-transform: uppercase;
}

.payoff-sub {
  font-size: 0.72rem;
  color: var(--brand-green);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-link {
  color: var(--brand-gray);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-green);
}

.header-cta-btn {
  background: var(--brand-green);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-cta-btn:hover {
  background: var(--brand-green-hover);
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
}

/* =========================================================================
   CORPORATE MASTER FOOTER (LABO TECNIC STUDIO)
   ========================================================================= */
.corp-master-footer {
  background: #090D12;
  color: #CBD5E1;
  border-top: 2px solid #00875A;
  padding: 54px 0 28px;
  font-size: 0.88rem;
  position: relative;
  z-index: 10;
  width: 100%;
}

.corp-footer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 28px;
  margin-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.corp-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.corp-brand-badge {
  width: 48px;
  height: 48px;
  background: #00875A;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 1.35rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 135, 90, 0.4);
  flex-shrink: 0;
}

.corp-brand-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.corp-brand-sub {
  font-size: 0.84rem;
  color: #94A3B8;
  margin-top: 3px;
}

.corp-header-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.corp-tag {
  background: rgba(0, 135, 90, 0.15);
  border: 1px solid rgba(0, 135, 90, 0.4);
  color: #34D399;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.corp-footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.15fr 1.1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.corp-col-title {
  font-size: 0.96rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 8px;
}

.corp-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: #00875A;
  border-radius: 2px;
}

.corp-corp-info p {
  margin-bottom: 7px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #94A3B8;
}

.corp-corp-info strong {
  color: #E2E8F0;
}

.corp-corp-info a {
  color: #34D399;
  text-decoration: none;
}

.corp-corp-info a:hover {
  text-decoration: underline;
}

.corp-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.corp-links a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.corp-links a:hover {
  color: #34D399;
  transform: translateX(3px);
}

.corp-meta-badge {
  display: inline-block;
  font-size: 0.78rem;
  color: #64748B;
  padding: 2px 0;
  line-height: 1.4;
}

.corp-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  text-align: center;
}

.corp-copy {
  font-size: 0.82rem;
  color: #64748B;
  line-height: 1.6;
}

.corp-sub-copy {
  font-size: 0.74rem;
  color: #475569;
}

@media (max-width: 900px) {
  .corp-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }
}

@media (max-width: 600px) {
  .corp-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .corp-footer-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================================
   COOKIE CONSENT BANNER (GDPR / PRIVACY)
   ========================================================================= */
.cookie81-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9980;
  background: rgba(11, 15, 20, 0.97);
  backdrop-filter: blur(14px);
  border-top: 2px solid #00875A;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie81-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}

.cookie81-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.cookie81-text {
  font-size: 0.83rem;
  color: #CBD5E1;
  line-height: 1.5;
}

.cookie81-text strong {
  color: #FFFFFF;
}

.cookie81-text a {
  color: #34D399;
  text-decoration: underline;
  font-weight: 700;
}

.cookie81-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie81-btn-sec {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie81-btn-sec:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.cookie81-btn-prim {
  background: #00875A;
  border: none;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 9px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 135, 90, 0.4);
  white-space: nowrap;
}

.cookie81-btn-prim:hover {
  background: #10B981;
}

/* =========================================================================
   STILI DEDICATI PAGINE INTERNE, LEGALI E DOCUMENTALI
   ========================================================================= */
.legal-page-wrap {
  padding: 56px 20px 80px;
  max-width: 960px;
  margin: 0 auto;
}

.legal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #EAF5EF;
  color: #00875A;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 135, 90, 0.25);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-header-title {
  font-size: 2.35rem;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.legal-header-sub {
  color: #64748B;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.legal-box-highlight {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #00875A;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-subtle);
}

.legal-box-highlight h3 {
  font-size: 1.18rem;
  font-weight: 900;
  color: #00875A;
  margin-bottom: 12px;
}

.legal-box-highlight p {
  font-size: 0.94rem;
  color: #334155;
  line-height: 1.7;
}

.legal-section-block {
  margin-bottom: 36px;
}

.legal-section-block h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section-block p {
  font-size: 0.96rem;
  color: #475569;
  line-height: 1.75;
  margin-bottom: 14px;
}

.legal-section-block ul, .legal-section-block ol {
  font-size: 0.96rem;
  color: #475569;
  line-height: 1.75;
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-section-block li {
  margin-bottom: 8px;
}

.legal-section-block strong {
  color: #1E293B;
}

.legal-nav-switch {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 24px;
  margin-top: 48px;
  text-align: center;
}

.legal-nav-switch-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #00875A;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.legal-nav-switch-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.legal-nav-switch-links a {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.legal-nav-switch-links a:hover, .legal-nav-switch-links a.active {
  color: #00875A;
  font-weight: 800;
  text-decoration: underline;
}

.btn-legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #00875A;
  color: #FFFFFF;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.btn-legal-back:hover {
  background: #00704A;
  transform: translateY(-1px);
}
