/* ═══════════════════════════════════════════════════
   COREX S.p.A. — ethical-code.css
   Colore tema: --purple #6446a0
═══════════════════════════════════════════════════ */

:root { --purple: #6446a0; --purple-dark: #4e3480; --purple-lt: rgba(100,70,160,.08); }

/* ━━━━ HERO ━━━━ */
.eth-hero { background-image: url('../img/corex2.jpg'); }

/* ━━━━ TESTI COMUNI ━━━━ */
.eth-section-title {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; color: var(--black);
  line-height: 1.15; letter-spacing: -.025em;
  margin-top: .6rem; margin-bottom: 0;
}
.eth-section-title em { font-style: normal; font-weight: 300; color: var(--purple); }

.eth-body {
  font-size: clamp(.9rem, 1.4vw, 1.02rem);
  color: var(--gray-dark); line-height: 1.8; margin-bottom: 1.1rem;
}
.eth-body strong { color: var(--black); font-weight: 600; }

/* ━━━━ INTRO ━━━━ */
.eth-intro-section { padding: 7rem 0; background: var(--white); }
.eth-intro-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 3fr 2fr;
  gap: 5rem; align-items: start;
}

/* Mini pillars */
.eth-intro-pillars {
  display: flex; flex-direction: column; gap: 1.4rem;
  padding-top: .5rem;
}
.eth-pillar-mini {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--off-white); border-radius: 12px;
  padding: 1.1rem 1.2rem;
  border-left: 3px solid var(--purple);
  transition: box-shadow .28s var(--ease), transform .28s var(--ease);
}
.eth-pillar-mini:hover {
  box-shadow: 0 6px 24px rgba(100,70,160,.12);
  transform: translateX(4px);
}
.eth-pillar-mini-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--purple-lt); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.eth-pillar-mini-icon svg { width: 22px; height: 22px; }
.eth-pillar-mini div strong {
  display: block; font-size: .88rem; font-weight: 700;
  color: var(--black); margin-bottom: .2rem;
}
.eth-pillar-mini div p {
  font-size: .8rem; color: var(--gray-mid); line-height: 1.6; margin: 0;
}

@media (max-width: 900px) {
  .eth-intro-section { padding: 5rem 0; }
  .eth-intro-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 480px) {
  .eth-intro-section { padding: 3.5rem 0; }
  .eth-intro-inner   { padding: 0 1.2rem; }
}

/* ━━━━ CODE SECTION — layout 2 colonne ━━━━ */
.eth-code-section { padding: 5rem 0 7rem; background: var(--off-white); }
.eth-code-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 220px 1fr;
  gap: 4rem; align-items: start;
}

/* TOC sidebar sticky */
.eth-toc { position: relative; }
.eth-toc-sticky {
  position: sticky; top: calc(var(--nav-h) + 1.5rem);
  background: var(--white); border-radius: 14px;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
}
.eth-toc-label {
  font-size: .68rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--gray-mid); margin-bottom: 1rem;
}
.eth-toc-sticky ul { list-style: none; display: flex; flex-direction: column; gap: .2rem; }
.eth-toc-link {
  display: block; padding: .55rem .75rem;
  font-size: .82rem; font-weight: 500;
  color: var(--gray-dark); text-decoration: none;
  border-left: 2.5px solid transparent; border-radius: 0 6px 6px 0;
  transition: color .2s, border-color .2s, background .2s;
}
.eth-toc-link:hover, .eth-toc-link.active {
  color: var(--purple); border-left-color: var(--purple);
  background: var(--purple-lt);
}

.eth-download-btn {
  display: flex; align-items: center; gap: .5rem;
  margin-top: 1.4rem; padding: .65rem 1rem;
  font-size: .76rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--purple); text-decoration: none;
  border: 1.5px solid rgba(100,70,160,.25);
  border-radius: 8px; background: var(--purple-lt);
  transition: background .2s, border-color .2s;
}
.eth-download-btn:hover {
  background: rgba(100,70,160,.14);
  border-color: var(--purple);
}

/* Chapters */
.eth-chapter {
  margin-bottom: 4rem;
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}
.eth-chapter:last-child { margin-bottom: 0; }

.eth-chapter-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2rem; padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-lt);
}
.eth-chapter-num {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .3rem .9rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--purple);
  background: var(--purple-lt); border-radius: 50px;
  flex-shrink: 0;
}
.eth-chapter-title {
  font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 700;
  color: var(--black); letter-spacing: -.015em; margin: 0;
}

