:root {
  --navy: #163145;
  --navy-deep: #0d2434;
  --navy-light: #1b415d;
  --blue: #0f5385;
  --sky: #e7eff3;
  --orange: #d93c24;
  --orange-dark: #b8331f;
  --ink: #15191e;
  --muted: #556677;
  --line: #d9e1e6;
  --paper: #ffffff;
  --surface: #f6f8f9;
  --radius: 3px;
  --shadow: 0 12px 30px rgba(13, 36, 52, 0.1);
  --container: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--orange-dark);
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: #fff;
  background: var(--orange);
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-header {
  position: relative;
  z-index: 2;
  min-height: 116px;
  color: #fff;
  background: var(--navy);
  border-bottom: 6px solid var(--orange);
}

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

.brand img {
  width: min(340px, 55vw);
  height: auto;
}

.initiative-mark {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.initiative-mark__eyebrow {
  color: #b9cad5;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.initiative-mark__name {
  margin-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  letter-spacing: 0.02em;
}

.page-heading {
  position: relative;
  min-height: 300px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: var(--navy-deep);
}

.page-heading__image,
.page-heading__overlay {
  position: absolute;
  inset: 0;
}

.page-heading__image {
  background-image: url("assets/images/sede-centrale-unina.jpg");
  background-position: center 47%;
  background-size: cover;
}

.page-heading__overlay {
  background:
    linear-gradient(90deg, rgba(13, 36, 52, 0.97) 0%, rgba(13, 36, 52, 0.83) 48%, rgba(13, 36, 52, 0.35) 100%),
    linear-gradient(0deg, rgba(13, 36, 52, 0.6), transparent 60%);
}

.page-heading__content {
  position: relative;
  z-index: 1;
  padding-block: 55px 48px;
}

.page-heading__kicker,
.section-heading__eyebrow,
.contact-card__eyebrow {
  margin: 0 0 10px;
  color: #f4aa9e;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-heading h1 {
  max-width: 950px;
  margin: 0;
  font-size: clamp(2rem, 4.7vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(46px, 6vw, 82px);
  align-items: start;
  padding-block: 68px 96px;
}

.main-content {
  min-width: 0;
}

.intro {
  max-width: 900px;
  font-size: 1.05rem;
}

.intro p {
  margin: 0 0 1.45em;
}

.intro p:first-child {
  font-size: 1.24rem;
  line-height: 1.55;
}

.resources {
  margin-top: 68px;
}

.section-heading {
  margin-bottom: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.section-heading__eyebrow {
  color: var(--orange);
}

.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 350;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.section-heading > p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 22px;
}

.resource-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.resource-card:hover {
  color: var(--navy);
  border-color: #a9bbc7;
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.resource-card:focus-visible {
  outline: 4px solid rgba(217, 60, 36, 0.35);
  outline-offset: 3px;
}

.resource-card figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #0751a2;
  aspect-ratio: 360 / 250;
}

.resource-card figure::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.resource-card:hover figure::after {
  transform: scaleX(1);
}

.resource-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.resource-card:hover img {
  transform: scale(1.025);
}

.resource-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 20px 18px;
}

.resource-card h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.35;
}

.resource-card__action {
  margin-top: auto;
  padding-top: 18px;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.resource-card__action span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.resource-card:hover .resource-card__action span {
  transform: translate(2px, -2px);
}

.contact-card {
  position: sticky;
  top: 30px;
  padding: 28px;
  color: var(--navy);
  background: var(--surface);
  border-top: 5px solid var(--orange);
  box-shadow: 0 1px 0 var(--line);
}

.contact-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  color: #fff;
  background: var(--navy-light);
  border-radius: 50%;
}

.contact-card__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.contact-card__eyebrow {
  color: var(--orange);
  letter-spacing: 0.11em;
}

.contact-card h2 {
  margin: 0 0 14px;
  font-size: 1.75rem;
  font-weight: 450;
}

.contact-card > p:not(.contact-card__eyebrow) {
  margin: 0 0 24px;
  color: #3f4c5a;
  font-size: 0.94rem;
}

