@import 'stile.css';

/* ─── PRIVACY POLICY ──────────────────────────────────────────────────────── */
#privacy-hero {
  min-height: 45vh;
  background: linear-gradient(135deg, rgba(0, 87, 178, 0.92) 0%, rgba(0, 130, 53, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

#privacy-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--color-white);
  margin-bottom: 1rem;
}

#privacy-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 580px;
  font-size: 1.05rem;
}

#privacy-content {
  background: var(--color-white);
  padding: 4rem 0;
}

.privacy-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.privacy-section {
  margin-bottom: 3.5rem;
}

.privacy-section h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  color: var(--color-blue);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(0, 87, 178, 0.15);
}

.privacy-section h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-green);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.privacy-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.privacy-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.privacy-section ul li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 0.65rem;
}

.privacy-section ul li::marker {
  color: var(--color-yellow);
  font-weight: 700;
}

.privacy-highlight {
  background: rgba(0, 87, 178, 0.05);
  border-left: 4px solid var(--color-blue);
  padding: 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.privacy-highlight p {
  margin: 0;
  font-weight: 500;
  color: var(--color-text);
}

.privacy-footer-note {
  background: rgba(230, 194, 0, 0.08);
  border: 1px solid rgba(230, 194, 0, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ─── COOKIES POLICY ──────────────────────────────────────────────────────── */
#cookie-hero {
  min-height: 45vh;
  background: linear-gradient(135deg, rgba(0, 130, 53, 0.92) 0%, rgba(0, 87, 178, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

#cookie-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--color-white);
  margin-bottom: 1rem;
}

#cookie-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 580px;
  font-size: 1.05rem;
}

#cookie-content {
  background: var(--color-white);
  padding: 4rem 0;
}

.cookie-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.cookie-section {
  margin-bottom: 3.5rem;
}

.cookie-section h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  color: var(--color-blue);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(0, 87, 178, 0.15);
}

.cookie-section h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-green);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.cookie-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.cookie-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.cookie-section ul li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 0.65rem;
}

.cookie-section ul li::marker {
  color: var(--color-yellow);
  font-weight: 700;
}

.cookie-section ul li strong {
  color: var(--color-text);
}

.cookie-highlight {
  background: rgba(0, 130, 53, 0.05);
  border-left: 4px solid var(--color-green);
  padding: 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.cookie-highlight p {
  margin: 0;
  font-weight: 500;
  color: var(--color-text);
}

.cookie-type-card {
  background: var(--color-neutral);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-blue);
}

.cookie-type-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--color-blue);
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.cookie-type-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.cookie-status {
  background: rgba(230, 194, 0, 0.1);
  border: 1px solid rgba(230, 194, 0, 0.3);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.cookie-status p {
  margin: 0;
  color: var(--color-text);
  font-weight: 500;
}

.browser-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.browser-link {
  background: var(--color-neutral);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-align: center;
  transition: all var(--transition);
}

.browser-link:hover {
  border-color: var(--color-blue);
  box-shadow: 0 4px 12px rgba(0, 87, 178, 0.1);
  transform: translateY(-2px);
}

.browser-link a {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
}

.browser-link a:hover {
  color: var(--color-green);
}

.cookie-footer-note {
  background: rgba(230, 194, 0, 0.08);
  border: 1px solid rgba(230, 194, 0, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.toc {
  background: var(--color-neutral);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  border: 1px solid var(--color-border);
}

.toc h3 {
  color: var(--color-blue);
  margin-top: 0;
  margin-bottom: 1rem;
  border: none;
  padding: 0;
  font-size: 1.15rem;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc ul li {
  margin-bottom: 0.75rem;
}

.toc ul li a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color var(--transition);
  font-weight: 500;
  font-size: 0.95rem;
}

.toc ul li a:hover {
  color: var(--color-green);
  text-decoration: underline;
}

.no-cookies-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.no-cookies-list li {
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.no-cookies-list li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: var(--color-blue);
  font-weight: 700;
  font-size: 1.1rem;
}

.contact-info {
  background: var(--color-neutral);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
}

.contact-info p {
  margin: 0.5rem 0;
  font-weight: 500;
  color: var(--color-text);
}

.contact-info a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-info a:hover {
  color: var(--color-green);
}

/* ─── NOTE LEGALI ──────────────────────────────────────────────────────── */
#legal-hero {
  min-height: 45vh;
  background: linear-gradient(135deg, rgba(0, 87, 178, 0.92) 0%, rgba(28, 35, 42, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

#legal-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--color-white);
  margin-bottom: 1rem;
}

#legal-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 580px;
  font-size: 1.05rem;
}

#legal-content {
  background: var(--color-white);
  padding: 4rem 0;
}

.legal-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.legal-section {
  margin-bottom: 3.5rem;
}

.legal-section h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  color: var(--color-blue);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(0, 87, 178, 0.15);
}

.legal-section h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-green);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.legal-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-section ul li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 0.65rem;
}

