/* Overlay scuro */
.intro-header {
  position: relative !important;
}
.intro-header::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.25) !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

/* Mantiene cover ma sposta il punto di taglio */
.intro-header {
  background-size: cover !important;
  background-position: 60% 50% !important;   /* prova: center, top, bottom */
}


/* Testo sopra overlay */
.intro-header .site-heading,
.intro-header .post-heading {
  position: relative !important;
  z-index: 1 !important;
}

/* Titolo più grande */
.intro-header .site-heading h1,
.intro-header .post-heading h1 {
  font-size: 48px !important;   /* regola qui */
  line-height: 1.1 !important;
}

@media (max-width: 768px) {
  .intro-header .site-heading h1,
  .intro-header .post-heading h1 {
    font-size: 34px !important;
  }
}

.intro-header.home-hero{
  min-height: 70vh !important;
  height: 85vh !important;
  max-height: 900px !important;
}

/* Research header: sposta il punto di ritaglio */
body.research header.intro-header{
  background-position: center 50% !important; /* prova 0%–100% */
}


/* Gallery */
.lec-gallery { width: 100%; margin: 32px 0 48px; }
.gallery-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 14px; border-bottom: 1px solid #d8ded9; }
.gallery-heading p { margin: 0 0 10px !important; color: #173f32; font-size: 18px; font-weight: 700; }
.gallery-heading span { color: #687a72; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 190px; gap: 12px; }
.lec-gallery .gallery-item { position: relative; overflow: hidden; margin: 0 !important; padding: 0 !important; border: 0 !important; border-top: 0 !important; border-radius: 4px; outline: 0; background: transparent !important; box-shadow: none !important; appearance: none; -webkit-appearance: none; cursor: zoom-in; }
.gallery-item-featured { grid-column: span 2; grid-row: span 2; }
.lec-gallery .gallery-img,
.post-content .lec-gallery .gallery-img,
.article-content .lec-gallery .gallery-img { position: absolute; inset: 0; display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; object-fit: cover !important; transition: transform .35s ease, opacity .35s ease; }
.gallery-item:hover .gallery-img,
.gallery-item:focus-visible .gallery-img { transform: scale(1.025); opacity: .86; }
.gallery-item:focus-visible { outline: 3px solid #e0b84d; outline-offset: 3px; }
.gallery-preview .gallery-grid { max-height: 392px; overflow: hidden; }
.gallery-more { display: flex; justify-content: flex-end; margin-top: 16px; }
.gallery-more a { display: inline-flex; align-items: center; gap: 9px; padding: 10px 15px; border: 1px solid #1d5b46; border-radius: 3px; color: #1d5b46; font-size: 14px; font-weight: 700; text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.gallery-more a:hover,
.gallery-more a:focus { background: #1d5b46; color: #fff; text-decoration: none; }
.gallery-more span { font-size: 18px; line-height: 1; }
.gallery-open { overflow: hidden; }
.gallery-lightbox { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 22px 78px 18px; border: 0; background: rgba(5,15,12,.96); color: #fff; overflow: hidden; }
.gallery-lightbox::backdrop { background: rgba(5,15,12,.94); }
.gallery-lightbox figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; width: 100%; height: 100%; margin: 0 !important; overflow: auto; overscroll-behavior: contain; }
.gallery-lightbox img { display: block; width: auto !important; height: auto !important; max-width: 100% !important; max-height: calc(100dvh - 78px) !important; object-fit: contain; box-shadow: 0 12px 50px rgba(0,0,0,.35); }
.gallery-lightbox figcaption { margin-top: 10px; color: #d5ded9; font-size: 13px; letter-spacing: .08em; }
.gallery-lightbox-close,
.gallery-lightbox-nav { position: absolute; z-index: 2; border: 0; border-radius: 50%; background: rgba(255,255,255,.13); color: #fff; cursor: pointer; }
.gallery-lightbox-close { top: 18px; right: 20px; width: 44px; height: 44px; font-size: 28px; }
.gallery-lightbox-nav { top: 50%; width: 48px; height: 48px; transform: translateY(-50%); font-size: 36px; line-height: 1; }
.gallery-lightbox-prev { left: 18px; }
.gallery-lightbox-next { right: 18px; }
.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover { background: rgba(255,255,255,.26); }

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; }
  .gallery-preview .gallery-grid { max-height: 372px; }
  .gallery-lightbox { padding: 68px 12px 72px; }
  .gallery-lightbox img { max-height: calc(100dvh - 158px) !important; }
  .gallery-lightbox-nav { top: auto; bottom: 14px; transform: none; }
  .gallery-lightbox-prev { left: calc(50% - 60px); }
  .gallery-lightbox-next { right: calc(50% - 60px); }
}

@media (max-width: 540px) {
  .gallery-grid { grid-auto-rows: 145px; gap: 8px; }
  .gallery-preview .gallery-grid { max-height: 298px; }
  .gallery-item-featured { grid-column: span 2; grid-row: span 2; }
  .gallery-heading { align-items: flex-start; flex-direction: column; gap: 0; }
}

/* People linked to projects */
.project-people { margin: 45px 0 30px; padding-top: 22px; border-top: 1px solid #d8ded9; }
.project-people h2 { margin: 0 0 14px; font-size: 24px; }
.project-people-list { display: flex; flex-wrap: wrap; gap: 9px; }
.project-people-list a { display: inline-block; padding: 7px 12px; border: 1px solid #1d5b46; border-radius: 20px; color: #1d5b46; font-size: 14px; font-weight: 600; text-decoration: none; }
.project-people-list a:hover,
.project-people-list a:focus { background: #1d5b46; color: #fff; text-decoration: none; }

/* Projects linked from people profiles */
.person-projects { margin: 38px 0 48px; padding-top: 22px; border-top: 1px solid #d8ded9; }
.person-projects h2 { margin: 0 0 14px; font-size: 24px; }
.person-projects-list { display: flex; flex-wrap: wrap; gap: 9px; }

/* People overview */
.people-summary { margin: 18px 0 32px; }

/* Navigation search */
.nav-search { position: relative; }
.navbar-custom .nav-search-toggle {
  display: block;
  padding: 20px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
}
.navbar-custom.is-fixed .nav-search-toggle,
.navbar-custom.invert .nav-search-toggle { color: #404040; }
.nav-search-panel {
  position: absolute;
  z-index: 1100;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 30px));
  padding: 14px;
  border: 1px solid #d8ded9;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.nav-search-panel[hidden] { display: none; }
.nav-search-panel input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #aebbb5;
  border-radius: 3px;
  background: #fff;
  color: #202b27;
  font-size: 15px;
  outline: none;
}
.nav-search-panel input:focus { border-color: #1d5b46; box-shadow: 0 0 0 2px rgba(29, 91, 70, .15); }
.nav-search-results { max-height: 360px; margin-top: 8px; overflow-y: auto; }
.nav-search-results a {
  display: block;
  padding: 9px 7px;
  border-bottom: 1px solid #edf0ee;
  color: #173f32 !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.nav-search-results a:hover,
.nav-search-results a:focus { background: #f1f6f3; color: #0f5039 !important; }
.nav-search-empty { margin: 10px 7px 2px !important; color: #687a72; font-size: 14px; }

@media (max-width: 767px) {
  .navbar-custom .nav-search-toggle { width: 100%; padding: 10px 20px; text-align: left; color: #404040; }
  .nav-search-panel { position: fixed; top: 58px; right: 15px; left: 15px; width: auto; }
}
.person-projects-list a { display: inline-block; padding: 7px 12px; border: 1px solid #1d5b46; border-radius: 20px; color: #1d5b46; font-size: 14px; font-weight: 600; text-decoration: none; }
.person-projects-list a:hover,
.person-projects-list a:focus { background: #1d5b46; color: #fff; text-decoration: none; }

/* People pages */
.people-header {
  min-height: 0 !important;
  height: auto !important;
  margin: 0 0 32px !important;
  padding: 105px 0 30px !important;
  background: #fff !important;
  color: #111 !important;
  text-shadow: none !important;
  border-bottom: 1px solid #eee;
}
.people-header::before { display: none !important; }
.people-header h1,
.people-header p,
.people-header .post-heading,
.people-header .post-heading p,
.people-header a { color: #111 !important; text-shadow: none !important; }

/* People profile contacts */
.person-profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  align-items: start;
  gap: 52px;
  margin-bottom: 55px;
}
.person-profile-sidebar {
  position: sticky;
  top: 90px;
}
.person-profile-image {
  display: block;
  width: 100% !important;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
}
.person-profile-main { min-width: 0; }
.person-profile-main .post-content { padding-top: 0; }
.person-profile-main .post-content > :first-child { margin-top: 0; }
.person-contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 0;
}
.person-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 10px 17px;
  border: 1px solid #1d5b46;
  border-radius: 4px;
  color: #1d5b46 !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.person-contact-button:hover,
.person-contact-button:focus {
  background: #1d5b46;
  color: #fff !important;
}
.person-contact-researchgate {
  border-color: #00a39a;
  color: #007d76 !important;
}
.person-contact-researchgate:hover,
.person-contact-researchgate:focus {
  border-color: #00a39a;
  background: #00a39a;
}

@media (max-width: 767px) {
  .person-profile-layout { grid-template-columns: 1fr; gap: 28px; }
  .person-profile-sidebar {
    position: static;
    width: min(100%, 420px);
    margin: 0 auto;
  }
  .person-profile-main .post-content { text-align: left; }
}

/* Press coverage */
.press-coverage { margin: 20px 0 55px; }
.press-coverage-intro { max-width: 760px; color: #586b63; }
.press-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.press-card { display: grid; min-width: 0; min-height: 128px; grid-template-columns: 135px minmax(0, 1fr); overflow: hidden; border: 1px solid #dce3df; border-radius: 6px; background: #fff; color: #172d25; text-decoration: none !important; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.press-card:hover,
.press-card:focus { transform: translateY(-2px); border-color: #9bb9ad; box-shadow: 0 9px 25px rgba(20,55,43,.12); color: #172d25; text-decoration: none !important; }
.press-card-image { display: grid; place-items: center; width: 135px; height: 128px; padding: 16px; background: #f5f7f6; }
.press-card-image img { display: block; width: 100% !important; height: 100% !important; max-width: 103px !important; max-height: 96px !important; object-fit: contain; }
.press-card-body { display: flex; min-width: 0; flex-direction: column; padding: 13px 14px; }
.press-card-body strong { font-size: 14px; line-height: 1.3; }
.press-card-body small { display: block; margin-top: 8px; color: #6b7973; line-height: 1.4; }
.press-card-link { margin-top: auto; padding-top: 8px; color: #1d5b46; font-size: 12px; font-weight: 700; }
.press-more { margin-top: 20px; }
.press-more summary { display: table; margin: 0 auto; padding: 10px 16px; border: 1px solid #1d5b46; border-radius: 3px; color: #1d5b46; cursor: pointer; font-size: 14px; font-weight: 700; list-style: none; }
.press-more summary::-webkit-details-marker { display: none; }
.press-more summary:hover,
.press-more summary:focus { background: #1d5b46; color: #fff; }
.press-more-close { display: none; }
.press-more[open] .press-more-open { display: none; }
.press-more[open] .press-more-close { display: inline; }
.press-grid-more { margin-top: 22px; }
.press-source { margin-top: 22px; color: #6b7973; font-size: 13px; }

@media (max-width: 900px) {
  .press-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .press-card { min-height: 112px; grid-template-columns: 105px minmax(0, 1fr); }
  .press-card-image { width: 105px; height: 112px; padding: 13px; }
  .press-card-image img { max-width: 79px !important; max-height: 86px !important; }
}

/* News overview */
.news-grid {
  display: grid;
  gap: 18px;
  margin: 0 0 28px;
}
.news-card {
  display: grid;
  min-height: 190px;
  grid-template-columns: 190px minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(20,55,43,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(20,55,43,.12);
}
.news-card-image {
  display: block;
  min-height: 190px;
  overflow: hidden;
  background: #edf2ef;
}
.news-card-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 190px;
  padding: 20px;
  object-fit: contain;
  background: #fff;
  transition: transform .35s ease;
}
.news-card:hover .news-card-image img { transform: scale(1.035); }
.news-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px 20px 16px;
}
.news-card-date {
  margin-bottom: 5px;
  color: #668076;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.news-card-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}
.news-card-title a { color: #172d25; text-decoration: none !important; }
.news-card-title a:hover { color: #1d5b46; }
.news-card-subtitle {
  margin: 7px 0 12px;
  color: #586b63;
  font-size: 14px;
  line-height: 1.45;
}
.news-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}
.news-card-tags span {
  padding: 3px 7px;
  border-radius: 20px;
  background: #edf4f0;
  color: #35644f;
  font-size: 11px;
  font-weight: 700;
}
.news-card-link {
  align-self: flex-start;
  margin-top: auto;
  color: #1d5b46 !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
}
.news-card-link:hover { color: #123e2e !important; }

@media (max-width: 600px) {
  .news-card { min-height: 0; grid-template-columns: 112px minmax(0, 1fr); }
  .news-card-image,
  .news-card-image img { min-height: 165px; }
  .news-card-body { padding: 13px 14px; }
  .news-card-title { font-size: 16px; }
  .news-card-subtitle { font-size: 12px; }
  .news-card-tags { display: none; }
}

/* LIFE EOLIZARD project logos */
.eolizard-logo-hero {
  display: flex;
  justify-content: center;
  margin: 5px 0 38px;
}
.eolizard-logo-hero img {
  display: block;
  width: auto !important;
  max-width: min(100%, 440px) !important;
  max-height: 230px;
  object-fit: contain;
}
.eolizard-funding-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 42px;
  margin: 42px 0 48px;
  padding: 26px 24px;
  border-top: 1px solid #dce3df;
  border-bottom: 1px solid #dce3df;
}
.eolizard-funding-logos img {
  display: block;
  width: auto !important;
  max-width: 270px !important;
  max-height: 90px;
  object-fit: contain;
}
.eolizard-funding-logos img:first-child {
  max-width: 150px !important;
}

@media (max-width: 560px) {
  .eolizard-logo-hero { margin-bottom: 28px; }
  .eolizard-logo-hero img { max-width: min(100%, 330px) !important; }
  .eolizard-funding-logos { flex-direction: column; gap: 24px; padding: 24px 15px; }
  .eolizard-funding-logos img { max-width: min(100%, 260px) !important; }
  .eolizard-funding-logos img:first-child { max-width: 140px !important; }
}

/* Projects overview */
.projects-overview { padding-bottom: 55px; }
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 4px 0 28px;
}
.project-filter {
  padding: 8px 14px;
  border: 1px solid #b9c8c1;
  border-radius: 22px;
  background: #fff;
  color: #26483b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.project-filter:hover,
.project-filter:focus,
.project-filter.is-active {
  border-color: #1d5b46;
  background: #1d5b46;
  color: #fff;
}
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce3df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(22, 57, 44, .06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.project-card[hidden] { display: none; }
.project-card:hover,
.project-card:focus-within {
  transform: translateY(-4px);
  border-color: #9db8ac;
  box-shadow: 0 14px 32px rgba(22, 57, 44, .14);
}
.project-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: #172d25 !important;
  text-decoration: none !important;
}
.project-card-cover {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: #dce8e1;
}
.project-card-cover img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  transition: transform .4s ease;
}
.project-card:hover .project-card-cover img { transform: scale(1.035); }
.project-card-cover-placeholder {
  background:
    radial-gradient(circle at 78% 25%, rgba(215, 232, 220, .95), transparent 31%),
    linear-gradient(140deg, #173f32, #4f846b);
}
.project-card-cover-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 45%, rgba(255,255,255,.09) 45%, rgba(255,255,255,.09) 50%, transparent 50%);
  background-size: 24px 24px;
}
.project-card-topic {
  position: absolute;
  z-index: 1;
  top: 13px;
  left: 13px;
  padding: 6px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  color: #173f32;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.project-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 19px 19px;
}
.project-card-body h2 {
  margin: 0 0 9px;
  color: #173f32;
  font-size: 20px;
  line-height: 1.25;
}
.project-card-body p {
  display: -webkit-box;
  margin: 0 0 18px;
  overflow: hidden;
  color: #586b63;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.project-card-action {
  margin-top: auto;
  color: #1d5b46;
  font-size: 13px;
  font-weight: 800;
}

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

@media (max-width: 620px) {
  .project-filters {
    flex-wrap: nowrap;
    margin-right: -15px;
    margin-left: -15px;
    padding: 0 15px 5px;
    overflow-x: auto;
  }
  .project-filter { flex: 0 0 auto; }
  .project-card-grid { grid-template-columns: 1fr; gap: 16px; }
  .project-card-cover { height: 205px; }
}
