/*
--- 01 TYPOGRAPHY SYSTEM
--- 02 COLORS
--- 03 SHADOWS
--- 04 BORDER RADIUS
--- 05 WHITESPACE
*/

/* Aggiungi questa regola per correggere l'offset degli anchor link */
[id] {
  scroll-margin-top: 14rem;
}

/* HEADER */

.header {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  padding: 1.6rem 1.6rem;
  /* box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.1); */
  height: 9.6rem;
  position: relative;
}

.header-logo {
  max-height: 9.6rem;
  border-radius: 1rem;
  margin-right: 1.6rem;
}

/* NAVIGATION */
.main-nav-list {
  display: flex;
  gap: 0.8rem;
}

.nav-item {
  list-style: none;
}

.nav-item-link {
  height: 100%;
  align-content: center;
  text-align: center;
  font-size: 2rem;
  font-weight: 500;
  border-radius: 1rem;
  padding: 1.6rem 1.6rem;
  text-decoration: none;
  color: #333;
  transition: all 0.3s;
  display: inline-block;
}

.nav-item-link:link,
.nav-item-link:visited {
  background-color: #fff9e9;
  box-shadow: inset 0 0 0 0.2rem #e6cb81;
}

.nav-item-link:hover,
.nav-item-link:active {
  background-color: #e6cb81;
  color: #333;
  box-shadow: inset 0 0 0 0.2rem #fff9e9;
}

.main-nav-link:link,
.main-nav-link:visited {
  display: inline-block;
  padding: 1.6rem 3.2rem;
  border-radius: 1rem;
  font-size: 2rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: all 0.3s;
}

/* Dropdown menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 22rem;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  list-style: none;
  padding: 1.2rem 0;
  border-radius: 5px;
}

.dropdown-menu a {
  color: #333;
  padding: 1.2rem 1.6rem;
  text-decoration: none;
  display: block;
  font-size: 1.6rem;
}

.dropdown-menu a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.arrow-down {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.5rem;
  border-left: 0.7rem solid transparent;
  border-right: 0.7rem solid transparent;
  border-top: 1rem solid currentColor;
  transition: transform 0.3s;
}

.dropdown:hover .arrow-down {
  transform: rotate(180deg);
}

.nav-item-link.nav-cta:link,
.nav-item-link.nav-cta:visited {
  background-color: #e68181;
  box-shadow: inset 0 0 0 0.2rem #e77272;
}

.nav-item-link.nav-cta:hover,
.nav-item-link.nav-cta:active {
  background-color: #e77272;
  box-shadow: inset 0 0 0 0.2rem #e68181;
}

/* NAVIGATION-MOBILE*/

.btn-mobile-nav {
  border: none;
  background: none;
  cursor: pointer;
  display: none;
  z-index: 10;
  padding: 1.2rem;
  width: 4.8rem;
  height: 4.8rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: background-color 0.3s;
}

/* STICKY NAVIGATION */
body.sticky {
  margin-top: 12rem;
}

.sticky .header {
  margin-top: 0rem;
  position: fixed;
  top: 0;
  left: 0;
  padding-bottom: 0;
  padding-top: 0;
  width: 100%;
  height: 12rem;
  z-index: 9;
  background-color: #fff;
  box-shadow: 0 0.4rem 1.6rem rgba(0, 0, 0, 0.1);
}

/* HERO SECTION */

.section-hero {
  background-color: #fff;
  padding: 4.8rem 0 9.6rem 0;
}

.subheading {
  font-size: 2.4rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 1.6rem;
}

.hero {
  display: grid;
  gap: 9.6rem;
  max-width: 100rem;
  margin: 0 auto;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 2rem;
  background-color: transparent;
  background-color: #fff;
  padding: 0 3.2rem;
}

.hero-text-box {
  grid-column: 1;
  align-content: center;
  background-color: transparent;
}

.hero-description {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.3;
  color: #333;
  margin-bottom: 1.6rem;
}

.hero-image-box {
  grid-column: 2;
  margin: 1rem;
}

.hero-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: #333333bb 0px 0px 10px 0px;
}

/* NEWS SECTION */
.section-news {
  padding: 3.2rem 3.2rem;
  margin-bottom: 4.8rem;
}

.topic-title {
  padding: 0 3.2rem;
}

.topic {
  display: grid;
  max-width: 130rem;
  margin: 0 auto;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 2rem;
  background-color: transparent;
  background-color: #fff;
  padding: 0 3.2rem;
}

.topic-link {
  text-decoration: none;
  color: inherit;
}

