/* arabita.css — Arabita · Media bilingue italiano-arabo */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,700&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

@font-face {
  font-family: 'Fedra';
  src: url('/static/fonts/FedraBook.ttf') format('truetype');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'Fedra';
  src: url('/static/fonts/FedraBookItalic.ttf') format('truetype');
  font-weight: 400; font-style: italic;
}
@font-face {
  font-family: 'Fedra';
  src: url('/static/fonts/FedraLight.ttf') format('truetype');
  font-weight: 300; font-style: normal;
}
@font-face {
  font-family: 'Fedra';
  src: url('/static/fonts/FedraLightItalic.ttf') format('truetype');
  font-weight: 300; font-style: italic;
}

@font-face {
  font-family: 'Fedra';
  src: url('/static/fonts/FedraBold.otf') format('opentype');
  font-weight: 700; font-style: normal;
}

@font-face {
  font-family: 'Fedra Arabic';
  src: url('/static/fonts/FedraArabicReg.ttf') format('truetype');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'Fedra Arabic';
  src: url('/static/fonts/FedraArabicBold.ttf') format('truetype');
  font-weight: 700; font-style: normal;
}
@font-face {
  font-family: 'TheMix Arabic';
  src: url('/static/fonts/TheMixArab.ttf') format('truetype');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'TheMix Arabic';
  src: url('/static/fonts/TheMixArab-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal;
}

@font-face {
  font-family: 'Fedra';
  src: url('/static/fonts/FedraArabicReg.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF,
                 U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Fedra';
  src: url('/static/fonts/FedraArabicBold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF,
                 U+FB50-FDFF, U+FE70-FEFF;
}

/* Font misti: arabo + latino coerente */
.col-ar,
.col-ar p,
.col-ar span,
.col-ar strong,
.col-ar a {
    font-family: 'Fedra Arabic', var(--fa);
}

.col-ar strong {
    font-weight: 700;
}

/* ════════════════════════════════════════
   RESET & VARIABILI
════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0b0b0b;
  --surf:    #111111;
  --card:    #181818;
  --brd:     rgba(255,255,255,0.07);
  --brd2:    rgba(255,255,255,0.13);
  --red:     #cc3333;
  --gold:    #b08a30;
  --gold-lt: #d4a84b;
  --ink:     #ede8db;
  --muted:   rgba(237,232,219,0.52);
  --dim:     rgba(237,232,219,0.20);
  --fi:      'Fedra', 'Cormorant Garamond', Georgia, serif;
  --fa:      'Fedra Arabic', 'Geeza Pro', 'Baghdad', 'Arabic UI Text', 'Noto Naskh Arabic', 'Arial Unicode MS', serif;
  --fa-titolo: 'TheMix Arabic', 'Fedra Arabic', 'Geeza Pro', 'Arabic UI Text', serif;
  --col-gap: 28px;  /* gap colonne bilingue */
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fi);
  font-size: 20px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(11,11,11,0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--brd);
}

.hdr-top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1360px; margin: 0 auto; padding: 0 32px;
  height: 125px; position: relative;
}

.logo-wrap {
  position: absolute; left: 10%; transform: translateX(-50%);
  display: block; cursor: pointer;
}
.logo-img {
  width: 250px; height: auto; display: block;
  padding: 10px 0;
}
.logo-ar {
  font-family: var(--fa); font-size: 26px; font-weight: 400;
  color: var(--muted); direction: rtl; transition: color .2s;
}
.logo-sep { width: 1px; height: 18px; background: var(--brd2); align-self: center; }
.logo-it {
  font-family: var(--fi); font-size: 26px; font-weight: 400;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--ink); transition: color .2s;
}
.logo-it em { color: var(--red); font-style: normal; }
.logo-wrap:hover .logo-it { color: var(--gold-lt); }
.logo-wrap:hover .logo-ar { color: var(--ink); }

/* Barra ricerca */
.hdr-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,0.28); padding: 6px 14px;
  position: relative; margin-left: auto;
}
.hdr-search input {
  background: none; border: none; outline: none;
  color: var(--ink); font-family: var(--fi); font-size: 15px; width: 200px;
}
.hdr-search input::placeholder { color: rgba(237,232,219,0.45); }
.search-ico { color: rgba(237,232,219,0.55); font-size: 16px; }
.hdr-user-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-left: 8px;
  color: rgba(237,232,219,0.55); text-decoration: none; flex-shrink: 0;
  border-radius: 50%; transition: color .15s, background .15s;
}
.hdr-user-btn:hover { color: var(--ink); background: var(--brd); }
.hdr-soc { display: flex; align-items: center; gap: 14px; margin-left: 16px; }
.hdr-soc .ft-soc svg { width: 17px; height: 17px; }
.search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--brd2);
  display: none; z-index: 99; max-height: 320px; overflow-y: auto;
}
.search-results.open { display: block; }
.search-item {
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--brd); transition: background .15s;
}
.search-item:hover { background: var(--surf); }
.search-item:last-child { border-bottom: none; }
.si-it { font-size: 14px; color: var(--ink); line-height: 1.3; font-family: var(--fi); }
.si-ar { font-family: var(--fa); font-size: 14px; color: var(--muted); direction: rtl; }

