/* =====================================================================
   Istituto UNINTESS — Public design system
   Direction: EDITORIAL ACADEMIC · university-press / research-journal
   Paper (ivory) + ink + oxblood accent · hairline rules · high-contrast serif
   Type: Fraunces (display) · Newsreader (prose) · Inter (UI/labels)
   ===================================================================== */

:root {
    /* Paper & ink */
    --paper: #f4efe4;          /* warm ivory page */
    --paper-2: #ece4d4;        /* alternate section */
    --surface: #fbf8f1;        /* cards */
    --surface-solid: #ffffff;
    --ink: #211b12;            /* near-black warm */
    --ink-800: #2c251a;
    --ink-soft: #4a4234;
    --muted: #726859;          /* warm taupe body-muted */
    --muted-2: #8a7f6d;
    --rule: #d8cdb6;           /* hairline rules on paper */
    --rule-strong: #c4b79c;

    /* Accent — oxblood / bordeaux */
    --oxblood: #7c2d33;
    --oxblood-600: #6a252b;
    --oxblood-700: #571d22;
    --oxblood-tint: #f0e2df;
    --oxblood-tint-2: #e7d3d1;

    /* Legacy aliases (kept so component rules resolve to the new palette) */
    --navy-950: var(--ink);
    --navy-900: var(--ink);
    --navy-800: var(--ink-800);
    --blue-700: var(--oxblood);
    --blue-600: var(--oxblood);
    --blue-500: var(--oxblood-600);

    --radius-sm: 2px;
    --radius: 3px;
    --radius-lg: 4px;
    --radius-xl: 6px;

    --shadow-sm: 0 1px 2px rgba(33, 27, 18, .05);
    --shadow: 0 8px 24px rgba(33, 27, 18, .07);
    --shadow-lg: 0 18px 44px rgba(33, 27, 18, .12);
    --shadow-xl: 0 30px 60px rgba(33, 27, 18, .18);

    --container: 1180px;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --focus: #7c2d33;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.7;
    color: var(--ink-soft);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--oxblood); text-decoration: none; }
a:hover { color: var(--oxblood-700); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -.015em;
    font-optical-sizing: auto;
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 32px; }

/* Editorial eyebrow: small-caps sans with a leading tick */
.eyebrow {
    display: inline-flex; align-items: center; gap: .7rem;
    font-family: var(--font-sans); font-weight: 600;
    text-transform: uppercase; letter-spacing: .22em; font-size: .68rem;
    color: var(--oxblood);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--oxblood); display: inline-block; }
.eyebrow--plain::before { display: none; }
.eyebrow--gold { color: var(--oxblood); }