.topic-text-box {
  grid-column: 1;
  background-color: transparent;
}

.topic-description {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.3;
  color: #333;
  margin-bottom: 3.2rem;
}

.topic-image-box {
  grid-column: 2;
  display: flex;
  justify-self: center;
  max-height: 100%;
  max-width: 70%;
}

.topic-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: #333333bb 0px 0px 10px 0px;
}

.topic-image-box picture {
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  height: 100%;
}
.btn--full:link,
.btn--full:visited,
.btn--full {
  color: #fff;
  background-color: #6ea897;
  box-shadow: inset 0 0 0 0.2rem #42655b;
  font-family: inherit;
}

.btn--full:hover,
.btn--full:active {
  color: #fff;
  background-color: #42655b;
  box-shadow: inset 0 0 0 0.2rem #6ea897;
}

.btn--outline:link,
.btn--outline:visited {
  background-color: #fff9e9;
  color: #333;
  box-shadow: inset 0 0 0 0.2rem #e6cb81;
}

.btn--outline:hover,
.btn--outline:active {
  background-color: #e6cb81;
  color: #333;
  box-shadow: inset 0 0 0 0.2rem #fff9e9;
}

.padova-birds {
  margin-top: 3rem;
}

.padova-birds-images {
  display: flex;
  font-weight: 700;
  font-size: 2rem;
  align-items: center;
}

.padova-birds-images img {
  height: 4.8rem;
  width: 4.8rem;
  border-radius: 50%;
  margin-right: -1.6rem;
  border: 3px solid #fff;
}

.padova-birds-images img:last-of-type {
  margin-right: 1.6rem;
}

.step-img-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-img-box::before {
  content: "";
  display: block;
  width: 600px;
  padding-bottom: 70%;
  opacity: 0.5;
  background-color: #e0ffd4;
  position: absolute;
  z-index: -1;

  border-radius: 15%;
}

/* 
.step-img-box::after {
  content: "";
  display: block;
  width: 60%;
  padding-bottom: 60%;
  background-color: #ffd2ff;
  border-radius: 50%;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
} */

/* FOOTER */
footer {
  background-color: #fff;
  padding: 9.6rem 0;
  align-items: center;
}

.footer {
  padding: 9.6rem 0;
}

.footer-logo {
  max-height: 6.4rem;
  border-radius: 1rem;
  margin-right: 1.6rem;
}

.footer-heading {
  font-size: 2.4rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 1.6rem;
}

.footer-grid {
  grid-template-columns: auto auto auto;
  max-width: 100rem;
  margin: 0 auto;
  padding: 0 4.8rem;
  gap: 2.4rem;
  justify-self: center;
}

.footer::before {
  content: "";
  display: block;
  width: 100%;
  height: 0.2rem;
  background-color: #ffe397;
  margin-bottom: 3.2rem;
}

.hyperlink--mail:link,
.hyperlink--mail:visited,
.hyperlink--mail:hover,
.hyperlink--mail:active {
  text-decoration: none;
  color: #333;
}

.footer-logo-col {
  display: flex;
  align-items: center;
  justify-content: start;
}

.footer-social-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social-icon {
  width: 3.2rem;
  height: 3.2rem;
  margin: 0 0.8rem;
  border-radius: 50%;
}

.footer-social-link {
  display: inline-flex;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, transform 0.25s;
}

.footer-social-link:hover,
.footer-social-link:focus {
  background: #fff9e9;
  transform: translateY(-2px);
}
.footer-social-link:focus-visible {
  outline: 0.2rem solid #fff9e9;
  outline-offset: 3px;
}

.footer-contact-col {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: auto;
}

.footer-policies-col {
  display: flex;
  margin: auto;
  flex-direction: column;
}

.footer-hyperlink--policy:link,
.footer-hyperlink--policy:visited,
.footer-hyperlink--policy:hover,
.footer-hyperlink--policy:active {
  font-size: 1.4rem;
  text-decoration: none;
  color: #333;
}

.footer-policies-list {
  list-style: none;
}

.footer-policies-list-item {
  margin: 0.4rem 0;
}

.copyright {
  display: inline-block;
  color: #555;
  margin: 0.3rem 0;
}

/* About page*/

.section-about {
  background-color: #fff;
}

.section-map {
  background-color: #fff;
}

.section-about p,
.section-map p,
.section-contact p {
  font-size: 1.6rem;
  line-height: 1.5;
  color: #333;
  margin-bottom: 1.6rem;
}

.section-about ul {
  list-style: disc;
  padding-left: 2.4rem;
  margin-bottom: 1.6rem;
}