/* Nav categorie */
.cat-nav {
  max-width: 1360px; margin: 0 auto; padding: 0 32px;
  border-top: 1px solid var(--brd);
}
.cat-row {
  display: flex; align-items: center; height: 36px;
  overflow-x: auto; scrollbar-width: none; gap: 0;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-lnk {
  display: flex; align-items: center; gap: 5px;
  padding: 0 14px; height: 36px; flex-shrink: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer; transition: all .18s; white-space: nowrap;
}
.cat-lnk:hover, .cat-lnk.on { border-bottom-color: var(--red); }
.cl-it {
  font-size: 14px; letter-spacing: 0.3px;
  color: var(--muted); font-family: var(--fi); transition: color .18s;
}
.cl-dot { font-size: 8px; color: var(--dim); }
.cl-ar {
  font-family: var(--fa); font-size: 14px; color: var(--muted);
  direction: rtl; transition: color .18s;
}
.cat-lnk:hover .cl-it, .cat-lnk.on .cl-it { color: var(--ink); }
.cat-lnk:hover .cl-ar,  .cat-lnk.on .cl-ar  { color: var(--muted); }

/* Ticker */
.ticker {
  background: var(--red); height: 30px;
  display: flex; align-items: center; overflow: hidden;
}
.ticker-lbl {
  background: rgba(0,0,0,0.22); padding: 0 14px; height: 100%;
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-size: 12px; letter-spacing: 2px;
  font-family: var(--fi);
}
.tl-ar { font-family: var(--fa); font-size: 12px; letter-spacing: 0; text-transform: none; }
.ticker-scroll { overflow: hidden; flex: 1; }
.ticker-track {
  display: flex; gap: 40px; padding: 0 20px;
  animation: tick 13s linear infinite; white-space: nowrap;
  font-size: 13px; letter-spacing: 0.2px; font-family: var(--fi);
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes tick { 0%{transform:translateX(0)} 100%{transform:translateX(var(--tick-shift,-50%))} }
.t-sep { color: rgba(255,255,255,.3); margin: 0 4px; }
.t-ar  { font-family: var(--fa); font-size: 13px; }
/* Font con supporto completo diacritici traslitterazione (ḥ ā ū ī ṭ ecc.) */
.translit { font-family: "Gentium Plus", "Gentium", "DejaVu Serif", "FreeSerif", serif; font-style: italic; }

/* Ticker verticale su mobile */
@media (max-width: 768px) {
  .ticker {
    height: 44px;
    position: relative;
  }
  .ticker-scroll {
    position: relative;
    height: 44px;
    overflow: hidden;
  }
  .ticker-track {
    animation: none;
    white-space: normal;
    display: block;
    padding: 0;
    position: relative;
    width: 100%;
    height: 44px;
  }
  .ticker-track span.visible {
    display: block;
  }
}


/* ════════════════════════════════════════
   LAYOUT BASE
════════════════════════════════════════ */
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 32px; }

/* Griglia home: contenuto + sidebar */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 52px;
  padding: 44px 0;
}

/* Griglia categoria/tag: contenuto + sidebar stretta */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  padding: 0;
}

/* ════════════════════════════════════════
   LAYOUT BILINGUE — colonne speculari
   REGOLA PRINCIPALE: sempre 1fr | 1px | 1fr
════════════════════════════════════════ */
.bi {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: start;
}
.bi-sep { background: var(--brd); align-self: stretch; }

/* Colonna italiana — sinistra */
.col-it {
  padding: 0 var(--col-gap) 0 0;
  font-family: var(--fi);
}

/* Colonna araba — destra, speculare */
.col-ar {
  padding: 0 0 0 var(--col-gap);
  direction: rtl;
  text-align: right;
  font-family: var(--fa);
}

/* ════════════════════════════════════════
   IMMAGINI ARTICOLO
════════════════════════════════════════ */
/* Banner wide — sopra entrambe le colonne */
.art-img-wrap {
  position: relative; overflow: hidden;
  background: var(--card);
  border-bottom: 1px solid var(--brd);
}
.art-img {
  width: 100%; height: 320px;
  object-fit: cover; object-position: center;
  display: block; opacity: 0.86;
}
.art-img-ph {
  width: 100%; height: 320px;
  background: var(--card);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: var(--dim);
}
.art-img-ph-icon { font-size: 28px; opacity: .3; }
.art-img-ph-txt  { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.img-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  padding: 24px 28px 12px;
  display: flex; justify-content: space-between; align-items: flex-end;
}
.cap-it { font-size: 11.5px; color: rgba(237,232,219,.65); font-style: italic; font-family: var(--fi); }
.cap-ar { font-family: var(--fa); font-size: 13px; color: rgba(237,232,219,.55); direction: rtl; }

/* Immagine card piccola — sopra card articolo */
.card-img { grid-column: 1 / -1; overflow: hidden; }
.card-img img {
  width: 100%; height: 200px;
  object-fit: cover; opacity: .84; transition: opacity .3s;
}

/* ════════════════════════════════════════
   HERO (primo articolo home)
════════════════════════════════════════ */
.hero-wrap {
  cursor: pointer;
  border-bottom: 1px solid var(--brd2);
  margin-bottom: 0;
  display: block;
}
.hero-wrap:hover .hero-title { opacity: .8; }

.hero-cols {
  border-top: 1px solid var(--brd);
}
/* Override padding per hero */
.hero-wrap .col-it { padding: 26px var(--col-gap) 36px 0; }
.hero-wrap .col-ar { padding: 26px 0 36px var(--col-gap); }

.h-meta {
  display: block;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px; font-family: var(--fi);
}
.col-ar .h-meta {
  font-family: var(--fa); font-size: 13px;
  letter-spacing: 0; text-transform: none;
}

.hero-title {
  font-family: var(--fi); font-size: 27px; font-weight: 700;
  line-height: 1.2; margin-bottom: 12px; transition: opacity .2s;
}
.col-ar .hero-title {
  font-family: var(--fa-titolo); font-size: 27px; font-weight: 700; line-height: 1.4;
}

.hero-sub {
  font-size: 17px; color: var(--gold-lt); font-style: italic;
  margin-bottom: 14px; line-height: 1.5;
}
.col-ar .hero-sub { font-style: normal; font-size: 17px; line-height: 1.6; }

.hero-exc {
  font-size: 17px; color: var(--muted); line-height: 1.82;
  display: -webkit-box; -webkit-line-clamp: 5;
  -webkit-box-orient: vertical; overflow: hidden;
}
.col-ar .hero-exc { font-size: 17px; line-height: 1.95; }

/* ════════════════════════════════════════
   CARD ARTICOLO (lista)
════════════════════════════════════════ */
.article-card {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: start;
  border-bottom: 1px solid var(--brd);
  cursor: pointer; transition: opacity .18s;
}
.article-card:hover { opacity: .82; }
.article-card:hover .art-title { color: var(--gold-lt); }