.legal-section ul li::marker {
  color: var(--color-yellow);
  font-weight: 700;
}

.legal-section strong {
  color: var(--color-text);
  font-weight: 600;
}

.legal-highlight {
  background: rgba(0, 87, 178, 0.05);
  border-left: 4px solid var(--color-blue);
  padding: 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.legal-highlight p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
}

.company-card {
  background: var(--color-neutral);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-green);
}

.company-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--color-blue);
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.company-card p {
  margin: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.company-card strong {
  color: var(--color-text);
}

.legal-warning {
  background: rgba(230, 194, 0, 0.1);
  border: 1px solid rgba(230, 194, 0, 0.3);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.legal-warning p {
  margin: 0;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}

.legal-footer-note {
  background: rgba(230, 194, 0, 0.08);
  border: 1px solid rgba(230, 194, 0, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.contact-badge {
  display: inline-block;
  background: var(--color-neutral);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0.25rem 0.5rem 0;
  font-size: 0.9rem;
  color: var(--color-text);
}

.contact-badge a {
  color: var(--color-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.contact-badge a:hover {
  color: var(--color-green);
}

.toc {
  background: var(--color-neutral);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  border: 1px solid var(--color-border);
}

.toc h3 {
  color: var(--color-blue);
  margin-top: 0;
  margin-bottom: 1rem;
  border: none;
  padding: 0;
  font-size: 1.15rem;
}

.toc ol {
  list-style: decimal;
  margin: 0;
  padding-left: 1.5rem;
}

.toc ol li {
  margin-bottom: 0.6rem;
  padding-left: 0.5rem;
}

.toc ol li a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color var(--transition);
  font-weight: 500;
  font-size: 0.95rem;
}

.toc ol li a:hover {
  color: var(--color-green);
  text-decoration: underline;
}

.compliance-badge {
  display: inline-block;
  background: rgba(0, 130, 53, 0.1);
  border: 1px solid rgba(0, 130, 53, 0.3);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  margin-right: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ─── CODICE ETICO ──────────────────────────────────────────────────────── */
/* PROGRESS BAR */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-blue), var(--color-green), var(--color-yellow));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* CHAPTER COUNTER (top-right, fixed) */
#chapter-counter {
  position: fixed;
  top: 88px;
  right: 1.5rem;
  z-index: 200;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  transition: color 0.4s ease;
  pointer-events: none;
}

#chapter-counter.on-white {
  color: var(--color-text-muted);
  text-shadow: none;
}

/* HERO — COVER CHAPTER */
#hero-codice {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding-top: 72px;
}

#hero-codice .hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom,
      rgba(0, 20, 50, 0.55) 0%,
      rgba(0, 40, 20, 0.45) 50%,
      rgba(0, 0, 0, 0.70) 100%);
  background-size: cover;
  background-position: center;
  /* Image loaded via lazy-loading: ../images/codice-etico-hero.png */
  /* ── IMAGE 0 PLACEHOLDER ──
               Replace URL above with: ../images/codice0_hero.png
               Prompt reference: IMAGE 0 — Solar farm at golden hour, 16:9
            ── */
}

#hero-codice .hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 2rem;
}

#hero-codice .hero-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-yellow);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s ease forwards;
}

#hero-codice h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.55s ease forwards;
}

#hero-codice h1 span {
  color: var(--color-yellow);
}

#hero-codice .hero-quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s ease forwards;
}

#hero-codice .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.8s 1.05s ease forwards;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  background: var(--color-yellow);
  color: var(--color-dark);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(230, 194, 0, 0.4);
}