.skip-link {
    position: absolute; left: 12px; top: -60px;
    background: var(--ink); color: var(--paper); padding: 10px 18px;
    border-radius: 3px; z-index: 200; transition: top .2s ease; font-family: var(--font-sans);
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* ---- Buttons (refined, sans, small radius) ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    font-family: var(--font-sans); font-weight: 600; font-size: .82rem;
    letter-spacing: .06em; text-transform: uppercase;
    padding: .95rem 1.7rem; border-radius: var(--radius); border: 1px solid transparent;
    cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
    min-height: 50px; text-align: center;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary { background: var(--oxblood); color: #fff; }
.btn--primary:hover { background: var(--oxblood-700); color: #fff; }
.btn--gold { background: var(--oxblood); color: #fff; }         /* legacy name -> primary oxblood */
.btn--gold:hover { background: var(--oxblood-700); color: #fff; }
.btn--outline { background: transparent; border-color: var(--rule-strong); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn--ghost-light { background: transparent; border-color: rgba(244,239,228,.45); color: var(--paper); }
.btn--ghost-light:hover { background: rgba(244,239,228,.12); color: #fff; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.link-arrow {
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: var(--font-sans); font-weight: 600; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--oxblood); border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s ease; }
.link-arrow:hover { border-bottom-color: var(--oxblood); }
.link-arrow:hover svg { transform: translateX(4px); }

/* =====================================================================
   Header — editorial masthead
   ===================================================================== */
.topbar {
    background: var(--ink); color: var(--paper);
    font-family: var(--font-sans); font-size: .68rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
.topbar__inner { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: space-between; align-items: center; padding-block: 9px; }
.topbar__group { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.topbar__label { color: var(--oxblood-tint); }
.topbar__label--gold { color: #d8a94a; }
.topbar a { color: var(--paper); }
.topbar a:hover { color: #d8a94a; }
.topbar__sep { color: rgba(244,239,228,.3); }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(244,239,228,.9); backdrop-filter: saturate(150%) blur(8px); border-bottom: 1px solid var(--rule); }
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 92px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand__logo { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--surface-solid); padding: 5px; object-fit: contain; transition: transform .2s ease; }
.brand:hover .brand__logo { transform: rotate(-4deg); }
.brand__name { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.brand__tag { display: block; font-family: var(--font-sans); font-size: .56rem; font-weight: 500; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); max-width: 280px; margin-top: 5px; line-height: 1.4; }

.nav-links { display: flex; gap: 4px; align-items: center; list-style: none; padding: 0; }
.nav-links a {
    display: inline-block; padding: .5rem .95rem; border-radius: var(--radius); white-space: nowrap;
    font-family: var(--font-sans); font-weight: 500; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
    color: var(--ink-soft); position: relative; transition: color .2s ease;
}
.nav-links a::after { content: ""; position: absolute; left: .95rem; right: .95rem; bottom: .3rem; height: 1.5px; background: var(--oxblood); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.nav-links a:hover { color: var(--oxblood); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--oxblood); }

.nav-toggle { display: none; background: none; border: 1px solid var(--rule-strong); color: var(--ink); cursor: pointer; padding: 9px; border-radius: var(--radius); }
.nav-toggle:hover { background: var(--surface); }

.mobile-nav { display: none; border-top: 1px solid var(--rule); background: var(--paper); }
.mobile-nav ul { list-style: none; padding: 12px; margin: 0; display: grid; gap: 2px; }
.mobile-nav a { display: block; padding: .85rem 1rem; border-radius: var(--radius); font-family: var(--font-sans); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; color: var(--ink-soft); }
.mobile-nav a:hover, .mobile-nav a.is-active { background: var(--oxblood-tint); color: var(--oxblood); }
.mobile-nav.is-open { display: block; }

.nav-tail { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 3px; }
.lang-switch__item { font-family: var(--font-sans); font-size: .72rem; font-weight: 600; letter-spacing: .05em; color: var(--muted); padding: 4px 10px; border-radius: 999px; line-height: 1; transition: background-color .18s ease, color .18s ease; }
.lang-switch__item:hover { color: var(--oxblood); }
.lang-switch__item.is-active { background: var(--oxblood); color: #fff; }
.mobile-nav__lang { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--rule); }
.mobile-nav__lang .lang-switch__item { border: 1px solid var(--rule-strong); }

@media (max-width: 940px) {
    .topbar { display: none; }
    .nav-links { display: none; }
    .nav-toggle { display: inline-flex; }
    .nav-tail > .lang-switch { display: none; }
    .brand__tag { display: none; }
    .navbar { height: 76px; }
}

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer { background: var(--ink); color: #c9bfae; margin-top: 0; }
.site-footer .container { padding-block: 72px 34px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 48px; }
.footer-brand__name { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--paper); }
.footer-brand p { margin-top: 16px; max-width: 34ch; color: #a89d8a; font-size: .98rem; }
.footer-col h3 { color: var(--paper); font-family: var(--font-sans); font-size: .7rem; text-transform: uppercase; letter-spacing: .18em; margin-bottom: 18px; font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.footer-col a { color: #b3a893; font-size: .98rem; }
.footer-col a:hover { color: #d8a94a; }
.footer-contact li { font-size: .98rem; margin-bottom: 9px; color: #b3a893; }
.footer-contact strong { color: var(--paper); font-weight: 600; font-family: var(--font-sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-bottom { border-top: 1px solid rgba(244,239,228,.12); margin-top: 48px; padding-top: 26px; text-align: center; font-family: var(--font-sans); font-size: .78rem; letter-spacing: .03em; color: #8a7f6d; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 34px; } }

/* =====================================================================
   Hero — editorial (paper, framed image, no dark full-bleed)
   ===================================================================== */
.hero { position: relative; background: var(--paper); border-bottom: 1px solid var(--rule); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; padding-block: 88px 96px; }
.hero__col { max-width: 40rem; }
.hero__badge {
    display: inline-flex; align-items: center; gap: .7rem; margin-bottom: 30px;
    font-family: var(--font-sans); font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--oxblood);
}
.hero__badge::before { content: ""; width: 30px; height: 1px; background: var(--oxblood); }
.hero h1 { font-size: clamp(3rem, 6.5vw, 5.4rem); color: var(--ink); font-weight: 600; letter-spacing: -.025em; line-height: .98; }
.hero h1 .accent { display: block; font-family: var(--font-display); font-style: normal; font-weight: 600; letter-spacing: -.02em; color: var(--oxblood); }
.hero__rule { width: 84px; height: 2px; background: var(--ink); margin: 30px 0; }
.hero__sub { font-family: var(--font-serif); font-size: clamp(1.15rem, 1.8vw, 1.4rem); color: var(--ink-soft); max-width: 34rem; line-height: 1.6; }
.hero__cta { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero__figure { position: relative; }
.hero__figure img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); filter: grayscale(.15) contrast(1.02); }
.hero__frame { position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); z-index: -1; }
.hero__figcap { margin-top: 16px; font-family: var(--font-sans); font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.hero__figcap::before { content: ""; width: 22px; height: 1px; background: var(--rule-strong); }
@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; gap: 44px; padding-block: 56px 64px; }
    .hero__figure { order: -1; max-width: 340px; }
}

/* =====================================================================
   Sections & shared blocks
   ===================================================================== */
.section { padding-block: 104px; }
.section--tight { padding-block: 68px; }
.section--slate { background: var(--paper-2); border-block: 1px solid var(--rule); }
.section-head { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); margin-top: 18px; font-weight: 500; }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 1.15rem; }

/* Split (message / quote) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 44px; } }

.quote-card { position: relative; padding: 8px 0 8px 44px; border-left: 2px solid var(--oxblood); }
.quote-card::before { content: "\201C"; position: absolute; left: 30px; top: -30px; font-family: var(--font-display); font-size: 5rem; color: var(--oxblood); opacity: .18; line-height: 1; }
.quote-card p { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.35rem, 2.4vw, 1.85rem); color: var(--ink); line-height: 1.4; font-weight: 400; }
.quote-card__author { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--rule); }
.quote-card__author strong { display: block; font-size: 1.05rem; color: var(--ink); font-family: var(--font-sans); font-weight: 600; }
.quote-card__author span { color: var(--oxblood); font-family: var(--font-sans); font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; }

.prose-block h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 500; }
.prose-block h2 .accent { color: var(--oxblood); font-style: italic; }
.prose-block p { margin-top: 22px; font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
.prose-block .link-arrow { margin-top: 30px; }

/* Identity band — deep ink contrast section */
.identity {
    position: relative; overflow: hidden; color: var(--paper);
    background: var(--oxblood-700); border: 1px solid var(--oxblood-600);
    border-radius: var(--radius-lg); padding: 90px 60px;
}
.identity::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(244,239,228,.12); border-radius: var(--radius); pointer-events: none; }
.identity__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 1; }
.identity h2 { color: var(--paper); font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 500; }
.identity p { margin-top: 24px; color: #c9bfae; font-family: var(--font-serif); font-size: 1.1rem; }
.identity__motto { margin-top: 28px; font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: #d8a94a; border-left: 2px solid rgba(216,169,74,.4); padding: 4px 0 4px 20px; }
.identity__tags { margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; }
.identity__tags span { padding: 7px 15px; border: 1px solid rgba(244,239,228,.2); border-radius: var(--radius); font-family: var(--font-sans); font-size: .64rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: rgba(244,239,228,.7); }
.identity__seal { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.identity__seal img { width: 72%; filter: brightness(0) invert(1); opacity: .92; }
.identity__seal::after { content: ""; position: absolute; inset: 6%; border: 1px solid rgba(244,239,228,.16); border-radius: 50%; }
@media (max-width: 820px) { .identity { padding: 52px 30px; } .identity__grid { grid-template-columns: 1fr; gap: 40px; } }

/* Feature cards — numbered editorial columns */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.feature-card { padding: 40px 34px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); position: relative; background: transparent; transition: background-color .25s ease; counter-increment: feat; }
.feature-card:first-child { border-left: 1px solid var(--rule); }
.feature-card:hover { background: var(--surface); }
.feature-card__icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--oxblood); margin-bottom: 22px; }
.feature-card__icon svg { width: 30px; height: 30px; }
.feature-card::after { content: "0" counter(feat); position: absolute; top: 28px; right: 30px; font-family: var(--font-display); font-size: 1.1rem; color: var(--rule-strong); font-weight: 500; }
.feature-card h3 { font-size: 1.4rem; margin-bottom: 10px; font-weight: 500; }
.feature-card p { color: var(--muted); }
.feature-grid { counter-reset: feat; }
@media (max-width: 820px) { .feature-grid { grid-template-columns: 1fr; } .feature-card { border-left: 1px solid var(--rule); } }

/* Publications */
.pub-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: stretch; }
.pub-image { border-radius: var(--radius); overflow: hidden; min-height: 420px; border: 1px solid var(--rule-strong); position: relative; }
.pub-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2) contrast(1.02); }
.pub-stack { display: grid; gap: 24px; }
.pub-featured { background: var(--oxblood); color: #fff; border-radius: var(--radius); padding: 44px; position: relative; overflow: hidden; }
.pub-featured h3 { color: #fff; font-size: 1.7rem; font-weight: 500; }
.pub-featured p { color: rgba(255,255,255,.85); font-style: italic; font-family: var(--font-serif); margin: 18px 0 28px; font-size: 1.15rem; }
.pub-featured__row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.pub-featured .btn--gold { background: var(--paper); color: var(--oxblood); }
.pub-featured .btn--gold:hover { background: #fff; color: var(--oxblood-700); }
.pub-featured__authors { font-family: var(--font-sans); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: rgba(255,255,255,.75); }
.pub-featured__icon { position: absolute; top: 22px; right: 22px; width: 40px; height: 40px; color: rgba(255,255,255,.25); }
.pub-list { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 40px; }
.pub-list h3 { font-size: 1.4rem; margin-bottom: 22px; font-weight: 500; }
.pub-list a { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--rule); font-family: var(--font-sans); font-weight: 500; font-size: .95rem; color: var(--ink); }
.pub-list a:last-child { border-bottom: none; }
.pub-list a:hover { color: var(--oxblood); }
.pub-list a svg { width: 16px; height: 16px; color: var(--oxblood); flex-shrink: 0; }
@media (max-width: 900px) { .pub-layout { grid-template-columns: 1fr; } .pub-image { min-height: 280px; } }

/* =====================================================================
   Page header (interior) — light editorial
   ===================================================================== */
.page-hero { position: relative; background: var(--paper); border-bottom: 1px solid var(--rule); padding-block: 88px 72px; }
.page-hero__inner { position: relative; z-index: 2; max-width: 820px; }
.page-hero h1 { color: var(--ink); font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 500; letter-spacing: -.025em; margin-top: 20px; }
.page-hero h1 .accent { font-style: italic; color: var(--oxblood); }
.page-hero__rule { width: 84px; height: 2px; background: var(--ink); margin: 28px 0 0; }
.page-hero p { margin-top: 28px; font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink-soft); max-width: 46rem; }

/* =====================================================================
   Departments
   ===================================================================== */
.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.dept-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.dept-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--rule-strong); }
.dept-card__media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.dept-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .6s ease; }
.dept-card:hover .dept-card__media img { transform: scale(1.03); }
.dept-card__icon { position: absolute; top: 14px; left: 14px; z-index: 2; width: 42px; height: 42px; border-radius: var(--radius); display: grid; place-items: center; color: #fff; background: rgba(33,27,18,.7); backdrop-filter: blur(3px); }
.dept-card__icon svg { width: 21px; height: 21px; }
.dept-card__body { padding: 30px; display: flex; flex-direction: column; flex: 1; }
.dept-card__body h2 { font-size: 1.45rem; font-weight: 500; margin-top: 6px; }
.dept-card__director { display: flex; align-items: center; gap: 8px; margin: 14px 0 18px; color: var(--oxblood); font-family: var(--font-sans); font-style: normal; font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.dept-card__director svg { width: 15px; height: 15px; flex-shrink: 0; }
.dept-card__body p { color: var(--muted); font-size: 1rem; }
@media (max-width: 1000px) { .dept-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .dept-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   Educational offer
   ===================================================================== */
.offer-category { margin-bottom: 80px; }
.offer-category__head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 36px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.offer-category__badge { display: none; }
.offer-category__head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 500; }
.offer-category__head::before { content: ""; }
.offer-category__line { display: none; }
.offer-category__count { margin-left: auto; font-family: var(--font-sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.course-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.course-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--rule-strong); }
.course-card__bar { display: none; }
.course-card__body { padding: 30px; display: flex; flex-direction: column; flex: 1; }
.course-card__tags { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 8px; }
.tag { font-family: var(--font-sans); font-size: .64rem; font-weight: 600; padding: 5px 12px; border-radius: var(--radius); text-transform: uppercase; letter-spacing: .12em; }
.tag--master { background: var(--oxblood); color: #fff; }
.tag--corso { background: transparent; color: var(--ink); border: 1px solid var(--rule-strong); }
.tag--closed { background: transparent; color: var(--muted); border: 1px solid var(--rule); display: inline-flex; align-items: center; gap: 6px; }
.tag--closed svg { width: 12px; height: 12px; }
.course-card h3 { font-size: 1.28rem; line-height: 1.22; margin-bottom: 26px; flex: 1; font-weight: 500; }
.course-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.course-actions .btn { padding: .7rem .9rem; font-size: .7rem; min-height: 46px; }
.btn--sm-outline { border: 1px solid var(--rule-strong); color: var(--ink); background: transparent; }
.btn--sm-outline:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
@media (max-width: 1000px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .course-grid { grid-template-columns: 1fr; } }

/* Enrolment band — oxblood contrast */
.enrol { position: relative; overflow: hidden; background: var(--oxblood); border-radius: var(--radius-lg); padding: 80px 60px; color: #fff; }
.enrol::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); pointer-events: none; }
.enrol__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.enrol .eyebrow { color: rgba(255,255,255,.85); }
.enrol .eyebrow::before { background: rgba(255,255,255,.85); }
.enrol h2 { color: #fff; font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 500; }
.enrol h2 .accent { font-style: italic; }
.enrol p { margin-top: 22px; color: rgba(255,255,255,.85); font-family: var(--font-serif); max-width: 30rem; }
.enrol__stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.enrol__stat { display: flex; gap: 13px; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); padding: 15px 18px; }
.enrol__stat svg { width: 24px; height: 24px; color: rgba(255,255,255,.85); }
.enrol__stat small { display: block; font-family: var(--font-sans); font-size: .6rem; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.6); font-weight: 500; }
.enrol__stat strong { color: #fff; font-family: var(--font-sans); font-size: .95rem; }
.enrol__card { background: var(--surface); border-radius: var(--radius); padding: 44px; color: var(--ink-soft); }
.enrol__card .eyebrow { color: var(--oxblood); }
.enrol__card .eyebrow::before { background: var(--oxblood); }
.enrol__card h3 { font-size: 1.6rem; margin: 10px 0 18px; font-weight: 500; }
.enrol__card p { color: var(--muted); margin-bottom: 26px; }
.enrol__card .btn { margin-bottom: 12px; }
@media (max-width: 900px) { .enrol { padding: 48px 28px; } .enrol__grid { grid-template-columns: 1fr; gap: 40px; } }

/* =====================================================================
   News
   ===================================================================== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; height: 100%; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--rule-strong); }
.news-card__media { position: relative; height: 210px; overflow: hidden; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.news-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .6s ease; }
.news-card:hover .news-card__media img { transform: scale(1.04); }
.news-card__media svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; color: rgba(33,27,18,.25); }
.news-card__body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.news-card__date { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.news-card__date svg { width: 14px; height: 14px; }
.news-card__body h2 { font-size: 1.32rem; line-height: 1.24; margin-bottom: 14px; font-weight: 500; }
.news-card:hover .news-card__body h2 { color: var(--oxblood); }
.news-card__excerpt { color: var(--muted); font-size: 1rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .link-arrow { margin-top: 20px; }
@media (max-width: 1000px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .news-grid { grid-template-columns: 1fr; } }

.empty-state { text-align: center; padding: 90px 20px; color: var(--muted); }
.empty-state svg { width: 60px; height: 60px; color: var(--rule-strong); margin: 0 auto 18px; }
.empty-state h2 { color: var(--muted); font-weight: 500; }

/* Article */
.article-cover { background: var(--ink); display: grid; place-items: center; border-bottom: 1px solid var(--rule); }
.article-cover img { max-height: 56vh; width: auto; object-fit: contain; }
.article { max-width: 720px; margin-inline: auto; }
.article__meta { display: flex; flex-wrap: wrap; gap: 22px; color: var(--muted); font-family: var(--font-sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin: 10px 0 26px; }
.article__meta span { display: inline-flex; align-items: center; gap: 8px; }
.article__meta svg { width: 15px; height: 15px; }
.article h1 { font-size: clamp(2.2rem, 4.5vw, 3.3rem); margin-bottom: 28px; font-weight: 500; letter-spacing: -.02em; }
.article__excerpt { font-size: 1.3rem; color: var(--ink); font-family: var(--font-serif); font-style: italic; border-left: 2px solid var(--oxblood); padding-left: 26px; margin-bottom: 40px; line-height: 1.5; }

/* Rich text (markdown output) */
.prose { color: var(--ink-soft); font-size: 1.16rem; font-family: var(--font-serif); }
.prose > * + * { margin-top: 1.2em; }
.prose h1 { font-size: 2.1rem; margin-top: 1.7em; font-weight: 500; }
.prose h2 { font-size: 1.7rem; margin-top: 1.7em; font-weight: 500; }
.prose h3 { font-size: 1.35rem; margin-top: 1.5em; font-weight: 500; }
.prose p { line-height: 1.8; }
.prose a { color: var(--oxblood); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-top: .45em; }
.prose img { border-radius: var(--radius); margin-block: 1.8em; border: 1px solid var(--rule); }
.prose blockquote { border-left: 2px solid var(--oxblood); padding-left: 22px; color: var(--muted); font-style: italic; }
.prose hr { border: none; border-top: 1px solid var(--rule); margin-block: 2.2em; }
.prose code { background: var(--paper-2); padding: 2px 7px; border-radius: 3px; font-size: .9em; font-family: ui-monospace, monospace; }

/* =====================================================================
   Contacts
   ===================================================================== */
.contact-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; }
.contact-cards { display: grid; gap: 22px; }
.contact-card { background: var(--surface); border: 1px solid var(--rule); border-left: 2px solid var(--oxblood); border-radius: var(--radius); padding: 28px; }
.contact-card--alt { border-left-color: var(--rule-strong); }
.contact-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin-bottom: 16px; font-weight: 500; }
.contact-card h3 svg { width: 20px; height: 20px; color: var(--oxblood); }
.contact-card ul { list-style: none; padding: 0; display: grid; gap: 9px; font-size: 1rem; color: var(--muted); }
.contact-card li { display: flex; align-items: center; gap: 10px; }
.contact-card li svg { width: 16px; height: 16px; color: var(--muted-2); flex-shrink: 0; }
.contact-highlight { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 30px; }
.contact-highlight__row { display: flex; align-items: center; gap: 10px; color: var(--paper); font-family: var(--font-sans); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.contact-highlight__row svg { width: 20px; height: 20px; color: #d8a94a; }
.contact-highlight .pec { font-family: ui-monospace, monospace; color: #d8bfa0; font-size: .95rem; }
.contact-highlight__verde { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: #fff; letter-spacing: -.02em; }
.contact-highlight hr { border: none; border-top: 1px solid rgba(244,239,228,.16); margin-block: 22px; }
.contact-highlight small { color: #a89d8a; font-family: var(--font-sans); font-size: .74rem; }

.form-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 44px; }
.form-card h2 { font-size: 1.7rem; font-weight: 500; }
.form-card > p { color: var(--muted); margin: 8px 0 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-family: var(--font-sans); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.field input, .field textarea, .field select {
    font-family: var(--font-serif); font-size: 1.05rem; padding: .85rem 1rem; border: 1px solid var(--rule-strong);
    border-radius: var(--radius); background: var(--surface-solid); color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--oxblood); box-shadow: 0 0 0 3px var(--oxblood-tint); }
.field textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 26px; font-family: var(--font-sans); font-weight: 500; }
.alert--success { background: #e8efe4; color: #3a5a2b; border: 1px solid #c4d6b6; }
.alert--error { background: #f7e6e4; color: #8a2b22; border: 1px solid #e6bdb6; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }

/* Legal / prose pages */
.legal { max-width: 760px; margin-inline: auto; }

/* Utilities */
.text-center { text-align: center; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---- Announcement popup (discreet bottom toast, no page dimming) ---- */
.site-popup { position: fixed; right: 24px; bottom: 24px; z-index: 3000; width: min(360px, calc(100vw - 32px)); opacity: 0; transform: translateY(24px); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.site-popup.is-open { opacity: 1; transform: none; pointer-events: auto; }
.site-popup__card { position: relative; background: var(--surface-solid); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 18px 44px rgba(33,27,18,.24); overflow: hidden; }
.site-popup__x { position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); border: 1px solid var(--rule); color: var(--ink); cursor: pointer; transition: background-color .15s ease; }
.site-popup__x:hover { background: #fff; }
.site-popup__x svg { width: 16px; height: 16px; }
.site-popup__media img { width: 100%; max-height: 140px; object-fit: cover; display: block; }
.site-popup__body { padding: 18px 20px 20px; }
.site-popup__title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--ink); line-height: 1.2; padding-right: 26px; }
.site-popup__text { margin-top: 6px; color: var(--muted); font-family: var(--font-serif); font-size: .98rem; line-height: 1.55; }
.site-popup__cta { margin-top: 14px; }
@media (max-width: 520px) { .site-popup { right: 14px; left: 14px; bottom: 14px; width: auto; } }

/* =====================================================================
   Albo Nazionale Criminologi — theme override + local components
   Same editorial system as UNINTESS, re-toned to a deep institutional
   navy with a warm gold secondary (the Albo's identity).
   ===================================================================== */
:root {
    --oxblood: #1f3a5c;          /* deep institutional navy */
    --oxblood-600: #274b78;
    --oxblood-700: #16304f;
    --oxblood-tint: #e7edf4;
    --oxblood-tint-2: #d6e2ef;
    --focus: #1f3a5c;
    --gold: #c08a2d;
}
.eyebrow--gold, .eyebrow { color: var(--oxblood); }
.hero__badge { color: var(--oxblood); }

/* Left-aligned section head + prose column for editorial home sections */
.split-prose { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 40px 60px; align-items: start; }
.split-prose .section-head { text-align: left; margin: 0; }
.section-head--left { text-align: left; }
@media (max-width: 860px) { .split-prose { grid-template-columns: 1fr; gap: 18px; } }
.prose--center { max-width: 760px; margin: 0 auto; text-align: left; }

/* Document download cards (Iscrizione page) */
.doc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 8px; }
.doc-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s, transform .2s; }
.doc-card:hover { border-color: var(--oxblood); box-shadow: var(--shadow); transform: translateY(-2px); }
.doc-card__icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: var(--radius); background: var(--oxblood-tint); color: var(--oxblood); display: grid; place-items: center; }
.doc-card__label { flex: 1; font-family: var(--font-sans); font-weight: 600; color: var(--ink); font-size: 1rem; }
.doc-card__action { color: var(--muted); }
.doc-card:hover .doc-card__action { color: var(--oxblood); }
/* Upload control shown on doc cards while editing */
.doc-card__upload { flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); border: 1px dashed var(--rule-strong); background: var(--surface-solid); color: var(--oxblood); cursor: pointer; transition: background .2s, border-color .2s; }
.doc-card__upload:hover { background: var(--oxblood-tint); border-color: var(--oxblood); }
.doc-card__upload.is-loading { opacity: .5; pointer-events: none; }
.is-editing .doc-card { cursor: default; }

/* Members/structure cards can carry a role eyebrow in gold */
.dept-card .eyebrow { color: var(--gold); }

/* Iscrizione — the two Albo sections, presented as accented cards */
.iscr-sezioni { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; align-items: stretch; }
@media (max-width: 780px) { .iscr-sezioni { grid-template-columns: 1fr; } }
.iscr-sezione { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 40px 36px 36px; box-shadow: var(--shadow-sm); transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.iscr-sezione:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--rule-strong); }
.iscr-sezione::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.iscr-sezione--a::before { background: var(--oxblood); }
.iscr-sezione--b::before { background: var(--gold); }
.iscr-sezione__watermark { position: absolute; top: -20px; right: 8px; font-family: var(--font-display); font-size: 8rem; font-weight: 700; line-height: 1; pointer-events: none; user-select: none; }
.iscr-sezione--a .iscr-sezione__watermark { color: var(--oxblood); opacity: .07; }
.iscr-sezione--b .iscr-sezione__watermark { color: var(--gold); opacity: .12; }
.iscr-sezione .prose { position: relative; font-size: 1.06rem; }
.iscr-sezione .prose p:first-child strong:first-child { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: .01em; }
.iscr-sezione--a .prose p:first-child strong:first-child { color: var(--oxblood); }
.iscr-sezione--b .prose p:first-child strong:first-child { color: #9a6c1f; }

/* Full institution name on a single line, brand never compresses */
.brand { flex-shrink: 0; }
.brand__name { white-space: nowrap; }
/* Member bio clamp + expand (keeps cards tidy when a bio is very long) */
.dept-grid { align-items: start; }
.dept-card__bio { position: relative; max-height: 15em; overflow: hidden; transition: max-height .35s ease; }
.dept-card__bio.is-open { max-height: 6000px; }
.dept-card__bio:not(.is-open)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3.2em; background: linear-gradient(rgba(251,248,241,0), var(--surface)); pointer-events: none; }
.dept-card__more { margin-top: 14px; display: inline-flex; align-items: center; gap: .4rem; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font-sans); font-weight: 600; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--oxblood); }
.dept-card__more svg { width: 15px; height: 15px; transition: transform .25s ease; }
.dept-card__more[aria-expanded="true"] svg { transform: rotate(90deg); }
/* Member profile: dedicated page layout + clickable list cards */
.dept-card--link { cursor: pointer; text-decoration: none; display: flex; flex-direction: column; }
.dept-card--link .dept-card__body h2 { color: var(--ink); }
.dept-card--link .dept-card__body p { color: var(--muted); }
.dept-card__cta { margin-top: 16px; }
.member-back { margin-bottom: 22px; }
.member-detail { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; align-items: start; }
.member-detail__media { margin: 0; }
.member-detail__media img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--rule); box-shadow: var(--shadow-sm); }
@media (max-width: 780px) { .member-detail { grid-template-columns: 1fr; gap: 26px; } .member-detail__media { max-width: 300px; } }
/* Member profile back-link on its own line above the role eyebrow */
.member-back-wrap { margin: 0 0 18px; }
.member-back { margin-bottom: 0; }

/* --- Mobile masthead fix: institution name wraps instead of overflowing off-screen --- */
@media (max-width: 940px) {
    .brand { flex-shrink: 1; min-width: 0; }
    .brand__name { white-space: normal; overflow-wrap: anywhere; max-width: none; }
    .navbar { height: auto; min-height: 76px; padding-block: 10px; }
}
@media (max-width: 560px) {
    .navbar { gap: 12px; }
    .brand { gap: 12px; }
    .brand__logo { width: 46px; height: 46px; }
    .brand__name { font-size: 1.12rem; line-height: 1.1; }
}
