/* ============================================================
   ArDIRe – Archivio e Dizionario Digitali
   Stile principale
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;500;600&display=swap");

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

:root {
  /* Palette */
  --clr-bg: #fdfcfa;
  --clr-surface: #f4f0e8;
  --clr-border: #ddd4c4;
  --clr-ink: #18130e;
  --clr-mid: #3d3128;
  --clr-muted: #7a6e62;
  --clr-gold: #9a6b10;
  --clr-gold-lt: #d98100;
  --clr-accent: #7b3a12;
  --clr-teal: #1e6e6a;
  --clr-header: #16110c;

  /* Typography */
  --ff-serif: "EB Garamond", Georgia, serif;
  --ff-sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --max-w: 1080px;
  --radius: 6px;
  --radius-sm: 4px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--clr-ink);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--clr-gold);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  color: var(--clr-accent);
  text-decoration: underline;
}

p {
  margin-bottom: 0.9rem;
}
p:last-child {
  margin-bottom: 0;
}

/* --- CONTAINER --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--clr-gold);
  color: var(--clr-gold);
  font-family: var(--ff-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
  white-space: nowrap;
}
.btn:hover {
  background: var(--clr-gold);
  color: #fff;
  text-decoration: none;
  border-color: var(--clr-gold);
}

.btn-primary {
  background: var(--clr-gold);
  color: #fff;
}
.btn-primary:hover {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
}

.btn-small {
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--clr-header);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #2e261c;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo */
.logo-area {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.logo-placeholder {
  width: 40px;
  height: 40px;
  background: var(--clr-gold-lt);
  color: var(--clr-header);
  font-family: var(--ff-serif);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.site-title {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.title-acronym {
  font-family: var(--ff-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--clr-gold-lt);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.title-full {
  font-family: var(--ff-sans);
  font-size: 0.62rem;
  color: #888;
  line-height: 1.35;
  font-weight: 400;
}

/* Nav */
.main-nav ul {
  list-style: none;
}

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav a {
  color: #c8bfb4;
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  transition:
    background 0.15s,
    color 0.15s;
  display: block;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

/* Dropdown */
.submenu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #23201a;
  border: 1px solid #3a3228;
  border-radius: var(--radius-sm);
  min-width: 200px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-direction: column;
  overflow: hidden;
}

.has-submenu.open .submenu {
  display: flex;
}

.submenu li {
  border-bottom: 1px solid #2e2820;
}
.submenu li:last-child {
  border-bottom: none;
}

.submenu a {
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.6rem 1rem;
  color: #b0a89e;
  border-radius: 0;
}

.submenu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* Nav trigger button */
.nav-trigger {
  all: unset;
  cursor: pointer;
  color: #c8bfb4;
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  transition:
    background 0.15s,
    color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.has-submenu.open .nav-trigger {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-trigger::after {
  content: "▾";
  font-size: 0.6rem;
  opacity: 0.6;
  transition: transform 0.2s;
  display: inline-block;
}
.has-submenu.open .nav-trigger::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 55vh;
  min-height: 320px;
  overflow: hidden;
  background: #111;
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: brightness(0.7) sepia(15%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(10, 8, 5, 0.65) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.hero-caption {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--ff-sans);
  font-size: 0.75rem;
  font-style: italic;
}

/* ============================================================
   INTRO STRIP
   ============================================================ */
.intro-strip {
  background: linear-gradient(135deg, #4a1a06 0%, #7b3a12 40%, #9a6b10 100%);
  color: #f0e8de;
  padding: 0 2rem 4rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-title-logo {
  max-height: clamp(160px, 28vw, 280px);
  width: auto;
  display: block;
}

.hero-title-sub {
  font-family: var(--ff-sans);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 235, 200, 0.7);
  line-height: 1.6;
}

.intro-text {
  font-family: var(--ff-serif);
  font-size: 1.45rem;
  line-height: 1.8;
  max-width: 740px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: rgba(255, 245, 230, 0.85);
}

.two-env {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.env-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.env-number {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  font-weight: 700;
}

.env-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}
.env-card p {
  font-size: 0.9rem;
  flex: 1;
  color: rgba(255, 240, 220, 0.75);
}

.env-card .btn {
  align-self: flex-start;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 0.75rem;
}
.env-card .btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  color: #fff;
}

/* ============================================================
   SECTIONS COMMON
   ============================================================ */
.section {
  padding: 4rem 2rem;
}
.section-no-top {
  padding-top: 0;
}

.section-light {
  background: var(--clr-bg);
}
.section-warm {
  background: var(--clr-surface);
}
.section-manuscript {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.section-dark {
  background: #221b13;
  color: #ede0d0;
}

h2 {
  font-family: var(--ff-serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--clr-accent);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.section-dark h2 {
  color: #d4962a;
}
.section-warm h2 {
  color: var(--clr-accent);
}

h3 {
  font-family: var(--ff-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-mid);
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}

.section-dark h3 {
  color: #c48a1a;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--clr-muted);
  margin-bottom: 2rem;
  line-height: 1.65;
}

.section-dark .section-lead {
  color: #b0998a;
}

/* Divisore interno sezione */
.sub-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--clr-border);
}

.sub-section h3 {
  color: var(--clr-accent);
  margin-bottom: 0.9rem;
}

.sub-section-dark {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-section-dark h3 {
  color: #d4962a;
  margin-bottom: 0.8rem;
}
.sub-section-dark p {
  color: #b8a590;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.sub-h3 {
  font-family: var(--ff-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-mid);
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

/* Locandina badge */
.locandina-link {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  font-family: var(--ff-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clr-muted);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.4rem;
  vertical-align: middle;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.locandina-link:hover {
  background: var(--clr-gold);
  border-color: var(--clr-gold);
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   PROGETTO – banner panoramico
   ============================================================ */
.project-banner {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #111;
  margin-bottom: 3rem;
}

.project-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.82) sepia(12%);
  display: block;
}

.project-banner-caption {
  position: absolute;
  bottom: 0.75rem;
  right: 1.25rem;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  font-style: italic;
}

@media (max-width: 640px) {
  .project-banner {
    height: 180px;
    margin-bottom: 2rem;
  }
}

/* ============================================================
   IL PROGETTO – two-col layout
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3.5rem;
  align-items: start;
}

.col-text p {
  margin-bottom: 1rem;
  color: var(--clr-mid);
  line-height: 1.75;
}
.col-text ol.objectives {
  padding-left: 1.25rem;
  margin: 0.75rem 0 1rem;
  color: var(--clr-mid);
}
.col-text ol.objectives li {
  margin-bottom: 0.5rem;
}

.col-image figure {
  position: static;
}

.side-img {
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  filter: sepia(10%);
  width: 100%;
}

figure figcaption {
  font-size: 0.75rem;
  color: var(--clr-muted);
  font-style: italic;
  margin-top: 0.6rem;
  text-align: center;
}

/* ============================================================
   SCHEDA DIZIONARIO
   ============================================================ */
.scheda-block h3 {
  color: var(--clr-accent);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.scheda-block > p {
  font-size: 0.95rem;
  color: var(--clr-mid);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.scheda-sections {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
}

.scheda-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--clr-border);
  align-items: start;
}

.scheda-item:first-child {
  border-top: 1px solid var(--clr-border);
}

.scheda-item dt {
  font-family: var(--ff-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-accent);
  letter-spacing: 0.01em;
  padding-top: 0.15rem;
}

.scheda-item dd {
  font-size: 0.9rem;
  color: var(--clr-mid);
  line-height: 1.65;
}

.scheda-item dd p {
  margin-bottom: 0.65rem;
}
.scheda-item dd p:last-child {
  margin-bottom: 0;
}

.scheda-item dd ul {
  list-style: disc;
  padding-left: 1.1rem;
  margin: 0.5rem 0 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.scheda-item dd ul li {
  font-size: 0.9rem;
  color: var(--clr-mid);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .scheda-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .scheda-item dt {
    color: var(--clr-accent);
  }
}

/* ============================================================
   CARDS RICERCA
   ============================================================ */
.search-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.search-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-card h3 {
  color: var(--clr-gold-lt);
  font-size: 0.95rem;
}
.search-card h4 {
  font-size: 0.95rem;
  color: var(--clr-gold-lt);
}
.search-card p {
  font-size: 0.88rem;
  color: #c0ae9c;
  flex: 1;
}

.search-card-light {
  background: #fff;
  border: 1px solid var(--clr-border);
}
.search-card-light h4 {
  color: var(--clr-accent);
}
.search-card-light p {
  color: var(--clr-muted);
}

.search-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ============================================================
   EVENTI
   ============================================================ */
.events-list {
  list-style: none;
}

.events-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--clr-border);
  font-size: 0.9rem;
}

.events-list li:first-child {
  border-top: 1px solid var(--clr-border);
}

.event-date {
  color: var(--clr-accent);
  font-weight: 600;
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  padding-top: 0.15rem;
  line-height: 1.4;
}

.event-title {
  color: var(--clr-mid);
  line-height: 1.55;
}
.event-title em {
  color: var(--clr-ink);
}

/* ============================================================
   PUBBLICAZIONI
   ============================================================ */
.pub-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pub-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.pub-cover {
  width: 52px;
  min-width: 52px;
  height: 70px;
  background: var(--clr-accent);
  color: rgba(255, 220, 160, 0.85);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-family: var(--ff-sans);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pub-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  flex: 1;
}
.pub-citation {
  font-size: 0.88rem;
  color: var(--clr-mid);
  line-height: 1.6;
  flex: 1;
}

/* Lista bibliografica pubblicazioni */
.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--clr-border);
}

.pub-item:first-child {
  border-top: 1px solid var(--clr-border);
}

.pub-item .pub-citation {
  font-size: 0.93rem;
  font-family: var(--ff-serif);
  color: var(--clr-mid);
  line-height: 1.65;
  flex: none;
}

.pub-item .pub-citation a {
  color: var(--clr-gold);
}

.pub-item .pub-citation a:hover {
  color: var(--clr-accent);
}

.pub-meta {
  font-size: 0.82rem;
  color: var(--clr-muted);
  font-style: normal;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--clr-border);
  border-radius: 50%;
  color: var(--clr-muted);
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}

.btn-download svg {
  width: 16px;
  height: 16px;
}

.btn-download:hover {
  border-color: var(--clr-gold);
  color: var(--clr-gold);
  background: transparent;
  text-decoration: none;
}

.note {
  font-size: 0.85rem;
  color: var(--clr-muted);
  font-style: italic;
}

/* ============================================================
   PRESENTAZIONE – cards
   ============================================================ */
.pres-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.pres-card {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.pres-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-accent);
  border-left: 3px solid var(--clr-gold-lt);
  padding-left: 0.6rem;
}
.pres-card p {
  font-size: 0.88rem;
  color: var(--clr-muted);
  flex: 1;
  line-height: 1.6;
}

/* ============================================================
   GRUPPO DI LAVORO
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.team-unit {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.team-logo {
  max-width: 150px;
  max-height: 55px;
  width: auto;
  height: auto;
  margin-bottom: 0.75rem;
}

.team-unit h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-accent);
  border-bottom: 2px solid var(--clr-gold-lt);
  padding-bottom: 0.6rem;
  margin-bottom: 0.9rem;
  font-weight: 600;
}

.team-unit p {
  font-size: 0.8rem;
  color: var(--clr-muted);
  margin-bottom: 0.8rem;
  line-height: 1.35;
}

.team-unit-full {
  grid-column: 1 / -1;
}

.team-members-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2.5rem;
  column-count: unset;
}

.team-members-inline li {
  border-bottom: none;
  min-width: 160px;
}

.team-members {
  list-style: none;
}
.team-members li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--clr-border);
  color: var(--clr-mid);
  font-size: 0.88rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #fff;
  color: var(--clr-muted);
  border-top: 3px solid var(--clr-border);
  padding: 3rem 2rem 2rem;
  text-align: center;
}

.footer-section {
  margin-bottom: 2rem;
}

.footer-section + .footer-section {
  border-top: 1px solid var(--clr-border);
  padding-top: 2rem;
}

.footer-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--clr-border);
  padding-top: 2rem;
  margin-bottom: 2rem;
}

.footer-section-inline {
  margin-bottom: 0;
  border-top: none !important;
  padding-top: 0 !important;
}

.footer-label {
  font-family: var(--ff-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: 0.1rem;
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.footer-logo-link:hover {
  opacity: 1;
}

.footer-logo {
  display: block;
  height: 72px;
  width: auto;
  object-fit: contain;
}

.footer-logo-wide {
  height: 72px;
  max-width: 600px;
  width: 100%;
}

.footer-logo-memofonte {
  height: 66px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--clr-muted);
  border-top: 1px solid var(--clr-border);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* ============================================================
   CORPUS TABLE
   ============================================================ */
.corpus-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 1.25rem;
  border-radius: var(--radius);
}

.corpus-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-family: var(--ff-sans);
  color: rgba(255, 255, 255, 0.85);
}

.corpus-table thead tr {
  background: rgba(255, 255, 255, 0.1);
}

.corpus-table th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--clr-gold-lt);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

