/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
@font-face {
  font-family: "Byzantine Normal";
  src: url("./fonts/BYZANTIN.TTF") format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
    --default-font: "Open Sans", sans-serif;
    --heading-font: "Byzantine Normal", serif; /* Epigrafe romana */
    --background-color: #f6eddc;
    --default-color: #212529;
    --heading-color: #5c4033;
    --accent-color: #8b5a2b;
    --surface-color: #f6eddc;
    --contrast-color: #ffffff;
  }
  
  body {
    font-family: var(--default-font);
    color: var(--default-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
  }

  body.no-scroll {
    overflow: hidden;
  }
  
  a {
    color: var(--accent-color);
    text-decoration: none;
  }
  
  a:hover {
    color: #6d4a2a;
    text-decoration: none;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--heading-color);
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  /* ---------------------------
     NEW: Inline entity helpers
     --------------------------- */
  .person-name, .pers {
    font-weight: 700;
    color: #6d4a2a; /* warm brown for persons */
  }

  .place-name, .place {
    font-weight: 700;
    color: #5a5a5a; /* neutral/darker for places */
  }

  .term-concept, .term {
    background-color: #fff3cd; /* light yellow highlight */
    color: #856404;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #ffeaa7;
    font-weight: 600;
    font-size: 0.96em;
    vertical-align: baseline;
  }

  .term:hover, .term-concept:hover {
    background-color: #ffeaa7;
    cursor: help;
  }

  /* Center RDF visualization image and caption */
  .rdf-visualization {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }



  /* ---------------------------
     NEW: idea-text and item-text
     --------------------------- */
  /* Global utility for slightly larger, justified blocks used in IDEA and ITEMS */
  .idea-text,
  .item-text {
    font-size: 1.08rem;           /* slightly larger than body */
    line-height: 1.75;
    text-align: justify;
    color: var(--default-color);
    margin-bottom: 1rem;
  }

  /* Make sure paragraphs inside obey the same spacing */
  .idea-text p,
  .item-text p {
    margin: 0 0 1rem 0;
  }

  /* Slightly smaller on mobile to keep readability */
  @media (max-width: 768px) {
    .idea-text,
    .item-text {
      font-size: 1rem;
      line-height: 1.6;
      text-align: justify;
    }
  }
  
  /*--------------------------------------------------------------
  # Header
  --------------------------------------------------------------*/
  .header {
    transition: all 0.5s;
    padding: 20px 0;
    background-color: #f6eddc;
    box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
  }

  /* Replacement for bootstrap container in header */
  .header-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0;
    padding: 0 12px 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }
  
  .header .logo h1 {
    font-size: 30px;
    margin: 0;
    font-weight: 800;
    font-family: "Byzantine Normal", serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-left: 0; /* adjusted because header-inner handles spacing */
  }

  /* make the .logo element a flex container to align icon/text if needed */
  .logo {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  /*--------------------------------------------------------------
  # Navigation Menu
  --------------------------------------------------------------*/
  .navmenu ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    gap: 6px;
    align-items: center;
  }
  
  .navmenu a {
    padding: 10px 15px;
    font-family: "Cinzel", serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 16px;
    font-weight: 600;
    color: var(--default-color);
    transition: 0.3s;
  }
  
  .navmenu a:hover, 
  .navmenu .active {
    color: var(--accent-color);
  }
  
  /* Visual small-screen menu control (kept simple) */
  .nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
  }
  
  /*--------------------------------------------------------------
  # Sections
  --------------------------------------------------------------*/
  section {
    padding: 120px 0;
    overflow: hidden;
  }
  
  .section-bg {
    background-color: var(--surface-color);
  }
  
  .section-title {
    text-align: center;
    padding-bottom: 30px;
  }
  
  .section-title h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: "Cinzel", serif;
  }
  
  .section-title h2::after {
    content: '';
    position: absolute;
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    bottom: -10px;
    left: calc(50% - 25px);
  }
  
  /* Container principale */
  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
  }
  
