/* ─── ARTICLE PAGE — pagina dettaglio news ────────────────────────────
   Nessuna dipendenza da Bootstrap. Usa i token di shell.css.
──────────────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════
   READING PROGRESS BAR
══════════════════════════════════════════════════ */
.ar-progress {
  position: fixed; top: 0; left: 0; z-index: 2000;
  width: 0; height: 3px;
  background: var(--teal);
  transition: width .1s linear;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════ */
.ar-hero {
  position: relative;
  min-height: 64vh; max-height: 780px;
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--dark);
}
.ar-hero__bg { position: absolute; inset: 0; }
.ar-hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 35%;
  filter: grayscale(12%) contrast(1.06) brightness(.75);
}
.ar-hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top,
      rgba(14,12,11,.97)  0%,
      rgba(14,12,11,.68) 36%,
      rgba(14,12,11,.22) 68%,
      rgba(14,12,11,.08) 100%);
}
.ar-hero__body {
  position: relative; z-index: 2;
  width: 100%; max-width: 1320px; margin: 0 auto;
  padding: 0 40px 52px;
}

/* Breadcrumb */
.ar-hero__breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-family: var(--f-b); font-size: 12px;
  color: rgba(255,255,255,.38); margin-bottom: 16px;
}
.ar-hero__breadcrumb a {
  color: rgba(255,255,255,.38); text-decoration: none; transition: color .2s;
}
.ar-hero__breadcrumb a:hover { color: var(--teal); }
.ar-hero__breadcrumb-sep { opacity: .3; }

.ar-hero__cat { margin-bottom: 14px; }

.ar-hero__h1 {
  font-family: var(--f-d);
  font-size: clamp(1.8rem, 3.6vw, 3.3rem);
  font-weight: 800; color: #fff;
  line-height: 1.07; letter-spacing: -.028em;
  max-width: 840px; margin-bottom: 22px;
}
.ar-hero__meta {
  display: flex; align-items: center; flex-wrap: wrap;
  font-family: var(--f-b); font-size: 13px;
  color: rgba(255,255,255,.46);
}
.ar-hero__meta-sep  { margin: 0 10px; opacity: .28; }
.ar-hero__meta a    { color: rgba(255,255,255,.52); text-decoration: none; transition: color .2s; }
.ar-hero__meta a:hover { color: var(--teal); }
.ar-hero__readtime  { display: inline-flex; align-items: center; gap: 5px; }
.ar-hero__fotodi {
  display: block; margin-top: 10px;
  font-family: var(--f-b); font-size: 11px;
  font-style: italic; color: rgba(255,255,255,.28);
}

/* ══════════════════════════════════════════════════
   LAYOUT — 2 colonne desktop, 1 colonna mobile
══════════════════════════════════════════════════ */
.ar-layout { background: var(--paper); padding: 52px 0 80px; }
.ar-layout__inner {
  max-width: 1320px; margin: 0 auto; padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px; align-items: start;
}

