/* CALLOUT */
.bd-callout { padding:1.25rem; margin-top:1.25rem; margin-bottom:1.25rem; border:1px solid #e9ecef; border-left-width:.25rem; border-radius:.25rem }
.bd-callout h4 { margin-bottom: 1.25rem }
.bd-callout p:last-child { margin-bottom:0 }
.bd-callout code { border-radius:.25rem }
.bd-callout+.bd-callout { margin-top:-.25rem }
.bd-callout-info { border-left-color:#5bc0de }
.bd-callout-warning { border-left-color:#f0ad4e }
.bd-callout-danger { border-left-color:#d9534f }


/* GENERAL GRAPHIC */
/* General fonts and colors */
:root {
  --background-color: rgba(58, 136, 219, 0.482);
  --title-color: rgb(0, 0, 0);
  --border-color: rgba(95, 148, 255, 0.533);
  --container-color: #fff;
  --par-title-color: #3a88db;

  --font-family: "Montserrat", sans-serif;
  --body-font: 'Play', sans-serif;

  --font-regular: 400;
  --font-medium: 600;
  --font-semi-bold: 700;

  --normal-font-size: 1rem;
  --h2-font-size: 1.25rem;
}

/* Global font */
* {
  font-family: var(--body-font) !important;
}

body {
  padding-top: 56px;
  background-color: var(--background-color) !important;
}

/* NAVBAR */
.navbar {
  background-color: var(--container-color) !important; 
  box-shadow: 0px 4px 3px rgba(73, 140, 202, 0.95)
}

/* Nav links */
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--title-color);
  font-weight: var(--font-medium);
  font-size: var(--normal-font-size);
  text-decoration: none;
  padding: 8px 12px;
  transition: color 0.3s ease;
}

/* Hover on text */
.nav-link:hover,
.nav-link:focus {
  color: #3a88db;
  text-shadow: #666;
  outline: none;
}

/* Icons */
.nav-icon {
  width: 20px;
  height: 20px;
  filter: none;
  transition: filter 0.3s ease;
}

/* Hover on icons */
.nav-link:hover .nav-icon,
.nav-link:focus .nav-icon {
  filter: brightness(0.7);
}

/* Dropdown menu */
.dropdown-menu {
  background-color: var(--container-color); /* bianco */
  color: var(--title-color);
  min-width: 200px;
  padding: 1rem 0;
}

/* Item in the dropdown menu */
.dropdown-menu .dropdown-item {
  color: var(--title-color);
  font-weight: var(--font-regular);
  font-size: var(--normal-font-size);
  padding: 0.5rem 1.5rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover on dropdown items */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background-color: #cce5ff;
  color: #0056b3;
  outline: none;
}

/* Dropdown header */
.dropdown-header {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
  font-size: var(--h2-font-size);
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

/* Open dropdown when passing with mouse */
.nav-item.dropdown:hover > .dropdown-menu {
  display: block;
  margin-top: 0; /* evita salto */
  opacity: 1;
  visibility: visible;
}

.nav-icon-team {
  height: 45px;
  width: auto;
  object-fit: contain;
}


/* GENERAL STRUCTURE OF THE PAGES */
.page-header {
  background: #0056b3;
  color: white; 
  padding: 1.5rem 0;
  margin-bottom: 3rem;
}

.page-title {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
}

.page-lead {
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.main-container {
  margin: 0 auto;
  padding: 0 0.5rem;
  margin-top: 80px;
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

/* Sidebar Menu */
.sidebar {
  flex: 1;
  flex-grow: 0;
  flex-shrink: 0;
  background: var(--container-color) !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
  height: fit-content;
}

.sidebar h2 {
  color: #2c3e50;
  margin-bottom: 25px;
  font-size: 24px;
  font-weight: 700;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

.sidebar-nav {
  list-style: none;
}

.menu-item {
  margin-bottom: 8px;
}

.menu-item a {
  display: block;
  padding: 12px 16px;
  color: #2c3e50;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: small;
  position: relative;
}

.menu-item a:hover {
  background-color: #d4edda;
  color: #0e114a;
  transform: translateX(5px);
}

.menu-item a.active {
  background-color: #0056b3;
  color: white;
  font-weight: 600;
  border-left: 4px solid #0056b3;
}

.menu-item a.active::before {
  display: none;
}

h2[id], div[id] {
  scroll-margin-top: 80px;
}

/* Page content */ 
.content {
  flex: 5;
  flex-grow: 1;
  flex-shrink: 1;
  background: var(--container-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
}

.custom-hr {
  border: none;           
  height: 2px;               
  background-color: #004d9f;            
}

.col h2 {
  color: var(--par-title-color);
  font-weight: 700;
}

.footer {
    background: linear-gradient(to bottom, rgb(58, 136, 219) 0%, #70bad7be 50%, white 100%);
    padding: 3rem 2rem 1rem;

}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    margin-bottom: 2.5rem;
    align-items: start;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    max-width: 200px;
    height: auto;
}

.footer-logo:hover {
    transform: scale(1.2);
    transition: transform 0.3s ease-in-out;
}

.footer-contacts {
    text-align: center;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.footer-contacts h3 {
    grid-column: 1 / -1; 
    margin-bottom: 1rem;
}

.contact-info {
    text-align: left; 
}

h3 {
    color: black;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact-item {
    margin-bottom: 0.8rem;
    color: #333;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    color: #2E86AB;
    width: 20px;
}

.social-icons {
    display: flex;
    gap: 30px;
    justify-content: flex-end;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
    z-index: 1;
}

.social-icon:hover::before {
    width: 100%;
    height: 100%;
}

.social-icon img.swap-image {
    width: 40px;
    height: 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.3);
    border-color: #007bff;
}

.social-icon:hover .swap-image {
    transform: scale(1.1);
}

.social-icon.instagram:hover .swap-image {
    content: url("https://static.igem.wiki/teams/5716/footer/insta-white.webp");
}

.social-icon.linkedin:hover .swap-image {
    content: url("https://static.igem.wiki/teams/5716/footer/linkedin-white.webp");
}

.social-icon:active {
    transform: translateY(-2px);
}

/* Animazione di caricamento */
.social-icon {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.social-icon:nth-child(1) {
    animation-delay: 0.1s;
}

.social-icon:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    background:transparent;
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 20px;
}

.card {
    flex: 0 0 calc(33.333% - 14px);
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-image {
  width: 100%;
  height: 100px; 
  background-color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; 
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.1);
}

.card-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-decoration: none;
  z-index: 1;
}

.footer-license {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(135, 206, 235, 0.3);
}

.footer-license p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-license a {
    color: #2E86AB;
    text-decoration: none;
    font-weight: 500;
}

.footer-license a:hover {
    text-decoration: underline;
}


/* MEDIA QUERIES */
@media (max-width: 1024px) {
  .main-container {
    flex-direction: column;
    gap: 2rem;
  }

  .content {
    padding: 2rem;
  }

  .footer-logo img {
    max-width: 130px;
  }

  .sidebar {
    position: static;
    top: auto;
    width: auto; 
    flex-basis: auto; 
    flex-grow: 1; 
    margin: 0 0 20px 0;
}
}



@media (min-width: 768px) {
  .main-container {
      flex-direction: row; /* Affianca sidebar e content */
      margin-top: 80px; 
  }

  .sidebar {
      margin: 20px; 
      position: sticky;
      top: 80px;    
    }
}


@media (max-width: 768px) {
  .page-header {
    padding: 2rem 0;
    margin-bottom: 3rem;
  }

  .page-title {
    font-size: 2.5rem; 
  }

  .page-lead {
    font-size: 1.25rem; 
  }

  .main-container {
    padding: 0 1rem; 
    margin-top: 100px;
  }

  .content {
    padding: 1.5rem; 
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-logo {
      text-align: center;
      align-items: center;
  }

  .footer-logo img {
      max-width: 120px;
  }

  .footer-contacts {
      text-align: center;
  }

  .social-icons {
      gap: 10px;
      justify-content: center; 
  }

  .social-icon {
      width: 50px; 
      height: 50px;
  }

  .social-icon img {
      width: 25px;
      height: 25px;
  }

  .card {
      flex: 0 0 calc(50% - 10px);
  }
}

@media (max-width: 480px) {
  .main-container {
      padding: 0.5rem; }
  
  .page-title {
      font-size: 2rem; }

  .page-lead {
      font-size: 1rem; }

  .content {
      padding: 1rem; }

  .social-icon {
      width: 45px; 
      height: 45px;
  }

  .social-icon img.swap-image {
      width: 20px; 
      height: 20px;
  }

  .card {
    flex: 0 0 100%; 
  }

  .carousel-container {
      padding: 15px;
  }
}