.corpus-table-btns a {
  color: var(--clr-gold-lt);
}

.corpus-table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: top;
  line-height: 1.5;
}

.corpus-table td:nth-child(2) {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}

.corpus-table td:nth-child(3) {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}

.corpus-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.corpus-table-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* ============================================================
   FASCIA IMMAGINI
   ============================================================ */
.img-strip {
  display: flex;
  width: 100%;
  max-height: 400px;
  overflow: hidden;
  line-height: 0;
}

.img-strip-item {
  flex: 1 1 50%;
  width: 50%;
  height: 400px;
  object-fit: cover;
  object-position: top;
  display: block;
}

.lemmario-alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 1.2rem 0 0.5rem;
}
.alpha-btn {
  background: transparent;
}

.alpha-btn-tutti {
  width: auto;
  padding: 0 0.8rem;
}

/* Overlay */
.lemmario-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 900;
}
.lemmario-overlay.active {
  display: block;
}
/* Modal */
.lemmario-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 901;
  width: min(480px, 92vw);
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  flex-direction: column;
}
.lemmario-modal.active {
  display: flex;
}
.lemmario-modal-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 70vh;
}
.lemmario-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem 0.75rem;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}
.lemmario-modal-header h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #333;
}
.lemmario-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 0 0.2rem;
  transition: color 0.15s;
}
.lemmario-modal-close:hover {
  color: #111;
}
.lemmario-modal-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  overflow-y: auto;
  flex: 1;
}
.lemmario-modal-list li {
  border-bottom: 1px solid #f0f0f0;
}
.lemmario-modal-list li:last-child {
  border-bottom: none;
}
.lemmario-modal-list a {
  display: block;
  padding: 0.55rem 1.2rem;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .col-image figure {
    position: static;
  }
  .two-env {
    grid-template-columns: 1fr;
  }
  .search-cards {
    grid-template-columns: 1fr;
  }
  .pres-grid {
    grid-template-columns: 1fr 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 1.25rem;
  }
  .container {
    padding: 0 1.25rem;
  }
  .section {
    padding: 3rem 1.25rem;
  }
  .title-full {
    display: none;
  }

  .main-nav > ul {
    gap: 0;
  }
  .nav-trigger,
  .main-nav a {
    font-size: 0.72rem;
    padding: 0.3rem 0.45rem;
  }

  .hero {
    height: 42vh;
    min-height: 220px;
  }

  h2 {
    font-size: 1.6rem;
  }

  .pres-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }

  .events-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .pub-card {
    flex-direction: column;
  }
  .pub-cover {
    width: 100%;
    height: 44px;
    border-radius: var(--radius-sm);
  }

  .footer-logo {
    height: 52px;
  }
  .footer-logo-wide {
    height: 52px;
  }
  .footer-logos {
    gap: 1.5rem;
  }

  .intro-text {
    font-size: 1.2rem;
  }
}
@media (max-width: 480px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 1rem;
  }

  .header-inner > *:nth-child(2) {
    width: 100%;
  }
}