/* Override padding nelle card */
.article-card .col-it { padding: 22px var(--col-gap) 22px 0; }
.article-card .col-ar { padding: 22px 0 22px var(--col-gap); }

/* Meta (badge + data) */
.a-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.col-ar .a-meta { flex-direction: row-reverse; }

.a-badge {
  font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--red); border: 1px solid rgba(204,51,51,.35);
  padding: 2px 8px; font-family: var(--fi);
}
.col-ar .a-badge {
  font-family: var(--fa); font-size: 11px;
  letter-spacing: 0; text-transform: none;
}
.a-date { font-size: 10px; color: var(--muted); letter-spacing: .5px; font-family: var(--fi); }
.badge-ev {
  font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--bg); background: var(--gold);
  padding: 2px 7px; font-family: var(--fi);
}
.badge-ev-ar {
  font-family: var(--fa);
  text-transform: none;
  letter-spacing: 0;
}

/* Titoli */
.art-title {
  font-family: var(--fi); font-size: 22px; font-weight: 700;
  line-height: 1.25; margin-bottom: 6px; color: var(--ink);
  transition: color .18s;
}
.col-ar .art-title { font-family: var(--fa-titolo); font-size: 22px; font-weight: 700; line-height: 1.4; }

.art-sub {
  font-size: 15px; color: var(--gold); font-style: italic;
  margin-bottom: 10px; line-height: 1.45;
}
.col-ar .art-sub { font-style: normal; font-size: 15px; line-height: 1.6; }

.art-exc {
  font-size: 16px; color: var(--muted); line-height: 1.78;
  display: -webkit-box; -webkit-line-clamp: 5;
  -webkit-box-orient: vertical; overflow: hidden;
}
.col-ar .art-exc { font-size: 16px; line-height: 1.9; }

/* Fonte originale */
.art-fonte {
  font-size: 11px; color: var(--muted); margin: 4px 0 8px;
  font-family: var(--fi);
}
.art-fonte a { color: var(--gold); }

/* Link "continua" */
.more {
  margin-top: 14px; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--red);
  display: flex; align-items: center; gap: 5px; font-family: var(--fi);
}
.col-ar .more {
  flex-direction: row-reverse; font-family: var(--fa);
  letter-spacing: 0; text-transform: none; font-size: 13px;
}

/* ════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════ */
.sb-block { margin-bottom: 34px; border-top: 2px solid var(--red); padding-top: 14px; }

.sb-title {
  font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--fi);
}
.sb-title-ar {
  font-family: var(--fa); font-size: 13px;
  letter-spacing: 0; text-transform: none; color: var(--dim);
}

/* Spazi ADV — dimensioni IAB standard */
.adv-slot {
  background: var(--card);
  border: 1px dashed var(--brd2);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--dim); font-size: 10px;
  letter-spacing: 1px; text-transform: uppercase; gap: 4px;
  margin-bottom: 20px; overflow: hidden;
}
/* Desktop: immagine pub mantiene dimensioni originali */
@media (min-width: 769px) {
  .adv-slot img { max-width: 300px; width: auto; height: auto; }
}
/* 300×250 — il più comune, Medium Rectangle */
.adv-300x250 { width: 100%; }
/* 300×600 — Half Page */
.adv-300x600 { width: 100%; }
/* 728×90 — Leaderboard (header/footer) */
.adv-728x90 {
  width: 100%;
  max-width: 728px; margin: 0 auto 20px;
}
/* 320×100 — Mobile Banner */
.adv-320x100 { width: 100%; }

/* Flash news sidebar */
.flash-item { padding: 10px 0; border-bottom: 1px solid var(--brd); cursor: pointer; }
.flash-item:last-child { border-bottom: none; }
.flash-item:hover .-t { color: var(--gold-lt); }
.flash-time { font-size: 10px; color: var(--red); letter-spacing: .5px; margin-bottom: 2px; font-family: var(--fi); }
.flash-t { font-size: 14px; line-height: 1.4; color: var(--muted); transition: color .18s; font-family: var(--fi); direction: ltr; text-align: left; }
.flash-t.ar { font-family: var(--fa); font-size: 14px; line-height: 1.6; direction: rtl; text-align: right; margin-top: 3px; }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-pill {
  font-size: 13px; padding: 4px 10px;
  border: 1px solid var(--brd); color: var(--muted);
  cursor: pointer; transition: all .18s; font-family: var(--fi);
  text-decoration: none; display: inline-block;
}
.tag-pill:hover { border-color: var(--red); color: var(--ink); }
.tag-pill.ar { font-family: var(--fa); font-size: 12px; letter-spacing: 0; }

/* ════════════════════════════════════════
   PAGINA CATEGORIA / TAG
════════════════════════════════════════ */
.cat-hdr {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--brd);
}
.cat-eyebrow {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--red); margin-bottom: 6px; font-family: var(--fi);
}
.cat-name-it {
  font-family: var(--fi); font-size: 46px; font-weight: 700; line-height: 1;
}
.cat-name-ar {
  font-family: var(--fa); font-size: 40px; font-weight: 700;
  direction: rtl; display: block; margin-top: 4px;
}

/* Paginazione */
.pag {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 40px 0; border-top: 1px solid var(--brd);
}
.pg-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--brd); cursor: pointer; font-size: 15px;
  color: var(--muted); transition: all .18s;
  font-family: var(--fi); text-decoration: none;
}
.pg-btn:hover { border-color: var(--red); color: var(--ink); }
.pg-btn.cur   { border-color: var(--red); color: var(--red); }

/* ════════════════════════════════════════
   SINGOLO ARTICOLO
════════════════════════════════════════ */
.art-hdr { padding: 36px 0 28px; border-bottom: 1px solid var(--brd); }