.btn-scroll-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-scroll-cta:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Scroll arrow */
.scroll-arrow {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.4);
  animation: bounce 2s ease infinite;
  z-index: 2;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* INTRO SECTION (light background) */
#intro-section {
  background: var(--color-white);
  padding: 6rem 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.intro-card {
  background: var(--color-neutral);
  border-radius: 16px;
  padding: 2rem;
  border-left: 4px solid var(--color-blue);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.intro-card:nth-child(2) {
  border-left-color: var(--color-green);
  transition-delay: 0.15s;
}

.intro-card:nth-child(3) {
  border-left-color: var(--color-yellow);
  transition-delay: 0.3s;
}

.intro-card.visible {
  opacity: 1;
  transform: none;
}

.intro-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.intro-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-blue);
  margin-bottom: 0.75rem;
}

.intro-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* CHAPTER SECTIONS — Full-screen cinematic */
.chapter {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.chapter.align-left {
  justify-content: flex-start;
}

/* Background image fills entire chapter */
.chapter-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  transition: transform 0.1s linear;
}

/* Full overlay — dark but not black, with brand color tint */
.chapter-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(0, 20, 50, 0.82) 0%,
      rgba(0, 40, 20, 0.65) 100%);
}

.chapter.align-left .chapter-overlay {
  background: linear-gradient(225deg,
      rgba(0, 20, 50, 0.82) 0%,
      rgba(0, 40, 20, 0.65) 100%);
}

/* Content panel */
.chapter-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding: 4rem 4rem 4rem 3rem;
  margin-right: 6vw;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.chapter.align-left .chapter-content {
  margin-right: 0;
  margin-left: 6vw;
  transform: translateX(-40px);
  padding: 4rem 3rem 4rem 4rem;
}

.chapter.visible .chapter-content {
  opacity: 1;
  transform: none;
}

/* Chapter number */
.chapter-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-yellow);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chapter-num::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--color-yellow);
  border-radius: 2px;
}

/* Chapter heading */
.chapter-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

/* Chapter body text */
.chapter-content p {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1rem;
}

/* Bullet list inside chapter */
.chapter-bullets {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.chapter-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 0.65rem;
}

.chapter-bullets li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-yellow);
  margin-top: 0.5em;
}

/* Principle tag */
.principle-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-yellow);
  background: rgba(230, 194, 0, 0.12);
  border: 1px solid rgba(230, 194, 0, 0.35);
  border-radius: 50px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1rem;
}

/* Blockquote inside chapter */
.chapter-quote {
  border-left: 3px solid var(--color-yellow);
  padding-left: 1.25rem;
  margin: 1.25rem 0;
}

.chapter-quote p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

/* ─── BG IMAGE PER CHAPTER ──────────────────────────────────────── */

/* Chapter 1 – Legalità */
#ch1 .chapter-bg {
  background-image:
    url('../s/images/codice1_legalita.png');
  /* IMAGE 1: Two hands shaking, courthouse, golden glow
               Replace src with: ../images/codice1_legalita.png */
  background-color: #0a1628;
  /* fallback */
}

/* Chapter 2 – Trasparenza */
#ch2 .chapter-bg {
  background-image:
    url('../s/images/codice2_trasparenza.png');
  /* IMAGE 2: Crystal prism refracting light
               Replace src: ../images/codice2_trasparenza.png */
  background-color: #0d1f2d;
}

/* Chapter 3 – Risorse */
#ch3 .chapter-bg {
  background-image:
    url('../s/images/codice3_risorse.png');
  /* IMAGE 3: Seed sprouting from coin / budget
               Replace src: ../images/codice3_risorse.png */
  background-color: #0d1a10;
}

/* Chapter 4 – Persone */
#ch4 .chapter-bg {
  background-image:
    url('../s/images/codice4_persone.png');
  /* IMAGE 4: Diverse group in circle of warm light
               Replace src: ../images/codice4_persone.png */
  background-color: #1a0d28;
}

/* Chapter 5 – Ambiente */
#ch5 .chapter-bg {
  background-image:
    url('../s/images/codice5_ambiente.png');
  /* IMAGE 5: Aerial view, valley + solar installation
               Replace src: ../images/codice5_ambiente.png */
  background-color: #0d1f10;
}