/*--------------------------------------------------------------
# Home Section
--------------------------------------------------------------*/
.home {
    width: 100%;
    min-height: 100vh;
    background:
      linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)),
      url("../img/sanvitalemosaics.jpg") center 30%/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 120px 0 80px;
  }
  
  .home-content {
    max-width: 1200px;
    padding: 0 20px;
  }
  
  .home-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
  }
  
  .home-title-line {
    display: block;
    font-family: "Byzantine Normal", serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    color: #ffffff;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 auto;
  }
  
  .home-subtitle {
    font-size: 1.25rem;
    color: #ffffff;
    max-width: 760px;
    margin: 0 auto 40px;
    line-height: 1.7;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    backdrop-filter: blur(0.5px);
  }
  
  .home-btn {
    display: inline-block;
    background-color: #8b5a2b; /* bronzo */
    color: white;
    font-family: "Cinzel", serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 35px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
  }
  
  .home-btn:hover {
    background-color: #c08a50; /* bronzo più chiaro */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }
  
  .home-btn:active {
    background-color: #a66d3b; /* leggermente più scuro */
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  }
  
  .home-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(201,160,102,0.35), 0 8px 22px rgba(0,0,0,0.28);
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .home {
      padding: 100px 0 60px;
    }
  
    .home-title-line {
      font-size: clamp(2rem, 6vw, 3rem);
      letter-spacing: 0.06em;
    }
  
    .home-subtitle {
      font-size: 1.1rem;
      padding: 0 16px;
    }
  
    .home-btn {
      font-size: 1.05rem;
      padding: 14px 34px;
    }

    .nav-toggle {
      display: inline-block;
    }
  }
  
/* ===== Bilingual Quotes Grid ===== */
.quotes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 30px auto;
  max-width: 1200px;
  padding: 0 15px;
}

.quote-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  border-left: 4px solid var(--accent-color);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  padding: 22px 22px 16px 22px;
}

.quote-card blockquote {
  margin: 0;
  font-style: italic;
  line-height: 1.8;
  color: var(--default-color);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.quote-card figcaption {
  margin-top: 14px;
  font-size: 0.95rem;
  color: #6c757d;
  font-style: italic;
}

.quote-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(139, 90, 43, 0.12); /* var(--accent-color) attenuato */
  color: var(--accent-color);
  border: 1px solid rgba(139, 90, 43, 0.35);
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Responsive: su mobile impila le citazioni */
@media (max-width: 768px) {
  .quotes-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/*--------------------------------------------------------------
# Study of the Domain
--------------------------------------------------------------*/
.study-domain {
  padding: 120px 0;
  background-color: var(--surface-color);
}

.domain-subsection {
  margin: 50px 0 30px;
  position: relative;
}

.domain-subsection h3 {
  color: var(--accent-color);
  font-size: 2rem;
  margin-bottom: 25px;
  position: relative;
  font-family: "Cinzel", serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.domain-subsection h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
}

  /*--------------------------------------------------------------
  # Items Section
  --------------------------------------------------------------*/
  .items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
  }
  
  .item-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(139, 90, 43, 0.1);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid rgba(139, 90, 43, 0.15);
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #c0a080);
  }
  
  .item-img-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
  }

  .item-img-trigger {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
  }

  .item-img-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 10000;
  }

  .item-img-modal.is-open {
    opacity: 1;
    visibility: visible;
  }

  .item-img-modal__content {
    max-width: min(90vw, 1100px);
    max-height: 85vh;
    position: relative;
  }

  .item-img-modal__img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    display: block;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }

  .item-img-modal__close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: #ffffff;
    color: #222;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  }
  
  .item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
  }
  
  .item-card.book-item .item-img {
    object-fit: contain;
    padding: 15px;
    background: white;
  }
  
  .item-card.film-item .item-img-container{
  height: 320px;             
  background: #000;          
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;            
  overflow: hidden;
}