.art-hdr-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 20px;
  flex-wrap: wrap; gap: 10px;
}
.art-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ab {
  font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 3px 10px; border: 1px solid rgba(204,51,51,.38);
  color: var(--red); cursor: pointer; font-family: var(--fi);
  transition: all .18s; text-decoration: none;
}
.ab:hover { background: var(--red); color: #fff; }
.ab.ar {
  font-family: var(--fa); font-size: 12px;
  letter-spacing: 0; text-transform: none;
}
.art-source {
  font-size: 12px; color: var(--muted); font-family: var(--fi);
  white-space: nowrap;
}
.art-source a { color: var(--gold-lt); }

/* Titoli singolo articolo */
.a-h1 {
  font-family: var(--fi); font-size: 32px; font-weight: 700;
  line-height: 1.2; margin-bottom: 10px;
}
.a-h1-ar {
  font-family: var(--fa-titolo); font-size: 32px; font-weight: 700;
  line-height: 1.35; margin-bottom: 10px;
}
.a-h2  { font-size: 18px; color: var(--gold-lt); font-style: italic; line-height: 1.45; font-family: var(--fi); }
.a-h2-ar { font-family: var(--fa); font-size: 18px; color: var(--gold-lt); line-height: 1.6; }

/* Override padding titoli articolo */
.art-hdr .col-it { padding: 0 var(--col-gap) 0 0; }
.art-hdr .col-ar { padding: 0 0 0 var(--col-gap); }

/* Corpo articolo */
.art-body { padding: 36px 0; }
.art-body .col-it { padding: 0 var(--col-gap) 0 0; }
.art-body .col-ar { padding: 0 0 0 var(--col-gap); }

.art-body .col-it p {
  font-family: var(--fi); font-size: 20px;
  line-height: 1.88; color: var(--ink); margin-bottom: 24px;
}
.art-body .col-ar p {
  font-family: var(--fa); font-size: 20px;
  line-height: 1.95; color: var(--ink); margin-bottom: 24px;
}
/* Parole evidenziate */
.hl {
  border-bottom: 1px solid var(--gold); color: var(--gold);
  cursor: pointer; transition: color .15s, border-color .15s;
}

/* Nota redazionale */
.nota-red {
  background: var(--card); border-left: 3px solid var(--gold);
  padding: 16px 20px; margin: 28px 0;
  font-size: 16px; color: var(--muted); font-style: italic;
  font-family: var(--fi);
}

.art-abstract {
  background: var(--card); border-left: 3px solid var(--gold);
  padding: 20px; margin: 24px 0;
}
.art-abstract .col-it {
  font-size: 18px; color: var(--ink);
}
.art-abstract .col-ar {
  font-family: var(--fa); font-size: 18px; direction: rtl;
}

/* Glossario */
.glossary { border-top: 1px solid var(--brd); padding: 28px 0; }
.gl-hdr {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px; font-family: var(--fi);
}
.gl-hdr-ar {
  font-family: var(--fa); font-size: 13px;
  letter-spacing: 0; text-transform: none; color: var(--dim);
}
.gl-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.gl-item {
  background: var(--card); border: 1px solid var(--brd);
  padding: 12px 14px; cursor: pointer; transition: border-color .18s;
  text-decoration: none; display: block;
}
.gl-item:hover { border-color: var(--gold); }
.gl-it { font-size: 30px; font-weight: 700; color: var(--ink); font-family: var(--fi); }
.gl-ar { font-family: var(--fa); font-size: 30px; color: var(--gold-lt); direction: rtl; text-align: right; margin-top: 4px; font-weight: 700; }
.gl-tr { font-size: 15px; color: var(--muted); font-style: italic; margin-top: 2px; font-family: var(--fi); font-size-adjust: from-font; }

/* Articoli correlati */
.correlati-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; padding: 28px 0; }
.corr-card {
  border: 1px solid var(--brd); padding: 18px;
  cursor: pointer; transition: border-color .18s;
  text-decoration: none; display: block;
}
.corr-card:hover { border-color: var(--red); }
.corr-cat { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); margin-bottom: 8px; font-family: var(--fi); }
.corr-title-it { font-family: var(--fi); font-size: 17px; font-weight: 700; line-height: 1.25; margin-bottom: 6px; color: var(--ink); }
.corr-title-ar { font-family: var(--fa); font-size: 15px; color: var(--muted); direction: rtl; text-align: right; line-height: 1.5; }

/* Tooltip dizionario */
.dtip {
  position: fixed; background: var(--card);
  border: 1px solid var(--brd2); border-left: 3px solid var(--gold);
  padding: 14px 18px; width: 272px; z-index: 9999;
  display: none; pointer-events: none;
  box-shadow: 0 20px 48px rgba(0,0,0,.7);
}
.dtip.on { display: block; }
.tt-it { font-size: 17px; font-weight: 700; color: var(--ink); font-family: var(--fi); margin-bottom: 4px; }
.tt-ar { font-family: var(--fa); font-size: 20px; color: var(--gold-lt); direction: rtl; }
.tt-tr { font-size: 17px; color: var(--muted); font-style: italic; font-family: var(--fi); margin-top: 4px; font-size-adjust: from-font; }
.tt-lnk {
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--red); margin-top: 10px; display: block;
  pointer-events: all; cursor: pointer; text-decoration: none;
}

