:root {
  --navy: #0f2947;
  --navy-2: #173b63;
  --gold: #c89b3c;
  --gold-light: #e2c477;
  --ink: #1f2933;
  --muted: #62707e;
  --bg: #f6f8fa;
  --white: #ffffff;
  --border: #dce2e7;
  --success: #245f4a;
  --shadow: 0 14px 40px rgba(15, 41, 71, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 999;
  padding: 10px 14px;
  background: var(--white);
  color: var(--navy);
}

.skip-link:focus {
  left: 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo img {
  width: 260px;
  display: block;
}

.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  font-weight: 700;
  color: var(--navy);
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--gold);
}

.hero {
  background:
    linear-gradient(90deg, rgba(15,41,71,.97), rgba(15,41,71,.86)),
    radial-gradient(circle at right, rgba(200,155,60,.30), transparent 45%);
  color: var(--white);
  padding: 100px 0 92px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 60px;
  align-items: center;
}

.eyebrow {
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 12px 0 16px;
  font-size: clamp(46px, 7vw, 88px);
  line-height: .98;
}

.hero .motto {
  color: var(--gold-light);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  margin-bottom: 24px;
}

.hero p {
  max-width: 760px;
  font-size: 19px;
  color: #e8edf2;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 800;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gold);
  color: #172231;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--gold-light);
}

.btn-outline {
  border-color: rgba(255,255,255,.7);
  color: var(--white);
}

.hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  padding: 32px;
  border-radius: 16px;
}

.hero-card strong {
  display: block;
  color: var(--gold-light);
  font-size: 19px;
  margin-bottom: 12px;
}

.section {
  padding: 78px 0;
}

.section-soft {
  background: var(--bg);
}

.section-title {
  max-width: 850px;
  margin-bottom: 36px;
}

.section-title h2 {
  color: var(--navy);
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 10px;
}

.section-title p {
  color: var(--muted);
  font-size: 18px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pillar {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 5px solid var(--gold);
  padding: 28px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.pillar-icon {
  font-size: 34px;
}

.pillar h3 {
  color: var(--navy);
  margin: 16px 0 8px;
}

.topics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.topic {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 24px;
  background: var(--white);
}

.topic h3 {
  margin-top: 0;
  color: var(--navy);
}

.article1260 {
  background: var(--navy);
  color: var(--white);
}

.article1260 .law-card {
  border-left: 5px solid var(--gold);
  padding: 10px 0 10px 28px;
  max-width: 900px;
}

.article1260 h2 {
  font-size: 44px;
  margin-bottom: 12px;
}

.article1260 p {
  color: #e3e9ef;
  font-size: 18px;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.workflow div {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 16px;
  text-align: center;
}

.workflow span {
  display: block;
  margin: 0 auto 9px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
}

.ai-box {
  background: linear-gradient(135deg, #f3ead8, #fff);
  border: 1px solid #e4d3ad;
  border-radius: 14px;
  padding: 36px;
}

.ai-label {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ai-box h2 {
  color: var(--navy);
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--gold);
  background: rgba(255,255,255,.7);
  font-size: 14px;
}

.legal-box {
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: 12px;
}

.site-footer {
  background: #091b30;
  color: #dce5ee;
  padding: 55px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.site-footer h3 {
  color: var(--white);
}

.site-footer a {
  color: #dce5ee;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 35px;
  padding-top: 22px;
  color: #aebbc8;
  font-size: 14px;
}

@media (max-width: 900px) {
  .hero-grid,
  .pillars,
  .topics,
  .workflow,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .header-inner {
    align-items: flex-start;
    padding: 14px 0;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 26px, 1180px);
  }

  .hero {
    padding: 70px 0;
  }

  .hero-grid,
  .pillars,
  .topics,
  .workflow,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    gap: 14px;
  }

  .logo img {
    width: 220px;
  }
}

/* ============================================================
   PAGINE EDITORIALI - GUIDA AL CREDITO
   ============================================================ */

.breadcrumb {
  padding: 20px 0;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--navy);
  text-decoration: none;
}

.article-hero {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0 58px;
}

.article-hero .chapter {
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.article-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
}

.article-hero .lead {
  max-width: 900px;
  font-size: 20px;
  color: #e4ebf1;
}

.article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 55px;
  align-items: start;
}

.article-index {
  position: sticky;
  top: 110px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}

.article-index strong {
  display: block;
  margin-bottom: 12px;
  color: var(--navy);
}

.article-index a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.article-index a:hover,
.article-index a:focus {
  color: var(--gold);
}

.article-content {
  max-width: 820px;
}

.article-content h2 {
  margin-top: 48px;
  color: var(--navy);
  font-size: 31px;
  line-height: 1.2;
}

.article-content h3 {
  margin-top: 30px;
  color: var(--navy-2);
  font-size: 23px;
}

.article-content p,
.article-content li {
  font-size: 18px;
  line-height: 1.75;
}

.article-content ul {
  padding-left: 24px;
}

.norma-box,
.example-box,
.operational-box,
.source-box {
  margin: 30px 0;
  padding: 24px 26px;
  border-radius: 9px;
}

.norma-box {
  background: #f5f0e5;
  border-left: 5px solid var(--gold);
}

.example-box {
  background: var(--bg);
  border: 1px solid var(--border);
}

.operational-box {
  background: #eef5f2;
  border-left: 5px solid var(--success);
}

.source-box {
  background: #f7f9fb;
  border: 1px solid var(--border);
}

.editorial-meta {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.next-chapter {
  margin-top: 48px;
  padding: 28px;
  background: var(--navy);
  color: var(--white);
  border-radius: 12px;
}

.next-chapter a {
  color: var(--gold-light);
  font-weight: 800;
}

.topic-link {
  display: block;
  height: 100%;
  text-decoration: none;
}

.topic-link .topic {
  height: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
}

.topic-link:hover .topic,
.topic-link:focus .topic {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.topic-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--gold);
  font-weight: 800;
}

@media (max-width: 850px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-index {
    position: static;
  }
}

/* ============================================================
   APPROFONDIMENTI SPECIALI
   ============================================================ */

.special-section {
  padding: 78px 0;
  background: #0f2947;
  color: #ffffff;
}

.special-section .section-title h2 {
  color: #ffffff;
}

.special-section .section-title p {
  color: #dbe5ef;
}

.special-card {
  display: block;
  max-width: 900px;
  padding: 34px;
  background: #ffffff;
  color: #1f2933;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--gold);
}

.special-card:hover,
.special-card:focus {
  transform: translateY(-2px);
}

.special-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.special-card h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 30px;
}