.contact-card dl,
.contact-card dl div,
.contact-card dd {
  margin: 0;
}

.contact-card dl div {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.contact-card dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-card dd {
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.site-footer {
  position: relative;
  z-index: 1;
  color: #fff;
  background-color: var(--navy-deep);
  background-image: url("assets/images/footer-bg-unina.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-top: 0;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #031927;
  opacity: 0.96;
}

.site-footer > .container {
  position: relative;
  padding-block: 48px 28px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px;
}

.footer-column {
  min-width: 0;
}

.footer-heading {
  min-height: 24px;
  margin: 0 0 24px;
  color: #fff;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.45;
}

.footer-heading a,
.footer-column a,
.footer-address a {
  color: #fff;
  text-decoration: none;
}

.footer-heading a:hover,
.footer-heading a:focus,
.footer-column a:hover,
.footer-column a:focus,
.footer-address a:hover,
.footer-address a:focus {
  color: #fff;
  text-decoration: underline;
}

.footer-heading--continuation {
  font-weight: 400;
  letter-spacing: -0.06em;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.footer-column li a {
  font-size: 0.875rem;
}

.footer-privacy {
  margin-top: 34px;
  padding-block: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.36);
  border-bottom: 1px solid rgba(255, 255, 255, 0.36);
}

.footer-privacy h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
}

.footer-privacy p,
.footer-address {
  margin: 0;
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-address {
  padding-block: 24px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-top: 4px;
}

.footer-bottom > img {
  width: 165px;
  height: auto;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-links a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--orange);
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease;
}

.social-links a:hover,
.social-links a:focus {
  color: #fff;
  background: var(--orange-dark);
  transform: translateY(-2px);
}

.social-links svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.back-to-top {
  position: absolute;
  top: -29px;
  right: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--orange);
  border: 3px solid #fff;
  border-radius: 50%;
  font-size: 1.45rem;
  line-height: 1;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.back-to-top:hover {
  color: #fff;
  background: var(--orange-dark);
  transform: translateY(-3px);
}

@media (max-width: 1050px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 40px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 54px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 30px), var(--container));
  }

  .site-header,
  .header-inner {
    min-height: 92px;
  }

  .brand img {
    width: min(270px, 67vw);
  }

  .initiative-mark__eyebrow {
    display: none;
  }

  .initiative-mark__name {
    font-size: 1rem;
  }

  .page-heading {
    min-height: 265px;
  }

  .page-heading__overlay {
    background: rgba(13, 36, 52, 0.82);
  }

  .page-heading__content {
    padding-block: 48px 40px;
  }

  .page-layout {
    grid-template-columns: 1fr;
    padding-block: 50px 74px;
  }

  .contact-card {
    position: static;
  }

  .resources {
    margin-top: 54px;
  }

  .site-footer > .container {
    padding-top: 42px;
  }
}

@media (max-width: 520px) {
  .initiative-mark {
    display: none;
  }

  .brand img {
    width: min(285px, 83vw);
  }

  .page-heading h1 {
    font-size: clamp(1.9rem, 9.5vw, 2.6rem);
  }

  .intro,
  .intro p:first-child {
    font-size: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .resource-card__body {
    min-height: auto;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer-column--continuation {
    margin-top: -18px;
  }

  .footer-heading--continuation {
    min-height: 0;
    margin-bottom: 18px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .back-to-top {
    right: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .skip-link,
  .back-to-top,
  .resource-card__action {
    display: none;
  }

  .site-header,
  .site-footer,
  .page-heading {
    color: #000;
    background: #fff;
    border-color: #000;
  }

  .page-heading {
    min-height: auto;
  }

  .page-heading__image,
  .page-heading__overlay {
    display: none;
  }

  .page-layout {
    display: block;
    padding-block: 30px;
  }

  .contact-card {
    margin-top: 30px;
    box-shadow: none;
  }

  .resource-card {
    break-inside: avoid;
  }
}