/* ════════════════════════════════════════
   DIZIONARIO
════════════════════════════════════════ */
.dict-search {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--brd2); padding: 10px 16px;
  max-width: 500px; margin-bottom: 32px;
}
.dict-search input {
  background: none; border: none; outline: none;
  color: var(--ink); font-family: var(--fi); font-size: 19px; flex: 1;
}
.dict-search button {
  background: var(--red); color: #fff; border: none;
  padding: 6px 16px; cursor: pointer;
  font-family: var(--fi); font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase;
}
.dict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 12px;
}
.dict-card {
  background: var(--card); border: 1px solid var(--brd);
  padding: 16px 18px; cursor: pointer; transition: border-color .18s;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  text-decoration: none;
}
.dict-card:hover { border-color: var(--gold); }
.dc-cat { font-size: 11px; color: var(--dim); letter-spacing: .5px; font-family: var(--fi); margin-top: 2px; }
.dc-tr  { font-size: 15px; color: var(--muted); font-style: italic; font-family: var(--fi); margin-top: 2px; font-size-adjust: from-font; }
.dc-it { font-family: var(--fi); font-size: 30px !important; font-weight: 700; color: var(--ink); }
.dc-ar { font-family: var(--fa); font-size: 30px !important; font-weight: 700; color: var(--gold-lt); direction: rtl; text-align: right; flex-shrink: 0; }
.gram-label {
  font-size: 15px !important;
  color: rgba(237,232,219,0.65);
  margin-bottom: 3px;
  line-height: 1.3;
}
.gram-label-ar {
  font-size: 15px !important;
  color: rgba(237,232,219,0.65);
  margin-bottom: 3px;
  line-height: 1.3;
  font-family: var(--fa);
  direction: rtl;
}
.sec-title-it {
  font-family: var(--fi);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.sec-title-ar {
  font-family: var(--fa);
  font-size: 22px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 8px;
}
/* ════════════════════════════════════════
   STATO VUOTO
════════════════════════════════════════ */
.empty { text-align: center; padding: 80px 0; color: var(--muted); }
.empty-icon { font-size: 48px; opacity: .2; margin-bottom: 16px; }
.empty-txt  { font-size: 19px; font-family: var(--fi); }
.empty-ar   { font-family: var(--fa); font-size: 19px; color: var(--dim); direction: rtl; margin-top: 6px; }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer {
  background: var(--surf);
  border-top: 1px solid var(--brd);
  padding: 28px 0; margin-top: 60px;
}
.ft-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.ft-logo { display: flex; align-items: baseline; gap: 10px; }
.ft-it {
  font-family: var(--fi); font-size: 20px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
}
.ft-it em { color: var(--red); font-style: normal; }
.ft-ar { font-family: var(--fa); font-size: 18px; color: var(--muted); }
.ft-info { font-size: 11px; color: var(--dim); letter-spacing: .5px; font-family: var(--fi); }
.ft-social { display: flex; align-items: center; gap: 18px; }
.ft-soc { display: inline-flex; align-items: center; color: var(--muted); transition: color .2s; }
.ft-soc:hover { color: var(--gold); }
.ft-soc svg { width: 20px; height: 20px; fill: currentColor; display: block; }

/* Banner footer leaderboard */
.ft-adv {
  max-width: 1360px; margin: 0 auto 0;
  padding: 20px 32px 0;
  display: flex; justify-content: center;
}

/* ════════════════════════════════════════
   ADV LEADERBOARD — sopra footer
════════════════════════════════════════ */
.leaderboard-wrap {
  border-top: 1px solid var(--brd);
  padding: 20px 0;
  display: flex; justify-content: center;
}

/* ════════════════════════════════════════
   TRANSIZIONI PAGINA
════════════════════════════════════════ */
.page-fade { animation: fadeIn .28s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ════════════════════════════════════════
   RESPONSIVE — tablet/mobile base
════════════════════════════════════════ */
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; gap: 32px; }
  .cat-grid  { grid-template-columns: 1fr; }
  .bi, .article-card { grid-template-columns: 1fr; }
  .bi-sep { display: none; }
  .col-it { padding: 0 0 16px 0; border-bottom: 1px solid var(--brd); }
  .col-ar { padding: 16px 0 0 0; }
  .gl-grid { grid-template-columns: repeat(2,1fr); }
  .correlati-grid { grid-template-columns: 1fr; }
  .hdr-search { display: none; }
  .hdr-soc    { display: none; }
}
.rass-titolo       { font-family:var(--fi); font-size:38px; font-weight:700; color:var(--ink); line-height:1.25; margin:0 0 16px; }
.rass-titolo-or    { font-family:var(--fa-titolo); font-size:22px; color:var(--dim); direction:rtl; margin-bottom:8px; }
.rass-meta         { font-size:13px; color:var(--muted); font-family:var(--fi); }
.rass-meta a       { color:var(--gold-lt); }
.rass-fonte        { border-left:3px solid var(--gold); padding-left:16px; margin:20px 0 32px; }
.rass-body         { max-width:700px; margin:0 auto; }
.rass-body p       { font-family:var(--fi); font-size:18px; line-height:1.8; color:var(--ink); margin-bottom:20px; }
.rass-credito      { max-width:700px; margin:40px auto 0; padding-top:20px;
                     border-top:1px solid var(--brd); font-size:13px; color:var(--muted); }
.rass-credito a    { color:var(--gold-lt); }

