:root {
  --blue: #0675ad;
  --blue-dark: #16499a;
  --text: #343434;
  --rule: #a7a7a7;
  --page-gutter: clamp(1rem, 3vw, 3.25rem);
}

@font-face {
  font-family: "Titillium Web";
  src: url("fonts/TitilliumWeb-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Titillium Web";
  src: url("fonts/TitilliumWeb-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Titillium Web";
  src: url("fonts/TitilliumWeb-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: "Titillium Web", sans-serif;
  font-size: 1rem;
  line-height: 1.35;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  transform: translateY(-150%);
  color: #fff;
  background: #111;
  font-weight: 700;
}

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

.page-shell {
  width: min(100%, 1450px);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.site-header {
  padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(1.35rem, 3vw, 2.75rem);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.portal-logo {
  width: min(100%, 410px);
  height: auto;
}

.region-logo {
  width: clamp(6rem, 9vw, 9rem);
  height: auto;
  margin: 0 1.3rem 0 0;
  flex: 0 0 auto;
  object-fit: contain;
}

.section-title {
  margin: 0;
  padding: 0.55rem 1.25rem 0.62rem;
  color: #fff;
  background: var(--blue);
  font-size: clamp(1.18rem, 1.55vw, 1.48rem);
  font-weight: 700;
  line-height: 1.2;
}

.programme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.7vw, 1.4rem);
  margin-top: 0.5rem;
}

.programme-card {
  --accent: var(--blue-dark);
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 390px;
  flex-direction: column;
  padding: clamp(1rem, 1.6vw, 1.55rem);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

a.programme-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.8rem 1.4rem rgb(30 55 75 / 16%);
}

.programme-card--coesione {
  --accent: #2755a2;
  background: #c6d0e4;
}

.programme-card--csr {
  --accent: #447f18;
  background: #d7ebc5;
}

.programme-card--feampa {
  --accent: #157fae;
  background: #c7e9f6;
}

.programme-card--fsc {
  --accent: #f49200;
  background: #ffe1ad;
}

.programme-logo {
  display: flex;
  width: 100%;
  height: 118px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 0.7rem;
  background: #fff;
}

.programme-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.programme-logo--coesione {
  justify-content: flex-start;
  padding: 0;
  background: transparent;
}

.programme-logo--coesione img {
  width: 78%;
  object-position: left center;
}

.programme-logo--csr {
  background: #fff;
}

.programme-logo--fsc {
  padding-inline: 0;
  background: transparent;
}

.programme-name {
  display: block;
  margin-bottom: 1.25rem;
  font-size: clamp(1.08rem, 1.25vw, 1.3rem);
  font-weight: 700;
  line-height: 1.27;
}

.programme-topics {
  display: block;
  margin-bottom: 1.35rem;
  font-size: clamp(0.95rem, 1.05vw, 1.08rem);
  line-height: 1.32;
}

.programme-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.programme-stats span {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  padding: 0.5rem 0.72rem;
  color: #fff;
  background: var(--accent);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.1;
}

.cooperation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: clamp(2.2rem, 4vw, 3.4rem);
}

.section-title--secondary {
  min-height: 3rem;
  font-size: clamp(1.06rem, 1.35vw, 1.32rem);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.55rem;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(88px, 45%) 1fr;
  align-items: end;
  gap: 0.9rem;
  min-height: 82px;
  padding: 0.7rem 0.75rem 0.6rem;
  border: 1px solid #d6dde2;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.project-card:hover {
  border-color: var(--blue);
  background: #f5fbfe;
}

.project-card img {
  width: 100%;
  height: 46px;
  object-fit: contain;
  object-position: left center;
}

.project-card > span {
  border-bottom: 1px solid var(--rule);
  font-size: 1.13rem;
  font-weight: 700;
}

.closed-projects {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.55rem;
}

.closed-projects a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-block: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.closed-projects strong {
  font-size: 1.08rem;
  line-height: 1.1;
}

.closed-projects span {
  font-size: 0.92rem;
  line-height: 1.2;
}

.closed-projects a:hover,
.closed-projects a:focus-visible,
.link-list a:hover,
.link-list a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--blue);
}

.resources-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.28fr 1.22fr;
  gap: 1.4rem;
  margin-top: clamp(2rem, 3.5vw, 3rem);
  margin-bottom: clamp(2rem, 3.5vw, 3rem);
}

.section-title--tertiary {
  padding-block: 0.55rem;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
}

.link-list {
  display: grid;
  align-items: start;
  gap: 0.8rem 1.6rem;
  margin-top: 0.7rem;
  padding-inline: 0.65rem;
}

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

.link-list a,
.item-unavailable {
  width: fit-content;
  max-width: 100%;
  padding-bottom: 0.12rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.98rem;
  line-height: 1.25;
  text-decoration: none;
}

.item-unavailable {
  color: #666;
  border-bottom-style: dashed;
  cursor: not-allowed;
}

.site-footer {
  background: #eee;
}

.footer-inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(1rem, 2vw, 2rem);
  padding-block: 1rem;
}

.footer-banner {
  width: min(34vw, 470px);
  height: auto;
  flex: 0 1 470px;
}

.footer-links {
  display: flex;
  flex: 1 1 390px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
}

.footer-links a {
  text-decoration: none;
}

.footer-inner p {
  margin: 0 0 0 auto;
  white-space: nowrap;
}

a:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .programme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .programme-card {
    min-height: 410px;
  }

  .cooperation-grid,
  .resources-grid {
    grid-template-columns: 1fr;
  }

  .section-title--secondary {
    min-height: auto;
  }

  .closed-projects {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
  }
}

@media (max-width: 700px) {
  :root {
    --page-gutter: 1rem;
  }

  .site-header {
    padding-block: 1.35rem;
  }

  .header-inner {
    align-items: flex-start;
    gap: 1rem;
  }

  .portal-logo {
    width: min(75%, 360px);
  }

  .region-logo {
    width: clamp(5.25rem, 22vw, 7rem);
    margin-right: 0;
  }

  .section-title {
    padding: 0.7rem 0.9rem;
  }

  .programme-grid,
  .project-grid,
  .link-list--columns {
    grid-template-columns: 1fr;
  }

  .programme-card {
    min-height: 0;
  }

  .programme-logo {
    height: 108px;
  }

  .programme-stats {
    margin-top: 0.5rem;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }

  .footer-inner p {
    margin: 0;
  }

  .footer-banner {
    width: 100%;
    max-width: 520px;
    flex: none;
  }
}

@media (max-width: 420px) {
  .portal-logo {
    width: min(72%, 300px);
  }

  .closed-projects {
    grid-template-columns: 1fr;
  }
}

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

  * {
    transition: none !important;
  }
}