/* ══════════════════════════════════════════════════
   CORPO ARTICOLO
══════════════════════════════════════════════════ */
.ar-body {
  font-family: var(--f-b);
  font-size: 18px; line-height: 1.74;
  color: var(--ink);
  max-width: 700px;
  word-break: break-word; overflow-wrap: break-word;
}
.ar-body a    { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.ar-body strong { font-weight: 700; }
.ar-body em   { font-style: italic; }

/* pill di copyright inserita nel testo */
.ar-body .copyright {
  display: block;
  font-family: var(--f-d); font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
  background: var(--warm); border-left: 2px solid var(--teal);
  padding: 5px 12px; margin: .7em 0;
}

.ar-body-ad { margin: 32px 0; text-align: center; }

/* ══════════════════════════════════════════════════
   ALLEGATO
══════════════════════════════════════════════════ */
.ar-allegato {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 18px 0 28px;
  font-family: var(--f-d); font-size: 13px; font-weight: 600;
  color: var(--ink); background: var(--warm);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 18px; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.ar-allegato:hover { border-color: var(--teal); color: var(--teal); }
.ar-allegato svg { flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   SHARE BAR
══════════════════════════════════════════════════ */
.ar-share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 40px 0; padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ar-share__label {
  font-family: var(--f-d); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin-right: 4px; white-space: nowrap;
}
.ar-share__btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-d); font-size: 12px; font-weight: 600;
  padding: 8px 16px; border-radius: 100px;
  border: 1px solid var(--border); background: transparent;
  color: var(--ink); cursor: pointer;
  text-decoration: none; transition: all .2s;
}
.ar-share__btn:hover { border-color: var(--teal); color: var(--teal); }
.ar-share__btn svg  { flex-shrink: 0; width: 14px; height: 14px; }
.ar-share__copied {
  font-family: var(--f-d); font-size: 11px; font-weight: 600;
  color: var(--teal); display: none;
}
.ar-share__copied.show { display: inline; }

/* ══════════════════════════════════════════════════
   COPYRIGHT
══════════════════════════════════════════════════ */
.ar-copyright {
  font-family: var(--f-b); font-size: 12px; font-weight: 600;
  letter-spacing: .3px; color: var(--muted); margin-bottom: 36px;
}

/* ══════════════════════════════════════════════════
   BOX AUTORI
══════════════════════════════════════════════════ */
.ar-authors { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.ar-author {
  display: flex; align-items: center; gap: 14px;
  background: var(--warm); border-radius: 10px; padding: 16px 20px;
}
.ar-author__photo {
  width: 52px; height: 52px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; background: var(--border);
}
.ar-author__photo img { width: 100%; height: 100%; object-fit: cover; }
.ar-author__role {
  font-family: var(--f-d); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 3px;
}
.ar-author__name {
  font-family: var(--f-d); font-size: 15px; font-weight: 700; color: var(--ink);
}
.ar-author a { text-decoration: none; color: inherit; }
.ar-author a:hover .ar-author__name { color: var(--teal); }

/* ══════════════════════════════════════════════════
   COMMENTI
══════════════════════════════════════════════════ */
.ar-comments-section { margin-top: 8px; }

.ar-comment-toggle {
  display: block; width: 100%; text-align: center;
  font-family: var(--f-d); font-size: 14px; font-weight: 700;
  padding: 16px; border-radius: 10px;
  background: var(--ink); color: #fff;
  border: none; cursor: pointer; transition: background .2s;
  margin-bottom: 16px;
}
.ar-comment-toggle:hover { background: var(--dark-2); }

.ar-comment-form { display: none; }
.ar-comment-form.open { display: block; }
.ar-comment-form form {
  background: var(--warm); border-radius: 10px;
  padding: 24px; margin-bottom: 20px;
}
.ar-form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 14px;
}
.ar-field { display: flex; flex-direction: column; gap: 5px; }
.ar-field label {
  font-family: var(--f-d); font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.ar-field input,
.ar-field textarea {
  font-family: var(--f-b); font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--border);
  border-radius: 7px; padding: 10px 14px; outline: none;
  width: 100%; box-sizing: border-box; transition: border-color .2s;
}
.ar-field input:focus,
.ar-field textarea:focus { border-color: var(--teal); }
.ar-field textarea { resize: vertical; min-height: 90px; }
.ar-field--full { grid-column: 1 / -1; }

.ar-field-privacy {
  grid-column: 1 / -1;
  display: flex; align-items: flex-start; gap: 8px;
  font-family: var(--f-b); font-size: 13px; color: var(--muted);
  margin-top: 4px;
}
.ar-field-privacy input[type="checkbox"] { flex-shrink: 0; margin-top: 3px; }
.ar-field-privacy a { color: var(--teal); }

.ar-honeypot { display: none !important; position: absolute; left: -9999px; }

.ar-submit {
  font-family: var(--f-d); font-size: 13px; font-weight: 700;
  color: var(--ink); background: var(--teal);
  border: none; border-radius: 100px;
  padding: 12px 28px; cursor: pointer; transition: all .2s;
  margin-top: 16px; display: inline-block;
}
.ar-submit:hover { background: var(--teal-d); transform: translateY(-1px); }

/* Commenti esistenti */
.ar-comments-list { margin-top: 28px; }
.ar-comments-title {
  font-family: var(--f-d); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.ar-comment-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.ar-comment-item:last-child { border-bottom: none; }
.ar-comment-item__name {
  font-family: var(--f-d); font-size: 14px; font-weight: 700;
  color: var(--ink); margin-bottom: 5px;
}
.ar-comment-item__text {
  font-family: var(--f-b); font-size: 14px;
  color: #555; line-height: 1.55;
}

/* ══════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════ */
.ar-sidebar-sticky { position: sticky; top: 100px; }

/* Gallery thumbnails */
.ar-gallery-box {
  background: var(--warm); border-radius: 10px;
  padding: 18px; margin-bottom: 24px;
}
.ar-gallery-box__title {
  font-family: var(--f-d); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.ar-gallery-box__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
}
.ar-gallery-box__thumb {
  aspect-ratio: 1; overflow: hidden; border-radius: 3px; cursor: pointer;
}
.ar-gallery-box__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(28%);
  transition: filter .3s, transform .4s var(--ease);
}
.ar-gallery-box__thumb:hover img { filter: none; transform: scale(1.1); }

/* CTA sostienici in sidebar */
.ar-sidebar-support {
  background: var(--dark); border-radius: 10px;
  padding: 24px 20px; text-align: center; margin-bottom: 24px;
}
.ar-sidebar-support__kicker {
  font-family: var(--f-d); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--teal); margin-bottom: 10px;
}
.ar-sidebar-support__text {
  font-family: var(--f-b); font-size: 13px;
  color: rgba(255,255,255,.4); line-height: 1.5; margin-bottom: 18px;
}
.ar-sidebar-support__btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-d); font-size: 12px; font-weight: 700;
  color: var(--ink); background: var(--teal);
  padding: 10px 20px; border-radius: 100px;
  text-decoration: none; transition: all .2s;
}
.ar-sidebar-support__btn:hover { background: #fff; }

.ar-sidebar-ad { margin-bottom: 20px; text-align: center; }

/* ══════════════════════════════════════════════════
   ARTICOLI CORRELATI
══════════════════════════════════════════════════ */
.ar-related { background: var(--warm); padding: 72px 0; }
.ar-related__inner {
  max-width: 1320px; margin: 0 auto; padding: 0 40px;
}
.ar-related__hdr {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 28px;
}
.ar-related__label {
  font-family: var(--f-d); font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted);
}
.ar-related__more {
  font-family: var(--f-d); font-size: 12px; font-weight: 600;
  color: var(--teal); text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px; transition: gap .2s;
}
.ar-related__more:hover { gap: 9px; }
.ar-related__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.ar-rel {
  background: var(--paper); border-radius: 8px; overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s; cursor: pointer;
}
.ar-rel:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.1); }
.ar-rel__img { aspect-ratio: 3/2; overflow: hidden; }
.ar-rel__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.ar-rel:hover .ar-rel__img img { transform: scale(1.05); }
.ar-rel__body { padding: 14px 16px 18px; flex: 1; }
.ar-rel__cat  { margin-bottom: 8px; }
.ar-rel__title {
  font-family: var(--f-d); font-size: 14px; font-weight: 700;
  color: var(--ink); line-height: 1.3; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ══════════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════════ */
.ar-lb {
  display: none; position: fixed; inset: 0; z-index: 9000;
  background: rgba(10,9,8,.96);
  align-items: center; justify-content: center;
}
.ar-lb.open { display: flex; }

.ar-lb__stage {
  position: relative; max-width: 90vw; max-height: 88vh;
  display: flex; flex-direction: column; align-items: center;
}
.ar-lb__img-wrap {
  max-width: 90vw; max-height: 80vh;
  display: flex; align-items: center; justify-content: center;
}
.ar-lb__img-wrap img {
  display: block; max-width: 90vw; max-height: 80vh;
  object-fit: contain; border-radius: 4px;
  box-shadow: 0 24px 72px rgba(0,0,0,.7);
  transition: opacity .22s ease;
}
.ar-lb__img-wrap img.loading { opacity: 0; }

.ar-lb__caption {
  margin-top: 12px;
  font-family: var(--f-b); font-size: 13px;
  color: rgba(255,255,255,.42); text-align: center;
  max-width: 600px; line-height: 1.45;
}
.ar-lb__counter {
  position: absolute; top: -36px; left: 0;
  font-family: var(--f-d); font-size: 11px; font-weight: 700;
  letter-spacing: 1px; color: rgba(255,255,255,.28);
}

/* Close button */
.ar-lb__close {
  position: fixed; top: 20px; right: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none;
  color: rgba(255,255,255,.7); font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.ar-lb__close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Prev / Next */
.ar-lb__prev,
.ar-lb__next {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none;
  color: rgba(255,255,255,.7); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.ar-lb__prev { left: 20px; }
.ar-lb__next { right: 20px; }
.ar-lb__prev:hover,
.ar-lb__next:hover { background: rgba(255,255,255,.22); color: #fff; }
.ar-lb__prev svg,
.ar-lb__next svg { width: 18px; height: 18px; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .ar-layout__inner { grid-template-columns: 1fr; gap: 40px; }
  .ar-sidebar-sticky { position: relative; top: auto; }
  .ar-gallery-box__grid { grid-template-columns: repeat(5, 1fr); }
  .ar-related__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .ar-hero { min-height: 56vh; }
  .ar-hero__body { padding: 0 20px 36px; }
  .ar-hero__h1 { font-size: clamp(1.55rem, 5.5vw, 2.1rem); line-height: 1.1; }
  .ar-layout { padding: 28px 0 56px; }
  .ar-layout__inner { padding: 0 20px; gap: 32px; }
  .ar-body { font-size: 16px; line-height: 1.68; }
  .ar-body { max-width: 100%; }
  .ar-related { padding: 48px 0; }
  .ar-related__inner { padding: 0 20px; }
  .ar-related__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ar-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ar-hero { min-height: 50vh; }
  .ar-hero__meta-sep { display: none; }
  .ar-related__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ar-gallery-box__grid { grid-template-columns: repeat(4, 1fr); }
  .ar-share { gap: 6px; }
}