#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-box {
    background: var(--card);
    border: 1px solid var(--brd2);
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    padding: 40px 52px;
    text-align: center;
    min-width: 280px;
}
.loading-spin {
    width: 44px;
    height: 44px;
    border: 3px solid var(--brd2);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-it {
    font-family: var(--fi);
    font-size: 16px;
    color: var(--ink);
    margin-bottom: 8px;
}
.loading-ar {
    font-family: var(--fa);
    font-size: 18px;
    color: var(--dim);
    direction: rtl;
}

/* ════════════════════════════════════════
   MOBILE RESPONSIVE — max 768px
════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── LAYOUT BASE ── */
  .wrap { padding: 0 16px; }

  .main-grid,
  .cat-grid { grid-template-columns: 1fr; gap: 0; }

  aside { display: none; }

  /* ── HEADER ── */
  .hdr-top { padding: 0 16px; height: 70px; }
  .hdr-search { display: none; }
  .logo-wrap { left: 50%; transform: translateX(-50%); }
  .logo-img { width: 160px; }

  /* Hamburger button */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: none;
    margin-left: auto;
  }
  .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gold-lt);
    transition: all .25s;
  }

  /* Nav categorie nascosta su mobile — sostituita dal drawer */
  .cat-nav { display: none !important; }

  /* ── DRAWER MENU ── */
  .mob-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 900;
    animation: fadeIn .2s ease;
  }
  .mob-overlay.open { display: block; }

  .mob-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 240px;
    background: var(--surf);
    z-index: 901;
    border-left: 1px solid var(--brd2);
    padding: 20px 18px;
    transition: right .28s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .mob-drawer.open { right: 0; }

  .mob-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
  }

  /* Toggle lingua nel drawer */
  .mob-lang-toggle {
    display: flex;
    border: 1px solid var(--brd2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 18px;
  }
  .mob-lang-btn {
    flex: 1;
    padding: 7px 0;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--muted);
    font-family: var(--fi);
    transition: all .18s;
  }
  .mob-lang-btn.ar { font-family: var(--fa); font-size: 14px; }
  .mob-lang-btn.active {
    background: var(--red);
    color: #fff;
  }

  .mob-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
  }
  .mob-nav-link {
    padding: 12px 0;
    border-bottom: 1px solid var(--brd);
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color .18s;
  }
  .mob-nav-link:hover { color: var(--ink); }
  .mob-nav-link .lnk-ar {
    font-family: var(--fa);
    font-size: 15px;
    color: var(--dim);
  }
  .mob-nav-link.active-link { color: var(--red); }

  /* Quando lingua = AR, mostra solo il nome arabo */
  body.lang-ar .mob-nav-link .lnk-it { display: none; }
  body.lang-ar .mob-nav-link .lnk-ar { color: var(--muted); }
  body.lang-ar .mob-nav-link:hover .lnk-ar { color: var(--ink); }
  body.lang-ar .mob-drawer { direction: rtl; }
  body.lang-ar .mob-drawer-header { flex-direction: row-reverse; }
  /* Quando lingua = IT, mostra solo il nome italiano */
  body:not(.lang-ar) .mob-nav-link .lnk-ar { display: none; }
  /* Data: mostra versione araba quando lang-ar attiva */
  body.lang-ar .a-date-it { display: none; }
  body.lang-ar .a-date-ar { display: inline; }
  body:not(.lang-ar) .a-date-ar { display: none; }

  /* ── HERO ── */
  .hero-wrap .col-it { padding: 16px 0 12px 0; border-bottom: none; }
  .hero-wrap .col-ar { padding: 10px 0 20px 0; border-top: 1px solid var(--brd); }
  .hero-title { font-size: 22px; }
  .hero-sub   { font-size: 15px; }
  .hero-exc   { font-size: 15px; -webkit-line-clamp: 3; }

  /* ── CARD ARTICOLO ── */
  .article-card {
    grid-template-columns: 1fr !important;
    padding: 0;
  }
  .article-card .col-it {
    padding: 14px 0 10px 0;
    border-right: none;
    border-bottom: none;
  }
  .article-card .col-ar {
    padding: 8px 0 16px 0;
    border-top: 1px solid var(--brd);
  }
  .article-card .bi-sep { display: none; }

  .card-img img { height: 160px; }

  /* ── META CATEGORIA BILINGUE ── */
  .a-meta-bi {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }
  .a-meta-bi .a-badge-ar {
    font-family: var(--fa);
    font-size: 12px;
    color: var(--red);
  }

  /* ── CONTINUA BILINGUE ── */
  .more-bi {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
  }
  .more-bi .more-ar {
    font-family: var(--fa);
    font-size: 13px;
    color: var(--red);
  }

  /* ── ARTICOLO SINGOLO — TAB LINGUA ── */
  .art-lang-tabs {
    display: flex;
    background: var(--surf);
    border-bottom: 1px solid var(--brd2);
    position: sticky;
    top: 96px; /* sotto header sticky */
    z-index: 100;
  }
  .art-lang-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    font-family: var(--fi);
    transition: all .18s;
  }
  .art-lang-tab.ar { font-family: var(--fa); font-size: 15px; }
  .art-lang-tab.active {
    color: var(--ink);
    border-bottom-color: var(--red);
  }

  /* Nascondi colonna araba articolo su mobile — gestita da JS */
  .mob-hide { display: none !important; }
  .mob-show { display: block !important; }

  /* Articolo body su mobile */
  .art-body { padding: 0; }
  .art-body .bi { grid-template-columns: 1fr; }
  .art-body .bi-sep { display: none; }
  .art-body .col-it,
  .art-body .col-ar { padding: 20px 0; }

  /* Header articolo su mobile */
  .art-hdr .bi { grid-template-columns: 1fr; }
  .art-hdr .bi-sep { display: none; }
  .art-hdr .col-it { padding: 0 0 12px 0; border-bottom: 1px solid var(--brd); }
  .art-hdr .col-ar { padding: 12px 0 0 0; }

  /* ── IMMAGINE ARTICOLO ── */
  .art-img { height: 200px; }

  /* ── GLOSSARIO ── */
  .gl-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gl-it   { font-size: 20px; }
  .gl-ar   { font-size: 20px; }

  /* ── CORRELATI ── */
  .correlati-grid { grid-template-columns: 1fr; gap: 10px; }

  /* ── RASSEGNA ARABA ── */
  .rass-titolo { font-size: 24px; }
  .rass-body p { font-size: 16px; }

  /* ── DIZIONARIO ── */
  .dict-grid { grid-template-columns: 1fr; }

  /* ── TICKER ── */
  .ticker { height: 26px; }
  .ticker-track { font-size: 12px; animation-duration: 12.5s; }

  /* ── FOOTER ── */
  .ft-inner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 0 16px; }
  .ft-social { gap: 20px; }

}

/* Elementi solo mobile — nascosti su desktop */
@media (min-width: 769px) {
  .hamburger        { display: none; }
  .mob-overlay      { display: none !important; }
  .mob-drawer       { display: none !important; }
  .art-lang-tabs    { display: none !important; }
  .mobile-ad-inline { display: none !important; }
}

/* ── Ad inline mobile ── */
.mobile-ad-inline {
  margin: 16px 0;
  padding: 10px 0 14px;
  border-top: 1px solid var(--brd);
  border-bottom: 1px solid var(--brd);
  text-align: center;
}
.mobile-ad-inline .adv-inline-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: var(--fi);
  margin-bottom: 6px;
}

/* ════════════════════════════════════════
   SAVE BUTTON & PDF BUTTON (articolo)
════════════════════════════════════════ */
.art-hdr-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.save-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--brd2);
  color: var(--muted);
  cursor: pointer;
  padding: 5px 14px;
  font-family: var(--fi);
  font-size: 13px;
  letter-spacing: .5px;
  transition: all .2s;
  white-space: nowrap;
}
.save-btn:hover        { border-color: var(--red); color: var(--ink); }
.save-btn.saved        { border-color: var(--red); color: var(--red); }
.save-icon             { font-size: 16px; line-height: 1; }
.save-label-ar         { font-family: var(--fa); font-size: 14px; color: var(--muted); }
.save-btn.saved .save-label-ar { color: var(--red); }