/* Articles */
.eth-article {
  background: var(--white); border-radius: 12px;
  padding: 1.6rem 1.8rem; margin-bottom: 1.2rem;
  box-shadow: 0 1px 10px rgba(0,0,0,.05);
  transition: box-shadow .28s var(--ease);
}
.eth-article:hover { box-shadow: 0 4px 22px rgba(0,0,0,.09); }

.eth-article-title {
  font-size: .96rem; font-weight: 700; color: var(--black);
  margin-bottom: .8rem; display: flex; align-items: center; gap: .7rem;
  flex-wrap: wrap;
}
.eth-art-num {
  display: inline-flex; align-items: center;
  padding: .2rem .65rem; font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--purple-lt); color: var(--purple);
  border-radius: 50px; flex-shrink: 0;
}

.eth-article p {
  font-size: .88rem; color: var(--gray-dark);
  line-height: 1.8; margin-bottom: .8rem;
}
.eth-article p:last-child { margin-bottom: 0; }
.eth-article p strong { color: var(--black); font-weight: 600; }

.eth-list {
  list-style: none; margin: .6rem 0 0 0;
  display: flex; flex-direction: column; gap: .5rem;
}
.eth-list li {
  font-size: .86rem; color: var(--gray-dark); line-height: 1.7;
  padding-left: 1.2rem; position: relative;
}
.eth-list li::before {
  content: ''; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple); opacity: .6;
}

.eth-link {
  color: var(--purple); border-bottom: 1px solid rgba(100,70,160,.3);
  transition: border-color .2s;
}
.eth-link:hover { border-color: var(--purple); }

/* In force badge */
.eth-in-force {
  display: flex; align-items: flex-start; gap: .8rem;
  background: var(--purple-lt); border-radius: 10px;
  padding: 1rem 1.2rem; margin-top: 1.4rem;
  border: 1px solid rgba(100,70,160,.15);
}
.eth-in-force span {
  font-size: .84rem; color: var(--gray-dark); line-height: 1.7;
}
.eth-in-force span strong { color: var(--black); font-weight: 600; }

@media (max-width: 900px) {
  .eth-code-section { padding: 4rem 0 5rem; }
  .eth-code-inner   { grid-template-columns: 1fr; gap: 2rem; }
  .eth-toc-sticky   { position: static; }
  .eth-toc-sticky ul { flex-direction: row; flex-wrap: wrap; gap: .3rem; }
  .eth-toc-link     { border-left: none; border-bottom: 2px solid transparent; border-radius: 6px; }
  .eth-toc-link:hover, .eth-toc-link.active {
    border-left: none; border-bottom-color: var(--purple);
    border-radius: 6px;
  }
}
@media (max-width: 600px) {
  .eth-code-section { padding: 3rem 0 4rem; }
  .eth-code-inner   { padding: 0 1.2rem; gap: 1.5rem; }
  .eth-article      { padding: 1.2rem 1.1rem; }
  .eth-chapter-header { flex-direction: column; align-items: flex-start; gap: .5rem; }
}

/* ━━━━ PARALLAX PASSION ━━━━ */
.eth-passion-section {
  position: relative; padding: 8rem 2rem;
  background-image: url('../img/corex5.jpg');
  background-size: cover; background-position: center;
  background-attachment: fixed; text-align: center;
  overflow: hidden;
}
.eth-passion-overlay {
  position: absolute; inset: 0;
  background: rgba(30, 15, 55, .82); z-index: 0;
}
.eth-passion-inner {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
}
.eth-passion-title {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 300; color: var(--white);
  line-height: 1.55; letter-spacing: -.01em;
}
.eth-passion-title em { font-style: normal; font-weight: 700; color: rgba(255,255,255,.9); }

.eth-passion-links {
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  margin-top: .4rem;
}
.eth-passion-link {
  display: inline-flex; align-items: center;
  padding: .6rem 1.3rem;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.7); text-decoration: none;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 50px;
  transition: color .2s, border-color .2s, background .2s;
}
.eth-passion-link:hover {
  color: var(--white); border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.08);
}

@media (max-width: 900px) { .eth-passion-section { background-attachment: scroll; } }
@media (max-width: 600px) { .eth-passion-section { padding: 5rem 1.2rem; } }