.section-about ul li {
  font-size: 1.6rem;
  line-height: 1.5;
  color: #333;
  margin-bottom: 0;
}

.section-contact a,
.section-about a,
.section-map a,
.section-activities a {
  color: #74571a;
  font-weight: bold;
  text-decoration: none;
}

.section-about a:hover,
.section-map a:hover,
.section-activities a:hover {
  text-decoration: underline;
}

.about-grid {
  max-width: 130rem;
  margin: 0 auto 1.6rem 0;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 2rem;
  background-color: #fff; /* Valore finale */
}
.about-sostienici {
  margin:auto;
}

.about-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: #333333bb 0px 0px 10px 0px;
}

/**************************/
/* SECTION CONTACT         */
/**************************/

.section-contact {
  padding: 0.6rem 0;
}

.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6.4rem;
  margin-bottom: 4.8rem;
  background-color: #f8f9fa; /* Un colore di sfondo leggero */
  border-radius: 11px;
  box-shadow: 0 2.4rem 4.8rem rgba(0, 0, 0, 0.075);
  overflow: hidden;
}

.contact-text-box {
  padding: 4.8rem 6.4rem;
  color: #333;
}

.heading-secondary {
  margin-bottom: 2.4rem;
}

.contacts {
  font-style: normal;
  font-size: 1.6rem;
  line-height: 1.6;
}

.address {
  margin-bottom: 2.4rem;
}

.contact-form-box {
  padding: 4.8rem 6.4rem;
  background-color: #fff;
}

.contact-form {
  display: grid;
  gap: 2.4rem;
}

.form-group label {
  display: block;
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
}
.contact-form textarea {
  resize: vertical;
  min-height: 20rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.6rem;
  font-family: inherit;
  color: inherit;
  border: 1px solid #ccc;
  background-color: #f8f9fa;
  border-radius: 9px;
  box-shadow: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #aaa;
}

/**************************/
/* SECTION ACTIVITIES      */
/**************************/

.section-activities {
  padding: 0 0;
}

.activity-text {
  font-size: 1.8rem;
  line-height: 1.8;
  margin-bottom: 4.8rem;
}

.side-box {
  display: flex;
  flex-direction: column;
  gap: 4.8rem;
}

.topic-box,
.activities-box {
  padding: 2.4rem;
  background-color: #f8f9fa;
  border-radius: 11px;
  box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, 0.05);
}

.topic-box .heading-tertiary,
.activities-box .heading-tertiary {
  margin-bottom: 2.4rem;
}

.section-activities p {
  font-size: 1.6rem;
  line-height: 1.5;
  color: #333;
  margin-bottom: 1.6rem;
}

.section-activities ul {
  list-style: disc;
  padding-left: 2.4rem;
  margin-bottom: 1.6rem;
}

.section-activities ul li {
  font-size: 1.6rem;
  line-height: 1.5;
  color: #333;
  margin-bottom: 0;
}

/**************************/
/* SECTION RESEARCH       */
/**************************/

.section-projects {
  padding: 3.2rem 3.2rem;
}

.projects-description {
  font-size: 1.8rem;
  line-height: 1.8;
  margin-bottom: 4.8rem;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 4.8rem;
}

.project-card {
  max-width: 130rem;
  margin: 0 auto;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 2rem;
  background-color: #fff; /* Valore finale */
  padding: 0 3.2rem;
}

.project-text-box {
  grid-column: 1;
  background-color: transparent;
}

.project-text {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.3;
  color: #333;
  margin-bottom: 3.2rem;
}

.project-image-box {
  grid-column: 2;
  height: 35rem;
  justify-self: center;
  margin-bottom: 3.2rem;
}

.project-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: #333333bb 0px 0px 10px 0px;
}

.publication-title {
  font-style: italic;
  font-weight: bold;
  color: #333;
  font-size: 2rem !important;
  line-height: 1.2 !important;
  margin-bottom: 1.6rem !important;
  text-decoration: none;
}

.publication-references {
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.5;
  color: #666;
  margin-bottom: 1.6rem;
}

/**************************/
/* SEARCH                 */
/**************************/

.search-input {
  width: 100%;
  padding: 1.2rem;
  font-size: 1.6rem;
  font-family: inherit;
  color: inherit;
  border: 1px solid #ccc;
  background-color: #f8f9fa;
  border-radius: 9px;
  box-shadow: none;
}

.search-input-label {
  display: block;
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
}

.search-stats {
  font-size: 1.4rem;
  margin-top: 1.2rem;
  color: #555;
}