.special-card p {
  margin-bottom: 14px;
}

.special-more {
  font-weight: 800;
  color: var(--gold);
}

/* ============================================================
   AVVISO IMPORTANTE - FASE PROFESSIONALE / GIUDIZIALE
   ============================================================ */

.legal-warning {
  margin: 32px 0;
  padding: 26px 28px;
  border: 2px solid #c89b3c;
  border-left-width: 7px;
  border-radius: 12px;
  background: #fffaf0;
  color: #172033;
}

.legal-warning strong {
  display: block;
  margin-bottom: 10px;
  color: #0f2947;
  font-size: 18px;
}

.legal-warning p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   FAQ
   ============================================================ */

.faq-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 34px 0 48px;
}

.faq-choice a {
  display: block;
  padding: 25px;
  border: 1px solid #d9e1e8;
  border-radius: 12px;
  background: #ffffff;
  text-decoration: none;
  color: #172033;
  box-shadow: var(--shadow);
}

.faq-choice a:hover,
.faq-choice a:focus {
  transform: translateY(-2px);
}

.faq-choice strong {
  display: block;
  margin-bottom: 7px;
  color: #0f2947;
  font-size: 21px;
}

.faq-section {
  margin: 55px 0 75px;
}

.faq-section-title {
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 3px solid #c89b3c;
}

.faq-section-title h2 {
  margin-bottom: 8px;
  color: #0f2947;
}

.faq-item {
  margin: 0 0 12px;
  border: 1px solid #dce3e9;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.faq-item summary {
  position: relative;
  padding: 20px 54px 20px 22px;
  cursor: pointer;
  list-style: none;
  color: #0f2947;
  font-size: 17px;
  font-weight: 750;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: #c89b3c;
  font-size: 27px;
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item[open] summary {
  border-bottom: 1px solid #e4e9ed;
}

.faq-answer {
  padding: 20px 22px 23px;
}

.faq-answer p:first-child {
  margin-top: 0;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  font-weight: 700;
}

.faq-warning {
  margin: 34px 0;
  padding: 23px 25px;
  border-left: 6px solid #c89b3c;
  border-radius: 9px;
  background: #fffaf0;
}

@media (max-width: 760px) {
  .faq-choice {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   NUMERAZIONE VISIBILE DEI CAPITOLI
   ============================================================ */

.article-hero .chapter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.article-hero .chapter-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f4c64e;
}

.article-hero .chapter-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 54px;
  height: 38px;
  padding: 0 12px;

  border: 2px solid #f4c64e;
  border-radius: 6px;

  color: #f4c64e;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
}

/* ============================================================
   COERENZA CAPITOLO E SEZIONI
   ============================================================ */

.article-hero .chapter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.article-hero .chapter-title-inline {
  color: #f4c64e;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.article-hero .chapter-separator {
  color: #f4c64e;
  font-weight: 800;
}

.article-index a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.article-index .index-number {
  min-width: 25px;
  color: #c89b3c;
  font-weight: 800;
}

.article-index .index-label {
  flex: 1;
}

.article-content .section-number {
  color: #c89b3c;
  font-weight: 800;
}


/* ============================================================
   SPECIALE — MACRO SEZIONI
   ============================================================ */

.article-index a.special-index-part {
  margin-top: 18px;
  padding-top: 14px;
  font-weight: 700;
  color: #102e50;
  border-top: 1px solid #d8e0e8;
}

.article-index a.special-index-part:first-of-type {
  margin-top: 8px;
}

.special-part-title {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 2px solid #d5a52d;
}