.item-card.film-item .item-img{
  width: auto;               
  height: 100%;              
  max-width: 100%;
  object-fit: contain;       
  object-position: center top; 
  background: transparent;
}

  .item-card.book-item .item-img-container {
    background: #f8f4e8;
  }

  .diptych-item .item-img {
    object-fit: cover;          
    object-position: 50% 30%; 
  }

  .item-content {
    padding: 20px;
    background: linear-gradient(to bottom, #fff 0%, #faf6f2 100%);
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .item-content h4 {
    color: var(--heading-color);
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 600;
  }
  
  .item-content p {
    color: var(--default-color);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 18px;
  }
  
  .item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
    font-size: 0.9rem;
  }
  
  .item-meta span {
    display: inline-flex;
    align-items: center;
    background: rgba(139, 90, 43, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
  }

  /* remove the small icon inside .item-meta spans (if present as pseudo or inline),
     prefer the plain label look — user requested to remove the "symbolino" */
  .item-meta span i {
    display: none; /* hide the small icon element (bootstrap icon tag) */
    margin-right: 0;
  }
  
  .item-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
  }
  
  .item-link::after {
    content: '→';
    margin-left: 6px;
    transition: transform 0.3s ease;
  }
  
  .item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(139, 90, 43, 0.15);
  }
  
  .item-card:hover .item-img {
    transform: scale(1.05);
  }
  
  .item-card:hover .item-link {
    color: #6d4a2a;
  }
  
  .item-card:hover .item-link::after {
    transform: translateX(4px);
  }
  
  @keyframes cardEntrance {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .item-card {
    animation: cardEntrance 0.6s ease-out forwards;
    opacity: 0;
  }
  
  .item-card:nth-child(1) { animation-delay: 0.1s; }
  .item-card:nth-child(2) { animation-delay: 0.2s; }
  .item-card:nth-child(3) { animation-delay: 0.3s; }
  .item-card:nth-child(4) { animation-delay: 0.4s; }
  .item-card:nth-child(5) { animation-delay: 0.5s; }
  .item-card:nth-child(6) { animation-delay: 0.6s; }
  .item-card:nth-child(7) { animation-delay: 0.7s; }
  .item-card:nth-child(8) { animation-delay: 0.8s; }
  .item-card:nth-child(9) { animation-delay: 0.9s; }
  .item-card:nth-child(10) { animation-delay: 1s; }
  
  /*--------------------------------------------------------------
  # Knowledge Organization & Representation Sections
  --------------------------------------------------------------*/
  .knowledge-organization {
    padding: 120px 0;
    background-color: var(--surface-color);
  }
  
  .knowledge-representation {
    padding: 80px 0;
    background-color: var(--background-color);
  }
  
  .knowledge-representation .section-title {
    margin-top: 40px;
  }
  
  
  .knowledge-representation .domain-subsection {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin: 50px 0;
    border-left: 4px solid var(--accent-color);
  }

  .knowledge-representation .domain-subsection.csv-box {
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .knowledge-representation .domain-subsection:first-child {
    margin-top: 30px;
  }
  
  .knowledge-representation .domain-subsection h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
    font-family: var(--heading-font);
  }
  
  .knowledge-representation .domain-subsection .idea-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--default-color);
  }
  
  .knowledge-representation .domain-subsection .rdf-content {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    margin-top: 20px;
  }
  
  .knowledge-representation .domain-subsection .embed-container {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #eaeaea;
    margin: 20px 0;
  }
  
  /*--------------------------------------------------------------
  # Metadata Analysis Table
  --------------------------------------------------------------*/
  .metadata-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    table-layout: fixed; /* mantiene layout stabile su desktop */
    border: 1px solid #ededed;
  }
  
  .metadata-table th {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    padding: 12px 15px;
    text-align: center;      /* <-- intestazioni centrate */
    vertical-align: middle;  /* centra verticalmente il contenuto della th */
    font-family: var(--heading-font);
    white-space: normal;     /* permette il wrap dei titoli */
    word-break: break-word;
    line-height: 1.2;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
  }
  
  .metadata-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ededed;
    border-right: 1px solid #ededed;
    vertical-align: top;
    line-height: 1.4;
    white-space: normal;          /* consentiamo il wrapping nel corpo */
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: left;             /* mantiene il corpo a sinistra */
  }
  
  /* Larghezze aggiornate:
     Item | Object Type | Provider | Provided Metadata | Converted Metadata
  */
  .metadata-table th:nth-child(1),
  .metadata-table td:nth-child(1) {
    width: 24%;
    min-width: 170px;
  }
  
  .metadata-table th:nth-child(2),
  .metadata-table td:nth-child(2) {
    width: 26%;
    min-width: 160px;
  }
  
  .metadata-table th:nth-child(3),
  .metadata-table td:nth-child(3) {
    width: 24%;
    min-width: 160px;
  }
  
  .metadata-table th:nth-child(4),
  .metadata-table td:nth-child(4) {
    width: 16%;
    min-width: 120px;
  }
  
  .metadata-table th:nth-child(5),
  .metadata-table td:nth-child(5) {
    width: 10%;
    min-width: 120px;
  }
  
  /* righe uniformi */
  .metadata-table tbody tr {
    background-color: #ffffff;
  }
  
  /* evidenziazione titolo dell'item */
  .metadata-table td:nth-child(1) strong {
    color: var(--heading-color);
    font-weight: 700;
  }
  
  /* Responsive: su schermi stretti rendi la tabella scrollabile orizzontalmente.
     Inoltre imposta table-layout: auto per miglior wrapping quando scrollabile. */
  @media (max-width: 992px) {
    .metadata-table {
      font-size: 0.85rem;
    }
    .metadata-table th,
    .metadata-table td {
      padding: 10px 12px;
    }
  }
  
  @media (max-width: 768px) {
    .table-responsive {
      overflow-x: auto;
      border: 1px solid #eaeaea;
      border-radius: 6px;
    }
  
    .metadata-table {
      min-width: 900px;   /* forza scroll orizzontale ma evita colonne troppo stretti */
      table-layout: auto; /* più flessibile quando si scrolla */
    }
  
    /* sui piccoli schermi non troncare più alcuna colonna */
    .metadata-table td,
    .metadata-table th {
      white-space: normal;
      overflow: visible;
      text-overflow: clip;
    }
  }
  
  /*--------------------------------------------------------------
  # CSV Files Section - 
  --------------------------------------------------------------*/
  .csv-files-section {
    margin: 20px 0;
  }
  
  .csv-selector {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0 10px;
  }
  
  .csv-item {
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    padding: 5px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .csv-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(139, 90, 43, 0.2);
  }
  
  .csv-item.active {
    background-color: var(--accent-color);
    color: white;
  }
  
  .csv-item i {
    font-size: 1.1rem;
    margin-bottom: 3px;
  }
  
  .csv-item span {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: 0.65rem;
  }
  
  .csv-table {
    display: none;
    animation: fadeIn 0.3s ease-out;
    margin: 30px auto; /* Centrato orizzontalmente */
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 90, 43, 0.1);
    width: 95%; /* Larghezza ridotta con margini laterali */
    max-width: 1200px; /* Larghezza massima */
    box-sizing: border-box;
  }
  
  .csv-table.active {
    display: block;
  }
  
  .csv-table h4 {
    color: var(--accent-color);
    font-size: 1.4rem;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
    font-family: var(--heading-font);
    text-align: center;
  }
  
  
  .csv-table .table-responsive {
    overflow-x: auto;
    width: 100%;
    margin: 0 auto; /* Centrato */
    border-radius: 6px;
    border: 1px solid rgba(139, 90, 43, 0.1);
  }
  
  .csv-table .table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-bottom: 0;
    table-layout: auto;
  }
  
  .csv-table .table th {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    font-family: var(--heading-font);
    position: sticky;
    top: 0;
    white-space: nowrap;
  }
  
  .csv-table .table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eaeaea;
    vertical-align: top;
    line-height: 1.5;
    word-wrap: break-word;
  }
  
  .csv-table .table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
  }
  
  .csv-table .table tbody tr:hover {
    background-color: rgba(139, 90, 43, 0.05);
  }
  
  .csv-table .table td a {
    color: var(--accent-color);
    text-decoration: underline;
    word-break: break-all;
  }
  
  .csv-table .table td a:hover {
    color: #6d4a2a;
  }
  
  
  @media (max-width: 768px) {
    .csv-table {
      padding: 20px 15px;
      margin: 20px auto;
      width: 90%;
    }
    
    .csv-table h4 {
      font-size: 1.2rem;
      margin-bottom: 15px;
    }
    
    .csv-table .table {
      font-size: 0.85rem;
      min-width: 500px;
    }
    
    .csv-table .table th,
    .csv-table .table td {
      padding: 10px 12px;
    }
  }
  /*--------------------------------------------------------------
  # RDF Content
  --------------------------------------------------------------*/
  .rdf-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 25px;
  }
  
  .rdf-technical {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
  }
  
  .rdf-technical h4 {
    color: var(--heading-color);
    margin-bottom: 15px;
    font-family: var(--heading-font);
  }
  
  .rdf-technical ul {
    list-style-type: none;
    padding-left: 0;
  }
  
  .rdf-technical li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 1.05rem;
  }
  
  .rdf-technical li::before {
    content: '•';
    color: var(--accent-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
  }
  
  .rdf-technical strong {
    color: var(--heading-color);
  }
  
  .rdf-example {
    background: #2d2d2d;
    border-radius: 6px;
    padding: 20px;
    overflow-x: auto;
  }
  
  .rdf-example h4 {
    color: white;
    margin-bottom: 15px;
    font-family: var(--heading-font);
  }
  
  .rdf-example pre {
    margin: 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #f8f8f2;
  }
  
  .rdf-links {
    margin-top: 25px;
  }
  
  .rdf-links h4 {
    color: var(--heading-color);
    margin-bottom: 15px;
    font-family: var(--heading-font);
  }
  
  .rdf-download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .rdf-link {
    display: inline-flex;
    align-items: center;
    background-color: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
  }
  
  .rdf-link:hover {
    background-color: #6d4a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  .rdf-link i {
    margin-right: 8px;
  }
  
  /*--------------------------------------------------------------
  # Code & Embed Sections
  --------------------------------------------------------------*/
  .code-container {
    background: #f7f5f0;
    border: 1px solid rgba(139, 90, 43, 0.18);
    border-radius: 10px;
    padding: 18px 20px;
    overflow-x: auto;
    max-height: 520px;
    overflow-y: auto;
    margin-bottom: 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  }
  
  .code-container pre {
    margin: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre;
  }
  
  .code-container code {
    color: #2c2c2c;
    display: block;
  }
  
  .embed-container {
    width: 100%;
    max-width: 100%;
    height: 560px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .embed-container iframe {
    width: 100%;
    height: 100%;
  }
  
  .language-xml .tag { color: #2f6f8f; }
  .language-xml .attribute { color: #4f7ea8; }
  .language-xml .value { color: #9a5a3a; }
  .language-xml .comment { color: #7a8b6f; font-style: italic; }
  .language-xml .punctuation { color: #555; }
  
  .code-container::-webkit-scrollbar { width: 10px; height: 10px; }
  .code-container::-webkit-scrollbar-track { background: #f0ede6; }
  .code-container::-webkit-scrollbar-thumb {
    background: #b8aa98;
    border-radius: 6px;
  }
  .code-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
  }
  
  /* Style for Text Analysis */
  .text-analysis-section {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin: 50px 0;
    border-left: 4px solid var(--accent-color);
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .text-analysis-section h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
    font-family: var(--heading-font);
  }
  
  .text-analysis-section .idea-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--default-color);
    margin-bottom: 25px;
  }
  
  .text-analysis-section .embed-container {
    background: #f7f5f0;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(139, 90, 43, 0.18);
    margin: 20px 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  }

  .text-analysis-section .embed-container iframe {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
    border-radius: 8px;
    background: white;
  }
  
  /* Responsive per schermi piccoli */
  @media (max-width: 768px) {
    .text-analysis-section {
      padding: 20px 15px;
      margin: 30px auto;
      width: 95%;
    }
    
    .text-analysis-section h3 {
      font-size: 1.5rem;
    }
  }
  
  /*--------------------------------------------------------------
  # Team Section
  --------------------------------------------------------------*/

  .team {
    padding: 120px 0 96px; /* slightly tighter bottom */
    background-color: var(--surface-color);
  }

  /* Container and title */
  #team .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
  }

  .team .section-title {
    text-align: center;
    margin-bottom: 8px;        /* space under title block */
  }

  .team .section-title h2 {
    margin: 0 0 24px;           /* space betweem "Team" and the line below */
    font-size: 2rem;
    color: var(--heading-color);
    font-family: "Cinzel", serif;
  }

  .team .section-title p {
    margin: 0;
    color: #666;
  }

  /* Grid: 3 columns on the same line */
  .team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
  }

  /* Member Card */
  .member-card {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(139, 90, 43, 0.15);
  }

  /* square pic (responsive) */
  .member-img-container {
    width: 80%;
    aspect-ratio: 1 / 1;                       /* square */
    margin: 0 auto 25px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 4px solid #f8f9fa;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #eee;
  }

  .member-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
  }

  .member-card:hover .member-img {
    transform: scale(1.05);
  }

  /* Texts inside the card */
  .member-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--heading-color);
    font-family: var(--heading-font);
    line-height: 1.2;
  }

  /* Remove decorative underline/dash under names */
  .member-card h3::after {
    content: none;
  }

  /* If you use <span class="surname">Surname</span> in H3, send the surname to a new line */
  .member-card h3 .surname {
    display: block;
    margin-top: 2px;
  }

  .member-card p {
    color: var(--default-color);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 8px;
  }

  .member-card p:last-child {
    margin-bottom: 0;
    color: #6c757d;
    font-style: italic;
  }

  /* Light effect in hover */
  .member-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 90, 43, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
  }

  .member-card:hover::before {
    opacity: 1;
  }

  /* Initial Animation */
  @keyframes teamCardEntrance {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
  }

  .member-card {
    animation: teamCardEntrance 0.6s ease-out forwards;
    opacity: 0;
  }

  .member-card:nth-child(1) { animation-delay: 0.1s; }
  .member-card:nth-child(2) { animation-delay: 0.2s; }
  .member-card:nth-child(3) { animation-delay: 0.3s; }

  /* Fallback for browser without aspect-ratio */
  @supports not (aspect-ratio: 1 / 1) {
    .member-img-container::before {
      content: "";
      display: block;
      padding-top: 100%;
    }
    .member-img-container .member-img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  /* ======= Responsive (senza toccare il quadrato) ======= */
  /* Nota: NON impostiamo width/height fissi sulla .member-img-container,
          così resta sempre un quadrato fluido in ogni breakpoint. */

  @media (max-width: 768px) {
    .team { padding: 60px 0 48px; }
    .member-card { padding: 25px 20px; }
    .member-card h3 { font-size: 20px; }
  }

  @media (max-width: 576px) {
    .member-card { padding: 20px 15px; }
    .member-card h3 { font-size: 18px; }
    .member-card p  { font-size: 0.9rem; }
  }
    
  /*--------------------------------------------------------------
  # Footer - 
  --------------------------------------------------------------*/
  .footer {
    background: var(--surface-color);
    padding: 30px 0;
    text-align: center;
    font-size: 14px;
  }
  
  .footer .copyright {
    margin-bottom: 5px;
    color: var(--default-color);
  }
  
  .footer .credits {
    font-size: 13px;
    color: #6c757d;
  }
  
  /*--------------------------------------------------------------
  # Responsive Media Queries
  --------------------------------------------------------------*/
  @media (max-width: 768px) {
    .navmenu ul {
      display: none;
      position: absolute;
      inset: 60px 20px 20px 20px;
      padding: 10px 0;
      margin: 0;
      background-color: var(--surface-color);
      overflow-y: auto;
      transition: 0.3s;
      z-index: 9998;
      flex-direction: column;
      gap: 12px;
    }
  
    .navmenu a {
      padding: 10px 20px;
      font-size: 15px;
    }
  
    .section {
      padding: 60px 0;
    }
  
    .domain-subsection {
      margin: 30px 0;
      padding: 20px;
    }
  
    .knowledge-representation .domain-subsection {
      padding: 30px;
      margin: 30px 0;
    }
  
    .embed-container {
      height: 600px;
    }
  }
  
  @media (max-width: 576px) {
    .home-title-line {
      font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
  
    .items-grid {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  
    .idea-gallery {
      grid-template-columns: 1fr;
    }
  }
  /* SVG zoom */
  .svg-zoom {
    width: 100%;
    max-width: 900px;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  @media (max-width: 768px) {
    .svg-zoom {
      height: 400px;
    }
  }
  
  .svg-zoom {
    width: 100%;
    max-width: 900px;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  @media (max-width: 768px) {
    .svg-zoom {
      height: 400px;
    }
  }
  
  .small-legend {
    max-width: 400px; 
    height: auto; 
    display: block; 
    margin: 0 auto; 
  }


  @media (max-width: 768px) {
  .navmenu ul {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 72px;
    right: 24px;
    left: 24px;
    bottom: auto;
    max-height: calc(100vh - 140px);
    background: #f6eddc;
    padding: 0.75rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 10000;
    overflow-y: auto;
  }

  .navmenu.is-open ul {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

body.no-scroll {
  overflow: hidden;
}