/* Chapter 6 – Transizione */
#ch6 .chapter-bg {
  background-image:
    url('../s/images/codice6_transizione.png');
  /* IMAGE 6: Energy flowing from panels to city skyline
               Replace src: ../images/codice6_transizione.png */
  background-color: #0a1020;
}

/* Chapter 7 – Sicurezza */
#ch7 .chapter-bg {
  background-image:
    url('../s/images/codice7_sicurezza.png');
  /* IMAGE 7: Worker in hard hat at sunrise on solar array
               Replace src: ../images/codice7_sicurezza.png */
  background-color: #1a1008;
}

/* Chapter 8 – Sostenibilità */
#ch8 .chapter-bg {
  background-image:
    url('../s/images/codice8_sostenibilita.png');
  /* IMAGE 8: Tree with solar-panel roots, glowing nodes
               Replace src: ../images/codice8_sostenibilita.png */
  background-color: #0a1a0a;
}

/* COMPORTAMENTO SECTION (light) */
#comportamento {
  background: var(--color-neutral);
  padding: 6rem 0;
}

.comportamento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}

.comp-card {
  background: var(--color-white);
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.25s ease;
}

.comp-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.comp-card.visible {
  opacity: 1;
  transform: none;
}

.comp-card:nth-child(1) {
  transition-delay: 0s;
}

.comp-card:nth-child(2) {
  transition-delay: 0.1s;
}

.comp-card:nth-child(3) {
  transition-delay: 0.2s;
}

.comp-card:nth-child(4) {
  transition-delay: 0.3s;
}

.comp-card:nth-child(5) {
  transition-delay: 0.4s;
}

.comp-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.comp-card-icon.blue {
  background: rgba(0, 87, 178, 0.1);
}

.comp-card-icon.green {
  background: rgba(0, 130, 53, 0.1);
}

.comp-card-icon.yellow {
  background: rgba(230, 194, 0, 0.15);
}

.comp-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 0.75rem;
}

.comp-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comp-card ul li {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.4rem;
}

.comp-card ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--color-yellow);
  font-weight: 700;
}

/* CLOSING CTA SECTION */
#cta-section {
  background: linear-gradient(135deg,
      rgba(0, 87, 178, 0.95) 0%,
      rgba(0, 130, 53, 0.90) 100%);
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

#cta-section h2 {
  color: #ffffff;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
}

#cta-section p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.cta-buttons .btn-download {
  font-size: 0.9rem;
  padding: 1rem 2.25rem;
}

.cta-buttons .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1rem 2.25rem;
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.25s ease;
}

.cta-buttons .btn-ghost:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

/* UTILITY & ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Section headings shared */
.section-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-yellow);
  display: block;
  margin-bottom: 0.75rem;
}

/* Override stile.css h2 inside white sections for consistency */
#intro-section h2,
#comportamento h2,
#cta-section h2 {
  font-family: 'Montserrat', sans-serif;
}

/* Mobile adjustments */
@media (max-width: 800px) {
  .chapter-content {
    max-width: 100%;
    margin: 0 !important;
    padding: 5rem 1.5rem 3rem !important;
  }

  .chapter {
    align-items: flex-end;
    justify-content: center !important;
  }

  .chapter-content h2 {
    font-size: 1.7rem;
  }

  #chapter-counter {
    display: none;
  }

  #cookie-hero {
    min-height: 35vh;
    padding-top: 72px;
  }

  #cookie-hero h1 {
    font-size: 2rem;
  }

  #cookie-content {
    padding: 2.5rem 0;
  }

  .cookie-section {
    margin-bottom: 2.5rem;
  }

  .toc {
    padding: 1.5rem;
  }

  .browser-links {
    grid-template-columns: 1fr;
  }

  #legal-hero {
    min-height: 35vh;
    padding-top: 72px;
  }

  #legal-hero h1 {
    font-size: 2rem;
  }

  #legal-content {
    padding: 2.5rem 0;
  }

  .legal-section {
    margin-bottom: 2.5rem;
  }

  .toc {
    padding: 1.5rem;
  }

  .company-card {
    padding: 1.25rem;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  #hero-codice h1 {
    font-size: 2.4rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}