.search-input::placeholder {
  color: #aaa;
}

.search-result-item a.search-result-title {
  font-size: 1.8rem;
  font-weight: 600;
  text-decoration: none;
  color: #74571a;
}

.search-result-item a.search-result-title:hover {
  text-decoration: underline;
}

.search-result-snippet {
  font-size: 1.4rem;
  line-height: 1.5;
  color: #333;
  margin-top: 0.4rem;
}

mark {
  background: #fff3b0;
  padding: 0 0.2rem;
  border-radius: 0.2rem;
}

.search-item {
  list-style: none;
  display: flex;
  align-items: center;
}

.search-form {
  display: flex;
  align-items: center;
}

.search-input-nav {
  padding: 1.2rem 1.6rem;
  font-size: 1.6rem;
  font-family: inherit;
  color: inherit;
  border: 1px solid #ccc;
  background-color: #f8f9fa;
  border-radius: 9px;
  box-shadow: none;
  width: 18rem;
  /* Larghezza fissa per desktop; regolabile */
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input-nav:focus {
  outline: none;
  border-color: #e6cb81;
  box-shadow: 0 0 0 0.2rem rgba(230, 203, 129, 0.25);
}

.search-input-nav::placeholder {
  color: #aaa;
}

/* STILI PER DIDASCALIE IMMAGINI */
.image-caption-container {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.image-caption {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: rgba(58, 43, 10, 0.705);
  border-top-left-radius: 9px;
  border-bottom-right-radius: 9px;
  color: #fff;
  padding: 0.4rem 0.8rem;
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.2;
  max-width: 90%;
  text-align: right;
  overflow: hidden;
  word-wrap: normal;
  backdrop-filter: blur(3px);
}

.slide .image-caption {
  max-width: 37%;
}

/* Image carousel */
.image-carousel {
  position: relative;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: #33333355 0 0 10px 0;
}

.carousel-box {
  margin: 1rem;
}

.image-carousel .slides {
  position: relative;
  height: 100%;
}

.image-carousel .slide {
  position: absolute;
  inset: 0;
  padding: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.image-carousel .slide.is-active {
  opacity: 1;
}

.image-carousel .slide picture,
.image-carousel .slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.image-carousel .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 20, 0.45);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  line-height: 0;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  transition: background 0.25s;
}

.image-carousel .nav:hover,
.image-carousel .nav:focus {
  background: rgba(20, 20, 20, 0.7);
}

.image-carousel .nav.prev {
  left: 8px;
}
.image-carousel .nav.next {
  right: 8px;
}

.image-carousel .dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.image-carousel .dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.image-carousel .dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

.image-carousel:hover .dot:not(.is-active) {
  background: rgba(255, 255, 255, 0.65);
}

/* 
.sos-anfibi-logo-for-carousel {
  margin:auto;
  max-height: 60% !important;
  max-width: 60% !important;
  object-fit: contain !important;
} */

/* ======================================== */
/* --- Stili per Lightbox/Photo Viewer --- */
/* ======================================== */

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-in-out;
  padding: 2rem;
  box-sizing: border-box;
}

.lightbox-content {
  position: relative;
  max-width: 80%;
  max-height: 80%;
}
  .lightbox-figure {
  
  display: flex; 
  flex-direction: column;
  justify-content: center;
  align-items: center;  
  box-sizing: border-box;transition: all 0.3s ease;
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Garantisce che l'immagine non venga mai tagliata */
  border-radius: 4px;transition: all 0.3s ease;
  transition: opacity 0.2s ease-in-out;
}

.lightbox-image--loading {
  opacity: 0;
}

.lightbox-caption {
  color: #f9fafb;
  padding: 1rem 1rem 0 1rem;
  font-size: 1.5rem;
  font-style: italic;
  text-align: center;
  line-height: 1.4;
  max-width: 70ch;
  transition: opacity 0.2s ease-in-out;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 3rem;
  font-size: 4rem;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 1rem 1rem;
  transition: color 0.2s;
  z-index: 10;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #ccc;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: none;
  font-size: 3rem;
  cursor: pointer;
  padding: 1rem 1.5rem;
  transition: background-color 0.2s;
  user-select: none;
  z-index: 10; /* Aggiunto z-index */
}

.lightbox-nav:hover,
.lightbox-nav:focus {
  background-color: rgba(0, 0, 0, 0.6);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

/* Aggiungi un cursore per indicare che le immagini sono cliccabili */
.image-carousel .slide {
  cursor: zoom-in;
}