.pdf-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--brd2);
  color: var(--muted);
  padding: 5px 14px;
  font-family: var(--fi);
  font-size: 13px;
  letter-spacing: .5px;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.pdf-btn:hover { border-color: var(--gold); color: var(--gold-lt); }
.pdf-btn-ar    { font-family: var(--fa); font-size: 13px; color: var(--dim); }

/* ── BOTTONE SALVA NELLE CARD LISTA ── */
.card-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding: 8px 0;
  border-bottom: 1px solid var(--brd);
}
.card-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 0;
  font-family: var(--fi);
  font-size: 12px;
  letter-spacing: .5px;
  transition: color .2s;
  white-space: nowrap;
  user-select: none;
}
.card-save-btn:hover                { color: var(--ink); }
.card-save-btn.saved                { color: var(--red); }
.card-save-btn .save-icon           { font-size: 14px; line-height: 1; }
.card-save-btn .save-sep            { color: var(--brd2); font-size: 9px; }
.card-save-btn .save-label-ar       { font-family: var(--fa); font-size: 13px; color: var(--muted); }
.card-save-btn:hover .save-label-ar { color: var(--ink); }
.card-save-btn.saved .save-label-ar { color: var(--red); }

/* ════════════════════════════════════════
   LOGIN POPUP (salva articolo — non loggato)
════════════════════════════════════════ */
.login-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-box {
  background: var(--card);
  border: 1px solid var(--brd2);
  border-top: 3px solid var(--red);
  padding: 40px 48px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  position: relative;
}
.lp-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  color: var(--muted); font-size: 18px; cursor: pointer;
  transition: color .18s;
}
.lp-close:hover { color: var(--ink); }
.lp-icon   { font-size: 40px; color: var(--dim); margin-bottom: 18px; line-height: 1; }
.lp-it     { font-family: var(--fi); font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 10px; line-height: 1.3; }
.lp-ar     { font-family: var(--fa); font-size: 17px; color: var(--muted); direction: rtl; margin-bottom: 28px; line-height: 1.7; }
.lp-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff;
  padding: 12px 28px;
  font-family: var(--fi); font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase;
  text-decoration: none; transition: opacity .18s;
}
.lp-cta:hover { opacity: .85; }

/* ════════════════════════════════════════
   PAGINA ACCEDI
════════════════════════════════════════ */
.accedi-page { min-height: calc(100vh - 250px); }

.accedi-hero {
  background: var(--surf);
  border-bottom: 1px solid var(--brd);
  padding: 60px 0;
}
.accedi-eyebrow {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px; font-family: var(--fi);
}
.accedi-headline {
  font-family: var(--fi); font-size: 38px; font-weight: 700;
  line-height: 1.2; margin-bottom: 16px; color: var(--ink);
}
.accedi-sub {
  font-family: var(--fi); font-size: 17px; color: var(--muted);
  line-height: 1.75; margin-bottom: 36px;
}
.accedi-features { display: flex; flex-direction: column; gap: 20px; }
.accedi-feat     { display: flex; align-items: flex-start; gap: 16px; }
.af-icon {
  font-size: 22px; color: var(--gold); flex-shrink: 0;
  margin-top: 2px; width: 28px; text-align: center;
}
.af-it   { font-family: var(--fi); font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.af-desc { font-family: var(--fi); font-size: 14px; color: var(--muted); line-height: 1.55; }

.accedi-form-wrap {
  padding: 64px 0 80px;
  display: flex; justify-content: center;
}
.accedi-form-box   { width: 100%; max-width: 520px; padding: 0 32px; }
.accedi-form-hdr   { margin-bottom: 32px; }
.accedi-form-title {
  font-family: var(--fi); font-size: 28px; font-weight: 700;
  color: var(--ink); margin-bottom: 6px;
}
.accedi-form-title-ar {
  font-family: var(--fa); font-size: 22px; color: var(--muted);
  direction: rtl; margin-bottom: 16px;
}
.accedi-form-note {
  font-family: var(--fi); font-size: 14px; color: var(--muted);
  line-height: 1.6; margin-bottom: 6px;
}
.accedi-form {
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px;
}
.accedi-input {
  background: var(--card); border: 1px solid var(--brd2);
  color: var(--ink); font-family: var(--fi); font-size: 18px;
  padding: 14px 18px; outline: none;
  transition: border-color .2s; width: 100%;
}
.accedi-input:focus       { border-color: var(--gold); }
.accedi-input::placeholder { color: var(--dim); }
.accedi-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; background: var(--red); color: #fff; border: none;
  padding: 14px 28px; font-family: var(--fi); font-size: 15px;
  letter-spacing: 1.2px; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
  transition: opacity .18s; width: 100%;
}
.accedi-btn:hover { opacity: .88; }
.btn-sep { color: rgba(255,255,255,.5); }

