:root {
  --page-bg: #EFEFEF;
  --page-bg-primary: #F0F4F9;
  --surface: #ffffff;
  --muted-surface: #EFEFEF;
  --text-primary: #1a1c1a;
  --text-secondary: #494c4e;
  --accent: #1d6e8b;
  --accent-strong: #0f3746;
  --accent-light: #58747cf8;
  --link-visited: #5b3f82;
  --border-color: rgba(6, 64, 54, 0.15);
  --hero-overlay: rgba(5, 23, 20, 0.6);
  --font-heading: "Space Grotesk", "Source Sans 3", sans-serif;
  --font-body: "Source Sans 3", "Space Grotesk", sans-serif;
}

html {
  font-size: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--page-bg-primary);
  line-height: 1.65;

}

.content-wrapper {
  flex: 1;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 6vw, 5rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

a:visited {
  color: var(--link-visited);
}

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 3px solid rgba(13, 107, 92, 0.35);
  outline-offset: 3px;
}

button:focus-visible,
.navbar-toggler:focus-visible {
  outline: 3px solid rgba(13, 107, 92, 0.35);
  outline-offset: 3px;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(245, 243, 239, 0.95);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: top 0.2s ease;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
  color: #ffffff;
}

.site-navbar {
  background: #F0F4F9;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.8px solid var(--glass-border);
  box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.15);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.site-navbar-container {
  padding: 0 clamp(1rem, 5vw, 3rem);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.navbar-logo {
  max-height: 48px;
}

.navbar-toggler {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
}

.navbar-toggler-icon {
  filter: invert(18%) sepia(7%) saturate(692%) hue-rotate(108deg) brightness(90%) contrast(86%);
}

.site-navbar-menu {
  gap: 0.75rem;
}

.site-nav-link {
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--text-primary);
  text-decoration-color: rgba(6, 64, 54, 0.35);
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav-link:visited {
  color: var(--link-visited);
}

.site-nav-link:hover,
.site-nav-link:focus-visible,
.nav-link.active {
  color: var(--accent);
  text-decoration-color: currentColor;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  background: none;
}

.dropdown-menu.site-dropdown {
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 0.5rem;
  box-shadow: 0 25px 60px rgba(6, 64, 54, 0.15);
  background: var(--surface);
}

.dropdown-menu.site-dropdown .dropdown-item {
  border-radius: 0.75rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  text-underline-offset: 0.18em;
}

.dropdown-menu.site-dropdown .dropdown-item:visited {
  color: var(--link-visited);
}

.dropdown-menu.site-dropdown .dropdown-item:hover,
.dropdown-menu.site-dropdown .dropdown-item:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  background: none;
}

.current-page {
  color: var(--accent);
  font-weight: 700;
  cursor: default;
}

.current-page:hover {
  text-decoration: none;
}

.dropdown-toggle.current-page:hover {
  text-decoration: underline;
}

.dropdown-toggle.current-page {
  pointer-events: auto;
  cursor: pointer;
}

.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.breadcrumb li {
  display: inline;
}

.breadcrumb li:not(:last-child)::after {
  content: " / ";
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  text-decoration: underline;
}

.hero {
  position: relative;
  background-image: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url("../images/Piazza-Miracoli-Pisa.jpg");
  background-size: cover;
  background-position: center;
  color: #ffffff;
  padding: clamp(4rem, 10vw, 6rem) clamp(1.5rem, 6vw, 4rem);
  display: flex;
  align-items: flex-end;
  min-height: 65vh;
}

.hero-content {
  max-width: 1200px;
  margin-bottom: 11rem;
}

.hero-logo {
  width: min(250px, 40vw);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: #ffffff;
}

.hero-meta {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: black;
  background-color: white;
  width: fit-content;
  padding: 1rem;
}

.sections-row {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
}

.sections-row .content-section {
  flex: 1;
  min-width: 300px;
}

@media (min-width: 800px) {
  .sections-row .content-section:first-child {
    flex: 0.6;
  }
}

.content-section {
  background: var(--surface);
  border-radius: 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 20px 60px rgba(6, 64, 54, 0.06);
}

.content-section h2 {
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-body {
  margin-top: 1rem;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
}

.dates-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 320px;
}

.dates-table caption {
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-align: left;
  padding-left: 0.5em;
}

.dates-table th,
.dates-table td {
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  padding: 0.9rem 0.5rem 0.9rem 0.5em;
}

.dates-table th {
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: var(--accent-light);
  color: #ffffff;
}

.dates-table th[scope="row"] {
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: none;
  background-color: transparent;
  color: inherit;
}

.dates-table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);
}

.dates-table tbody tr:hover {
  background-color: rgba(29, 110, 139, 0.1);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-list li {
  font-weight: 600;
  color: var(--text-primary);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  align-items: center;
}

.logo-card {
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-card img {
  max-height: 150px;
  width: auto;
  object-fit: contain;
}

.site-footer {
  background: #0b0d0c;
  color: #e3e1db;
  margin-top: auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 6vw, 5rem);
}

.site-footer a {
  color: #e3e1db;
}

.footer-inner {
  display: grid;
  gap: 3rem;
  margin: 0 auto;
  max-width: 1200px;
}

.footer-block h2 {
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: #e3e1db;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-block p,
.footer-block address {
  color: #c7c4bc;
  margin: 0.5rem 0 0;
  font-style: normal;
}

.footer-meta {
  margin-top: 2rem;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #c7c4bc;
}

.footer-meta p {
  margin: 0.5rem 0;
  color: #c7c4bc;
  text-align: center;
}

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

@media (min-width: 768px) {
  .site-navbar-container {
    padding: 0 clamp(2rem, 6vw, 5rem);
  }

  .site-navbar-menu {
    gap: 1.25rem;
  }

  .site-nav-link {
    padding: 0.85rem 1.25rem;
    font-size: 1.05rem;
  }

  .hero {
    border-radius: 0 0 32px 32px;
  }

  .content-wrapper {
    margin-top: -2rem;
  }

  .footer-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

  /* internal pages  */
  .page-title { 
    font-family: var(--font-heading); 
    font-size: 2.5em; 
    color: var(--accent);
    text-align: center; 
  }
  .accent-divider { 
    height: 6px; 
    background: var(--accent); 
    width: 40%; 
    border-radius: 999px; 
    margin: 0.75rem 0 1.25rem; 
  }

  .role-group { 
    margin-bottom: 2rem; 
  }
  
  .role-group h3 { font-size: 1.05rem; 
    margin: 0 0 0.5rem; 
    text-transform: uppercase; 
    letter-spacing: 0.06em; 
    color: var(--accent-strong); 
    font-weight: bold;
  }

  .name-grid { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 1rem; 
  }

  .name-list { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
  }

  .name-list li,
  .name-grid li { 
    background: var(--muted-surface); 
    padding: 0.9rem 1rem; 
    border-radius: 0.75rem; 
  }

  .person-name { 
    font-weight: 700; 
    margin: 0 0 0.25rem; 
    color: var(--accent);
  }

  .person-affil { margin: 0; 
    color: var(--accent-strong); 
    font-size: 0.95rem; 
  }

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

@media (min-width: 989px) and (max-width: 1350px) {
  .navbar-brand {
    font-size: 1.2rem;
  }

  .site-nav-link {
    font-size: 0.9rem;
  }
}


.empty_section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2em 1em;
  text-align: center;
  max-width: 800px;
  margin: 20px auto;
  border: 2px dashed #cbd5e1; 
  border-radius: 16px;
  background-color: #f8fafc;
  opacity: 0.8;
} 

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