.accedi-magic-note {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--brd); background: var(--surf);
}
.mn-icon { font-size: 18px; color: var(--dim); flex-shrink: 0; margin-top: 2px; }
.mn-it   { font-family: var(--fi); font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.mn-ar   { font-family: var(--fa); font-size: 14px; color: var(--dim); direction: rtl; line-height: 1.7; }

.accedi-alert      { padding: 14px 18px; margin-bottom: 16px; }
.accedi-alert-err  { background: rgba(204,51,51,.1); border-left: 3px solid var(--red); }
.alert-it { font-family: var(--fi); font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.alert-ar { font-family: var(--fa); font-size: 14px; color: var(--muted); direction: rtl; line-height: 1.7; }

.accedi-success    { text-align: center; padding: 32px 0; }
.success-icon      { font-size: 52px; color: var(--gold); margin-bottom: 20px; line-height: 1; }
.success-it        { font-family: var(--fi); font-size: 20px; color: var(--ink); margin-bottom: 8px; }
.success-ar        { font-family: var(--fa); font-size: 18px; color: var(--muted); direction: rtl; margin-bottom: 20px; line-height: 1.7; }
.success-note      { font-family: var(--fi); font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 6px; }

/* ════════════════════════════════════════
   AREA PERSONALE
════════════════════════════════════════ */
.ap-hdr {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--brd);
}
.ap-eyebrow {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--red); margin-bottom: 8px; font-family: var(--fi);
}
.ap-title  { font-family: var(--fi); font-size: 38px; font-weight: 700; line-height: 1.1; margin-bottom: 8px; }
.ap-email  { font-size: 14px; color: var(--muted); font-family: var(--fi); letter-spacing: .3px; }
.ap-actions { margin-top: 20px; }
.ap-logout {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--brd2); color: var(--muted);
  padding: 7px 16px; font-family: var(--fi); font-size: 12px;
  letter-spacing: .8px; text-transform: uppercase;
  text-decoration: none; transition: all .18s;
}
.ap-logout:hover { border-color: var(--red); color: var(--ink); }

.ap-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 32px 0;
  margin-bottom: 16px;
}
.ap-feat-card {
  background: var(--card); border: 1px solid var(--brd);
  padding: 20px 22px; text-decoration: none;
  display: block; transition: border-color .18s;
}
.ap-feat-card:hover  { border-color: var(--gold); }
.ap-feat-info:hover  { border-color: var(--brd); }
.apf-icon { display: block; font-size: 22px; color: var(--gold); margin-bottom: 10px; }
.apf-it   { font-family: var(--fi); font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.apf-ar   { font-family: var(--fa); font-size: 14px; color: var(--muted); direction: rtl; }

.ap-section      { padding-bottom: 60px; }
.ap-section-hdr  {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
  border-top: 2px solid var(--red); padding-top: 24px;
}
.ap-section-it { font-family: var(--fi); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.ap-section-ar { font-family: var(--fa); font-size: 14px; color: var(--dim); direction: rtl; }
.ap-articles   { display: flex; flex-direction: column; }

/* ════════════════════════════════════════
   SHARE ARTICLE
════════════════════════════════════════ */
.art-share {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 0 10px;
}
.share-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.share-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  opacity: 0.82;
  transition: transform .18s, opacity .18s;
}
.share-icon:hover { transform: scale(1.13); opacity: 1; }
.share-icon svg { width: 20px; height: 20px; fill: #fff; display: block; }
.share-fb { background: #1877F2; }
.share-tw { background: #000; border: 1px solid #333; }
.share-wa { background: #25D366; }
.share-tg { background: #229ED9; }
.share-li { background: #0A66C2; }
.share-native-btn { display: none; }

@media (max-width: 700px) {
  .share-icons { display: none; }
  .share-native-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 26px;
    border: 1px solid var(--brd2);
    background: transparent;
    color: var(--ink);
    font-family: var(--fi);
    font-size: 14px;
    cursor: pointer;
    transition: border-color .18s, color .18s;
  }
  .share-native-btn:hover { border-color: var(--gold); color: var(--gold-lt); }
  .share-native-btn svg { width: 18px; height: 18px; stroke: var(--gold); fill: none; flex-shrink: 0; }
}

/* ════════════════════════════════════════
   RESPONSIVE — accedi & area personale
════════════════════════════════════════ */
@media (max-width: 768px) {
  .accedi-headline { font-size: 26px; }
  .accedi-hero     { padding: 36px 0; }
  .accedi-form-wrap { padding: 40px 0 60px; }
  .ap-features     { grid-template-columns: 1fr; gap: 10px; }
  .ap-title        { font-size: 28px; }
  .art-hdr-actions { gap: 8px; }
  .save-btn, .pdf-btn { padding: 5px 10px; font-size: 12px; }
  .lp-box          { padding: 32px 24px; }
}
/* Parole latine in contesto arabo — font latino corretto */
.col-ar .lat, .lat { font-family: var(--fi); font-style: normal; unicode-bidi: embed; direction: ltr; display: inline-block; }

/* Data araba — nascosta di default, visibile solo su mobile in modalità AR */
.a-date-ar { display: none; }

/* ── ORDINE MOBILE AR-FIRST ────────────────────────────────── */
@media (max-width: 768px) {
  /* Card articolo: colonna AR prima di IT (home, categoria, tag) */
  body.lang-ar .article-card {
    display: flex;
    flex-direction: column;
  }
  body.lang-ar .article-card .card-img {
    width: 100%;
    order: 0;
    flex-shrink: 0;
  }
  body.lang-ar .article-card .card-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
  }
  body.lang-ar .article-card .card-actions {
    order: 1;
  }
  body.lang-ar .article-card .col-ar {
    order: 2;
    border-top: none;
    border-bottom: 1px solid var(--brd);
    padding: 14px 0 10px 0;
  }
  body.lang-ar .article-card .bi-sep {
    display: none;
    order: 3;
  }
  body.lang-ar .article-card .col-it {
    order: 4;
    padding: 8px 0 16px 0;
  }

  /* Hero: colonna AR prima */
  body.lang-ar .hero-cols.bi {
    display: flex;
    flex-direction: column;
  }
  body.lang-ar .hero-cols .col-ar {
    order: 1;
    border-top: none;
    border-bottom: 1px solid var(--brd);
    padding-bottom: 12px;
  }
  body.lang-ar .hero-cols .bi-sep {
    order: 2;
    display: none;
  }
  body.lang-ar .hero-cols .col-it {
    order: 3;
    padding-top: 12px;
  }

  /* Header categoria/tag: AR sopra IT — stesso peso visivo */
  body.lang-ar .cat-hdr {
    display: flex;
    flex-direction: column;
  }
  body.lang-ar .cat-name-ar {
    order: 1;
    font-family: var(--fa-titolo);
  }
  body.lang-ar .cat-eyebrow { order: 2; }
  body.lang-ar .cat-name-it {
    order: 3;
    /* mantieni stesso stile italiano — nessuna riduzione */
  }
}