/* ********************************************** fonts */

@font-face {
  font-family: 'Figtree'; /* set name */
  src: url('../assets/fonts/Figtree-VariableFont_wght.ttf');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

.figtree-font-light {
  font-family: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  letter-spacing: 0.1rem;
}

.figtree-font-bold {
  font-family: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1rem;
}

.figtree-font-semibold {
  font-family: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1rem;
}

@font-face {
  font-family: 'Doto Rounded'; /* set name */
  src: url('../assets/fonts/Doto_Rounded-Bold.ttf');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.doto-rounded-font {
  font-family: 'Doto Rounded', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


body {
  font-family: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  max-width: 100%;
  min-height: auto;
  overflow-x: hidden;  /* prevent horizontal scroll from wide elements */
  margin: 0;
  padding: 0;
}

html {
  max-width: 100%;
  height: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}


main {
  overflow: hidden;
}

footer {
  overflow: hidden;
  position: relative;
}

.mx-6 {
  margin-left: 6rem;
  margin-right: 6rem;
}

.ms-6 {
  margin-left: 6rem;
}

.pe-6 {
  padding-right: 6rem;
}

.ps-6 {
  padding-left: 6rem;
}

.py-6 {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.br-science-approach {
  display: none;
}

.min-h-100 {
  min-height: 100vh;
}

/* Reduce footer overlay height on smaller screens */
@media (max-width: 991.98px) {

  .mx-6 {
    margin-left: 0;
    margin-right: 0;
  }

  .ms-6 {
    margin-left: 0;
  }

  .pe-6 {
    padding-right: 0;
  }

  .ps-6 {
    padding-left: 0;
  }
}

@media (min-width: 1560px) {
  .br-science-approach {
    display:inline;
  }
}

/************************************************ bg colors*/

.btn:hover {
  background-color: none;
  border: 1px solid #ff7b25;
}

.btn-news {
display: inline-block !important;
  background-color: #ff7b25;
  border: 1px solid #ff7b25;
  color: #fff;
}

.btn-news:hover {
  border: 1px solid #ff7b25;
  color: #132530;
}

.bg-black {
  background-color: #000;
}

.bg-white {
  background-color: #fff;
}

.bg-orange {
  background-color: #ff7b25;
}

.bg-turquoise {
  background-color: #12c9dd;
}

.bg-dark-turquoise {
  background-color: #0396a6;
}

.bg-light-blue {
  background-color: #d5f2f6;
}

.bg-blue {
  background-color: #c3eaf0;
}

.bg-blue-gradient {
  background: linear-gradient(to right, #d5f2f6 0%, #d5f2f6 50%, #c3eaf0 50%, #c3eaf0 100%);
}

.bg-dark-blue {
  background-color: #132530;
}

.bg-dark-blue-graph {
  background-color: #285aa1;
}

.bg-grey {
  background-color: #e8eaeb;
}

.bg-light-grey {
  background-color: #f8f8f9;
}

.about-bg {
  background-image: url('../assets/images/Ingineeon_bg_about.png');
  background-size: cover;
  background-position: right;
  background-repeat: no-repeat;
}

.contact-bg {
  background-image: url('../assets/images/Ingineeon_bg_contact.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.footer-bg {
  background-image: url('../assets/images/Ingineeon_bg_footer.png');
  min-height: auto;
  height: auto;
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
}

@media (max-width: 991.98px) {
  .about-bg {
    height: auto;
  }

  .bg-blue-gradient {
    background: #c3eaf0;
  }

  .bg-light-blue {
    background-color: #d5f2f6;
  }
}

/************************************************ text colors*/

.text-dark-blue {
  color: #132530;
}

.text-turquoise {
  color: #12c9dd;
}

.text-orange {
  color: #ff7b25;
}

/************************************************ font-size*/

p {
  letter-spacing: 0.1rem;
  font-size: 1.1rem;
  font-family: 'Figtree Light', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1 h2 h3 h4 h5 h6 {
  letter-spacing: 0.2rem;
  font-family: 'Figtree Light', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


.letter-spacing-big {
  letter-spacing: 0.6rem;
}

.letter-spacing-medium {
  letter-spacing: 0.3rem;
}

.lh-xs {
  line-height: 0.9;
}


.size-xl {
  font-size: 4.2rem;
}

.size-lg-team {
  font-size: 2.1rem;
}

.size-lg {
  font-size: 2.1rem;
}

.size-md {
  font-size: 1.6rem;
}

.size-sm {
  font-size: 1.3rem;
}

.size-sm-graph {
  font-size: 1.3rem;
}

.size-xs {
  font-size: 0.9rem;
}

.size-xs-team {
  font-size: 0.9rem;
}

.size-xs-nav {
  font-size: 0.8rem;
}

.size-xxs {
  font-size: 0.8rem;
}

.size-xxs-team {
  font-size: 0.8rem;
}



.big {
  font-size: 2.6rem;
  letter-spacing: 0.4rem;
}

.large {
  font-size: 3.5rem;
  letter-spacing: 0.5rem;
}

.x-large {
  font-size: 5.5rem;
  letter-spacing: 0.5rem;
}


@media (max-width: 1129px) {
  .big {
    font-size: 1.8rem;
    letter-spacing: 0.2rem;
  }
  .large {
    font-size: 2.2rem;
    letter-spacing: 0.3rem;
  }
  .x-large {
    font-size: 3rem;
    letter-spacing: 0.3rem;
  }
}

/* Only change nav-link font size on desktop (not in burger menu) */
@media (max-width: 991.98px) {
  .size-xs-nav {
    font-size: 2rem;
  }
}

@media (max-width: 760px) {
  .lh-lg{
  line-height: 1 !important;
  }

  .big {
    font-size: 1.3rem;
    letter-spacing: 0.15rem;
  }
  .large {
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
  }
  .x-large {
    font-size: 2rem;
    letter-spacing: 0.2rem;
  }


  .size-xl {
    font-size: 2.4rem;
  }
  
  .size-lg {
    font-size: 1.4rem;
  }

  .size-lg-team {
    font-size: 1.2rem;
  }
  
  .size-md {
    font-size: 1rem;
  }
  
  .size-sm {
    font-size: 0.7rem;
  }

  .size-sm-graph {
    font-size: 0.8rem;
  }
  
  .size-xs {
    font-size: 14px;
  }

  .size-xs-team {
    font-size: 12px !important;
  }

  .size-xxs {
    font-size: 12px;
  }

  .size-xxs-team {
    font-size: 10px !important;
  }
}


/************************************************ svg fill*/

.white-fill {
  fill: #fff;
}

.no-fill {
  fill: none;
}

/************************************************ link*/

.link {
  font-weight: light;
  text-decoration: none;
  display: inline-block;
  position: relative;
}

.link::before {
  content: attr(data-text);
  font-weight: bold;
  height: 0;
  visibility: hidden;
  overflow: hidden;
  display: block;
  white-space: nowrap;
}

.link:hover {
  font-weight: bold;
}

/*********************************************** Nav Menu */

.nav-link {
  color: #fff;
  display: inline-block;
  position: relative;
  font-weight: 300;
}

.nav-link::before {
  content: attr(data-text);
  font-weight: 700;
  height: 0;
  visibility: hidden;
  overflow: hidden;
  display: block;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
  font-weight: 700;
}

/* Keep Science dropdown link white when clicked/active */
#scienceDropdown,
#scienceDropdown:active,
#scienceDropdown:focus,
#scienceDropdown:hover,
.nav-item.dropdown.show #scienceDropdown {
  color: #fff !important;
}

/* Science dropdown menu - show on hover (desktop only) */
@media (min-width: 992px) {
  .nav-item.dropdown:hover .dropdown-menu,
  .nav-item.dropdown .dropdown-menu:hover {
    display: block;
  }
  
  .nav-item.dropdown .dropdown-menu {
    display: none;
  }
}

.dropdown-menu {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.01));
  border: none;
  padding: 0.5rem 0;
  margin-top: 0;
  backdrop-filter: blur(3px);
}

/* Remove background on mobile */
@media (max-width: 991.98px) {
  .dropdown-menu {
    background: transparent;
    backdrop-filter: none;
  }
}

.dropdown-item {
  color: #fff;
  padding: 0.5rem 1.5rem;
  font-size: 0.8rem;
  font-weight: light;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: #fff;
  font-weight: bold;
}

.dropdown-toggle::after {
  margin-left: 0.5rem;
  vertical-align: 0.15em;
}

/* On mobile, show dropdown when clicked */
@media (max-width: 991.98px) {
  .nav-item.dropdown.show .dropdown-menu {
    display: block;
  }

  .dropdown-item {
    font-size: 1.2rem;
  }
}

.hero-bg {
  position: relative;
}

.hero-content {
  height: 100%;
}

.navbar {
  position: fixed !important;
  backdrop-filter: blur(2%);
  overflow: visible;
  z-index: 1100 !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

.navbar-toggler, .navbar-brand {
  z-index: 1100 !important;
}

/* Ensure navbar stays visible and above footer - footer has z-index 1030, navbar should always be higher */
footer,
footer * {
  position: relative;
  z-index: auto;
}

footer .shadow_overlay_footer {
  z-index: 1030;
}

.navbar-toggler span {
  display: block;
  background-color: #4f4f4f;
  height: 3px;
  width: 25px;
  margin-top: 5px;
  margin-bottom: 5px;
  position: relative;
  left: 0;
  transition: all 0.25s ease-out;
  transform-origin: center left;
}

.navbar-toggler span:nth-child(1) {
  transform: translate(0%, 0%) rotate(0deg);
  background-color: #fff;
}

.navbar-toggler span:nth-child(2) {
  opacity: 1;
  background-color: #fff;
}

.navbar-toggler span:nth-child(3) {
  transform: translate(0%, 0%) rotate(0deg);
  background-color: #fff;
}

.navbar-toggler span:nth-child(1) {
  margin-top: 0.3em;
}

.navbar-toggler:not(.collapsed) span:nth-child(1) {
  transform: translate(15%, -33%) rotate(45deg);
}

.navbar-toggler:not(.collapsed) span:nth-child(2) {
  opacity: 0;
}

.navbar-toggler:not(.collapsed) span:nth-child(3) {
  transform: translate(15%, 33%) rotate(-45deg);
}


@media (max-width: 991.98px) {
  
  .navbar-collapse {
    transform: scale(1.3);
    transition-property: transform;
    transition-duration: 0.25s;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,.9);
    backdrop-filter: blur(8px);
    display: flex; 
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 2rem;
    opacity: 0;
    transition: transform .25s ease-in-out, opacity .25s ease-in-out;
    will-change: transform, opacity;
    z-index: 1000;
    pointer-events: none;

  }
  
  /* center the nav list inside the mobile overlay */
  .navbar-collapse .navbar-nav {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;                 /* override .ms-auto pushing it to the side */
  }
  
  .navbar-collapse.collapsing {
    opacity: 0;
    pointer-events: none;

  }
  
  .navbar-collapse.show {
    opacity: 1;
    pointer-events: auto;  
    transform: scale(1);
  }
}

/************************************************ hero logo position */

.hero-logo {
  margin-top: calc(-8vh - 20px);
  width: 60%;
  max-width: 1000px;
}

@media (max-width: 991.98px) {
  .hero-logo {
    width: 100%;
  }
}

/************************************************ footer */

.footer-item {
  list-style: none;
}

.footer-border-bottom {
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

/*********************************************** Shadow Overlays */

.shadow_overlay_from_top {
  position: relative;      /* create stacking context for ::before */
  z-index: 1030;           /* keep navbar above hero/video */
}

.shadow_overlay_from_top::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100px;   
  pointer-events: none;   
  z-index: -1;            

  background: rgba(0, 0, 0, 0.6);

  backdrop-filter: blur(3px) saturate(120%);
  -webkit-backdrop-filter: blur(3px) saturate(120%);

  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,   
    rgba(0, 0, 0, 0.9) 20%, 
    rgba(0, 0, 0, 0.3) 70%,  
    rgba(0, 0, 0, 0) 100%    
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.9) 20%,
    rgba(0, 0, 0, 0.3) 70%,
    rgba(0, 0, 0, 0) 100%
  );
}



.shadow_overlay_contact {
  position: relative;      /* create stacking context for ::before */
  z-index: 1030;           /* keep navbar above hero/video */
}

.shadow_overlay_contact::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 800px;   
  pointer-events: none;   
  z-index: -1;            

  background: rgba(0, 0, 0, 1);

  -webkit-mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,   
    rgba(0, 0, 0, 0.7) 50%,
    rgba(0, 0, 0, 0) 100%    
  );
  mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.7) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}



.shadow_overlay_footer {
  position: relative;      /* create stacking context for ::before */
  z-index: 1030;           /* keep navbar above hero/video */
  overflow: hidden;
}

.shadow_overlay_footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 500px;   
  pointer-events: none;   
  z-index: -1;            

  background: rgba(0, 0, 0, 1);

  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,   
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0) 100%    
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Reduce footer overlay height on smaller screens */
@media (max-width: 991.98px) {
  .shadow_overlay_footer::before {
    height: 300px; /* Reduce height on mobile */
  }
}

/************************************************ hero section */ 

.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;      /* full viewport height */
  height: 100%;
  overflow: hidden;       /* hide video overflow on resize */
  display: flex;
  align-items: center;    /* vertically center inner content */
}

.hero-section video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;      /* make video cover the hero area responsively */
  z-index: -10;           /* place video behind the content */
}

/* Text/content overlay above the video */
.hero-section .container,
.hero-section .container-fluid {
  position: relative;
  z-index: 2;
}

/************************************************ text animations */

/* base positioning for animated words */
.fade-in-left,
.fade-in-down {
  position: relative;
  display: inline-block;
  opacity: 0;            /* start hidden; animations will bring them to 1 */
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    left: -200px;
  }
  to {
    opacity: 1;
    left: 0;
  }
}

/* special case: vertical slide-in from behind a mask (no fade) */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-100%);  /* start exactly one line above the mask, invisible */
  }
  to {
    opacity: 1;
    transform: translateY(0);      /* settle into final line position, fully visible */
  }
}

/* fade/slide OUT – triggered later via JS so all go at same time */
.fade-out-left {
  animation: fadeOutLeft 0.25s ease-in forwards;
}

@keyframes fadeOutLeft {
  from {
    opacity: 1;
    left: 0;
  }
  to {
    opacity: 0;
    left: 200px;   /* move out to the right (opposite of fade-in) */
  }
}

.fade-out-down {
  animation: fadeOutDown 0.25s ease-in forwards;
}

@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(100%); /* slide one line below and fade out */
  }
}

/************************************************ play trailer icon */
.play-trailer-icon-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
}

.play-trailer-icon {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  z-index: 1000;
  width: auto;
  height: auto;
  max-width: 170px;
  cursor: pointer;
}

@media (max-width: 991.98px) {
  .play-trailer-icon {
    max-width: 120px;
  }
}

/************************************************ about section */

/* Make video bigger in the trailer modal - ensure video always fits with aspect ratio */
.trailer-modal .modal-dialog {
  max-width: min(85vw, calc((100vh - 4rem) * 16 / 9));
  width: auto;
  margin: auto;
  max-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-modal .modal-content {
  max-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  background-color: transparent;
}

.trailer-modal .modal-header {
  display: none;
}

.trailer-modal .modal-body {
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.trailer-modal .modal-body video,
.trailer-modal .modal-body .about-video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  border-radius: 0;
}

/* Ensure trailer modal appears above navbar */
.trailer-modal {
  z-index: 1200 !important;
}

.trailer-modal .modal-dialog {
  z-index: 1201 !important;
}

.trailer-modal.show {
  z-index: 1200 !important;
}

.trailer-modal.show .modal-dialog {
  z-index: 1201 !important;
}

@media (max-width: 991.98px) {
  .trailer-modal .modal-dialog {
    max-width: 100vw;
    width: 100%;
    margin: 0;
    max-height: 100vh;
  }
  
  .trailer-modal .modal-content {
    max-height: 100vh;
  }
  
  .trailer-modal .modal-body {
    padding: 0;
  }
}

/************************************************ science technologies section */

.technologies-title-box {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 991.98px) {
  .technologies-title-box {
    height: 75px;
  }
}

/************************************************ science therapeutics section */

.science_therapeutics_img {
  width: 100%;
  min-width: 200px;
  max-width: 450px;
  height: auto;
  object-fit: contain;
}

/************************************************ platform images equal height */

.platform-img {
  width: 100%;
  min-width: 200px;
  max-width: 500px;
  height: 400px;
  object-fit: contain;
}


/************************************************ pipeline section */

td {
  padding: 0 !important;
}

.logo-icon-img {
  width: 50px;
}

.bar-width-zero {
  width: 0;
}

.bar-width-long {
  width: 75%;
  transition: width 1s ease-in-out;
}

.bar-width-short {
  width: 40%;
  transition: width 1s ease-in-out;
}

.pipeline-bar,
.bg-dark-blue-graph,
.bg-dark-blue-graph.pipeline-bar,
.bg-orange.pipeline-bar {
  margin-left: 0 !important;
}

.pipeline_compound-img {
  width: 180px;
}

.pipeline-table {
  border-collapse: collapse;
  border-spacing: 0;
  margin: 0;
  background-color: transparent;
}

.pipeline-table thead th,
.pipeline-table tbody td,
.pipeline-table tbody th {
  padding: 0.8rem 0.8rem 0.8rem 0.8rem !important;
  border: none;
  background-color: transparent;
}

.pipeline-table tbody td.p-0,
.pipeline-table tbody th.p-0 {
  padding: 0 !important;
}

.pipeline-table__td-final-ind.p-0 {
  padding-left: 0 !important;
}
.pipeline-table thead tr:first-child th {
  padding-bottom: 0;
}

.pipeline-table thead tr:last-child th {
  padding-top: 0;
}

.pipeline-table th {
  text-transform: uppercase;
}

.pipeline-table thead tr:last-child th {
  border-bottom: 1px solid #e8eaeb !important;
}

.pipeline-table__th-indication,
.pipeline-table__td-indication {
  border-right: 1px solid #e8eaeb !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
}

.pipeline-table__th-final-ind,
.pipeline-table__td-final-ind {
  border-right: 1px solid #e8eaeb !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
}

.pipeline-table__th-rights,
.pipeline-table__td-rights {
  border-left: 1px solid #e8eaeb !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: none !important;
  padding: 0.5rem !important;
}

.pipeline-indications {
  display: flex;
  flex-wrap: wrap;
  text-align: center;
}

.pipeline-indication {
  flex: 1 1 33.333%;
  padding: 0.85rem 0.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.pipeline-indication--sepsis {
  background-color: #132530;
  color: #ffffff;
}

.pipeline-indication--onco {
  background-color: #ff7b25;
  color: #ffffff;
}

.pipeline-indication--auto {
  background-color: #12c9dd;
  color: #132530;
}

@media (max-width: 992px) {
  .pipeline-table thead th,
  .pipeline-table tbody td {
    padding: 0.75rem 0.9rem;
  }

  .pipeline-indication {
    flex: 1 1 100%;
  }
}


/************************************************ pipeline top triangle */

.pipeline-top {
  position: relative;
}

.pipeline-top-triangle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 55px solid transparent;
  border-right: 55px solid transparent;
  border-top: 30px solid #ffffff;
}

/* simple utility classes for staggered IN delays */
.anim-delay-1 {
  animation-delay: 0s;
}

.anim-delay-2 {
  animation-delay: 0.25s;
}

.anim-delay-3 {
  animation-delay: 0.5s;
}

.anim-delay-4 {
  animation-delay: 0.75s;
}

.anim-delay-5 {
  animation-delay: 3s;
}

/************************************************ MAKING / UNTREATABLE DISEASES / TREATABLE layout helpers */

/* mask container for the middle line ("UNTREATABLE DISEASES") */
.mask-line {
  display: inline-flex;
  align-items: center;       /* vertically center the text inside the mask */
  position: relative;
  overflow: hidden;          /* hides the part of the spans above/below */
  line-height: 1.2;
  height: auto;             /* higher window to fit the larger text without clipping */
}

/* Shift MAKING further to the right relative to middle part */
/* Using percentage-based positioning to maintain proportions across all screen sizes */
.anim > div:first-child {
  margin-left: 8%;
  position: relative;
}

/* Shift TREATABLE further to the right relative to middle part */
.anim > div:last-child {
  margin-left: 12%;
  position: relative;
}

/* anchor every .anim block visually in the center of the hero area */
.anim {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 90px)); /* push animated text ~70px lower (about 50px more) */
  opacity: 0;
  pointer-events: none;
}

/* Move animated text further to the right on desktop, keep centered on mobile */
@media (min-width: 1130px) {
  .anim {
    left: 60%;
  }
}

/* Center and scale down animated text at 1282px breakpoint to prevent cutoff */
@media (min-width: 1130px) and (max-width: 1550px) {
  .anim {
    left: 50%;
    transform: translate(-50%, calc(-50% + 90px)) scale(0.85);
  }
}

@media (max-width: 991.98px) {
  .mask-line {
    display: block;            /* higher window to fit the larger text without clipping */
  }
}

.anim.is-active {
  opacity: 1;
  pointer-events: auto;
}
/************************************************ MAKING / UNTREATABLE DISEASES / TREATABLE timeline (CSS-only) */
/* Runs only while the corresponding .anim container has .is-active (controlled by JS) */

/* 1) MAKING – from left, early in, fades out slightly after TREATABLE */
.anim.is-active .word-making {
  font-weight: 300;
  animation:
    fadeInLeft  0.25s ease-out 0s    forwards,
    fadeOutLeft 0.25s ease-in  4.6s  forwards;
}

/* 2) TODAYS – from left, shortly after MAKING, fades out fast with MAKING */
.anim.is-active .word-todays {
  font-weight: 300;
  animation:
    fadeInLeft  0.25s ease-out 0.4s  forwards,
    fadeOutLeft 0.25s ease-in  4.65s forwards;
}

/* 3) UNTREATABLE – slides from top through mask, fades out a bit later */
.anim.is-active .word-untreatable {
  animation:
    fadeInDown  0.25s ease-out 0.8s  forwards,
    fadeOutDown 0.25s ease-in  4.8s  forwards;
}

/* 4) DISEASES – slides from top through mask, fades out last */
.anim.is-active .word-diseases {
  animation:
    fadeInDown  0.25s ease-out 1.2s  forwards,
    fadeOutDown 0.25s ease-in  4.95s forwards;
}

/* 5) TREATABLE – from left, appears later, starts fading out first */
.anim.is-active .word-treatable {
  animation:
    fadeInLeft  0.25s ease-out 2.6s  forwards,
    fadeOutLeft 0.25s ease-in  4.5s  forwards;
}


/************************************************ hero headline (NEXT-GENERATION / IMMUNOTHERAPEUTICS) */

.hero-headline-part1 {
  font-weight: 300;
}

.hero-headline-part1,
.hero-headline-part2 {
  position: relative;
  display: inline-block;
  opacity: 0;
  /* small layout tweak: push the bottom word slightly further right */
}

.hero-headline-part2 {
  margin-left: 3rem;
  font-weight: 900 !important;
}

/* Ensure both h1 and p elements with hero-headline-part2 look identical */
/* Override any default h1 or p styles to make them identical */
h1 .hero-headline-part2,
p .hero-headline-part2 {
  font-weight: bold !important;
  letter-spacing: 0.4rem !important;
  font-size: 2.6rem !important;
  font-family: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  line-height: normal !important;
  text-transform: uppercase;
}

@media (max-width: 1129px) {
  h1 .hero-headline-part2,
  p .hero-headline-part2 {
    letter-spacing: 0.2rem !important;
    font-size: 1.8rem !important;
  }
}

@media (max-width: 760px) {
  h1 .hero-headline-part2,
  p .hero-headline-part2 {
    letter-spacing: 0.15rem !important;
    font-size: 1.3rem !important;
  }
}

/* Part 1: fade/slide in from left, then out to the right – only while parent .anim is active */
.anim.is-active .hero-headline-part1 {
  animation:
    heroInLeft   0.35s ease-out forwards 0s,
    heroOutRight 0.35s ease-in  forwards 4s;
}

/* Part 2: appears shortly after part 1, but fades out at the same time */
.anim.is-active .hero-headline-part2 {
  animation:
    heroInLeft   0.35s ease-out forwards 0.4s,
    heroOutRight 0.35s ease-in  forwards 3.9s; /* starts ~0.3s before line 1 */
}

@keyframes heroInLeft {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(80px);
  }
}

/******************************************** team icons */
.team-icons-img {
  width: 100%;
  min-width: 200px;
  max-width: 350px;
  transition: transform 0.3s ease;
}

.team-icons-img:hover {
  transform: scale(1.1);
}

@media (max-width: 991.98px) {
  .team-icons-img:hover {
    transform: scale(1);
  }
}

 /************************************************ team slider */

.team-slider {
  position: relative;
  max-width: 1250px;
  margin: 0 auto 4rem;
  overflow: hidden;
  padding-left: 3.5rem; /* room for left arrow */
  padding-right: 3.5rem; /* room for right arrow */
}

/* Center slides between control buttons */
.team-carousel .carousel-inner {
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.team-carousel .carousel-item {
  transition: transform 0.6s ease-in-out;
}

@media (max-width: 991.98px) {
  .team-slider {
    padding-inline: 3rem; /* match news slider width on mobile */
    overflow: hidden;
  }
  
  .team-carousel .carousel-inner {
    overflow: hidden;
  }
  
  /* Prevent text overflow in team slides on mobile */
  .team-carousel .carousel-item .col-lg-5,
  .team-carousel .carousel-item .col-lg-6,
  .team-carousel .carousel-item .col-sm-5,
  .team-carousel .carousel-item .col-sm-6 {
    overflow: hidden;
  }
  
  /* Ensure slides are fully visible on mobile - wider like news slider */
  .team-carousel .carousel-item {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: transform 0.6s ease-in-out;
    will-change: transform;
  }
  
  /* Prevent layout shift during animation */
  .team-carousel .carousel-item .row {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    display: flex;
    align-items: stretch;
  }
  
  /* Center the text container within its column on mobile with equal padding */
  .team-carousel .carousel-item .col-lg-5,
  .team-carousel .carousel-item .col-lg-6,
  .team-carousel .carousel-item .col-sm-5,
  .team-carousel .carousel-item .col-sm-6 {
    padding-left: 0;
    padding-right: 0;
    display: flex;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    max-width: 100%;
  }
  
  .team-carousel .carousel-item .bg-dark-blue {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100%;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Ensure text content doesn't overflow */
  .team-carousel .carousel-item .bg-dark-blue p,
  .team-carousel .carousel-item .bg-dark-blue h4,
  .team-carousel .carousel-item .bg-dark-blue div {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Fix Bootstrap carousel animation glitch - prevent layout shift */
  .team-carousel .carousel-item {
    position: relative;
    display: block;
  }
  
  .team-carousel .carousel-item:not(.active) {
    display: none;
  }
  
  .team-carousel .carousel-item.active {
    display: block;
  }
  
  /* Ensure consistent height for all slides - make them equal */
  .team-carousel .carousel-item .row {
    min-height: 400px;
  }
  
  /* Make View Bio button and social links appear side by side on mobile */
  .team-carousel .carousel-item .mt-auto.gap-3 {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  
  .team-carousel .carousel-item .mt-auto.gap-3 > p {
    margin: 0;
    display: inline-block;
  }
}

/* Apply news slider height principle to team slides on mobile (up to sm breakpoint) */
@media (max-width: 575.98px) {
  /* Make bg-dark-blue use flexbox column like news-card for equal heights */
  .team-carousel .carousel-item .bg-dark-blue {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }
  
  /* Make text content area grow to fill available space */
  .team-carousel .carousel-item .bg-dark-blue > div:first-child {
    flex-grow: 1;
  }
  
  /* Make paragraphs grow to fill space */
  .team-carousel .carousel-item .bg-dark-blue > p {
    flex-grow: 1;
  }
  
  /* Push button area to bottom with margin-top auto (like news-card__actions) */
  .team-carousel .carousel-item .mt-auto.gap-3 {
    margin-top: auto;
    padding-top: 1.5rem; /* Add spacing between text and button */
  }
}

.team-portrait-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 991.98px) {
  /* Reduce height and show top-center part of images on mobile */
  .team-carousel .carousel-item img {
    max-height: 280px;
    object-position: center top;
    object-fit: cover;
  }
}

/* Between sm and lg: make image match text content height */
@media (min-width: 576px) and (max-width: 991.98px) {
  /* Override mobile max-height restriction */
  .team-carousel .carousel-item img {
    max-height: none !important;
    height: 100%;
    object-position: center center;
    object-fit: cover;
  }
  
  /* Ensure both columns stretch to equal height */
  .team-carousel .carousel-item .row {
    align-items: stretch !important;
    display: flex !important;
  }
  
  /* Make image column stretch to match text column height */
  .team-carousel .carousel-item .col-sm-6:first-child {
    display: flex;
    align-items: stretch;
    padding: 0;
  }
  
  /* Make image fill the entire column height */
  .team-carousel .carousel-item .col-sm-6:first-child img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
  
  /* Ensure text column also stretches */
  .team-carousel .carousel-item .col-sm-6:last-child {
    display: flex;
    flex-direction: column;
    padding: 0;
  }
  
  /* Make bg-dark-blue div fill the full height of its column */
  .team-carousel .carousel-item .col-sm-6:last-child .bg-dark-blue {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: none !important;
    height: auto;
  }
  
  /* Reduce height and show top-center part of modal images on mobile */
  .team-member-modal .modal-body img {
    max-height: 500px;
    object-position: center top;
  }
  
  /* Reduce font sizes in team section slides on mobile */
  .team-carousel .carousel-item h4,
  .team-carousel .carousel-item p {
    font-size: 0.9rem;
  }
  
  .team-carousel .carousel-item h4 {
    font-size: 1rem;
  }
  
  /* Reduce font sizes in team member modals on mobile */
  .team-member-modal .modal-body p {
    font-size: 0.9rem;
  }
  
  .team-member-modal .modal-title {
    font-size: 1.1rem;
  }
}

/* Ensure team member modal appears above navbar */
.team-member-modal {
  z-index: 1200 !important;
}

.team-member-modal .modal-dialog {
  z-index: 1201 !important;
}

.team-member-modal.show {
  z-index: 1200 !important;
}

.team-member-modal.show .modal-dialog {
  z-index: 1201 !important;
}

/* Ensure modal backdrop is also above navbar */
.modal-backdrop.show {
  z-index: 1199 !important;
}

.team-member-modal + .modal-backdrop,
.modal-backdrop.team-member-modal-backdrop {
  z-index: 1199 !important;
}

/* Remove border and box shadow from modal close buttons */
.modal .btn-close,
.modal .btn-close:focus,
.modal .btn-close:hover,
.modal .btn-close:active {
  border: none;
  box-shadow: none;
  outline: none;
}

/* Change form input focus color to orange */
.form-control:focus,
.form-control:focus-visible {
  border-color: #ff7b25;
  box-shadow: inset 0 0 0.5rem rgba(255, 123, 37, 0.4), 0 0 0 0.4rem rgba(255, 123, 37, 0.25);
  outline: 0;
}

.form-check-input:focus {
  border-color: #ff7b25;
  box-shadow: inset 0 0 0.5rem rgba(255, 123, 37, 0.4), 0 0 0 0.4rem rgba(255, 123, 37, 0.25);
  outline: 0;
}

.form-check-input:checked {
  background-color: #ff7b25;
  border-color: #ff7b25;
}

/* Align checkbox block with input fields on mobile */
@media (max-width: 991.98px) {
  .form-check {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .form-check-input {
    margin-left: 0 !important;
    margin-top: 0.25rem;
    float: left;
  }
  
  .form-check-label {
    margin-left: 2em;
    display: block;
  }
}

/* Darken and blur background when modal is open */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-backdrop.show {
  opacity: 1;
}

/************************************************ team slider */

.team-slider__track {
  display: flex;
  gap: 2rem;
}

.team-slider .team-slide {
  flex: 0 0 78%; /* main slide width so neighbours peek in */
  max-width: 78%;
  opacity: 0.2;
  transform: scale(0.92);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.team-slider .team-slide.active {
  opacity: 1;
transform: scale(1);
}

.team-card__cta {
  border-color: #ff7b25;
  color: #ffffff;
}

.team-card__cta:hover {
  background-color: #ff7b25;
  border-color: #ff7b25;
  color: #132530;
}

.team-card__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ffffff;
  font-weight: 600;
  letter-spacing: 0.01rem;
  color: #ffffff;
  text-decoration: none;
}

.team-card__social-link:hover {
  background-color: #ffffff;
  color: #132530;
}

.team-card__website-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ffffff;
}

.team-card__website-icon {
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.team-card__website-link:hover {
  background-color: #ffffff;
  color: #132530;
}

.team-card__website-link:hover .team-card__website-icon {
  /* Convert to dark-blue (#132530) using CSS filter */
  filter: brightness(0) saturate(100%) invert(8%) sepia(15%) saturate(2000%) hue-rotate(180deg) brightness(0.2) contrast(1.2);
}

.team-slider__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #333;
  background-color: transparent;
  color: #333;
  font-size: 1.5rem;
  font-weight: 300;
  transition: all 0.3s ease;
}

.team-slider__control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  opacity: 1;
  border: 0;
  background: none;
  padding: 0;
  z-index: 10;
  cursor: pointer;
}

.team-slider__control:hover .team-slider__arrow {
  background-color: #333;
  color: #ffffff;
}

.team-slider__control--prev {
  left: 0;
}

.team-slider__control--next {
  right: 0;
}

@media (max-width: 991.98px) {
  .team-slider {
    margin-bottom: 3rem;
    padding-inline: 3rem;
  }

  .team-slide {
    flex-basis: 90%;
    max-width: 90%;
  }
  
  /* Make slider buttons smaller on mobile */
  .team-slider__arrow {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .team-card__name-and-title {
    height: 90px;
  }
}


/************************************************ news & media */

.img-news {
  max-height: 20rem;
  object-fit: contain;
}

.logos-img {
  max-height: 5rem;
  padding: 0.8rem;
  transition: transform 0.15s ease;
}

.logos-img:hover {
  transform: translateY(-2px);
}

/************************************************ news slider */

/* News Slider Container */
.news-slider {
  position: relative;
  max-width: 1250px;
  margin: 0 auto 3rem;
  padding: 0 4rem;
  overflow: hidden;
}

/* White background overlays to block cut-off slides */
.news-slider::before,
.news-slider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4rem;
  background-color: #ffffff;
  z-index: 5;
  pointer-events: none;
}

.news-slider::before {
  left: 0;
}

.news-slider::after {
  right: 0;
}

.news-slider .carousel-inner {
  display: flex;
  gap: 1.5rem;
  overflow: visible;
  transition: transform 0.8s ease-in-out;
  will-change: transform;
}

.news-slider .carousel-item {
  flex: 0 0 calc((100% - 3rem) / 3);
  max-width: calc((100% - 3rem) / 3);
  min-width: 0;
  margin-right: 0;
  opacity: 1 !important;
  display: block !important;
  visibility: visible !important;
}

.news-card {
  background-color: #f5f5f5;
  border-radius: 0.5rem;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  width: 100%;
}

.news-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-card__live-tag {
  background-color: #ff4a4a;
  color: #ffffff;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.news-card__logo {
  margin-bottom: 1rem;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card__image {
  height: 100%;
  min-height: 100px;
  max-height: 150px;
  width: auto;
  object-fit: contain;
}

.news-card__headline {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.news-card__description {
  font-size: 0.875rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.news-card__details {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-card__date {
  font-size: 0.7rem;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.news-card__actions {

  gap: 0.5rem;
  margin-top: auto;
}

.news-card__cta {
  background-color: #ff7b25;
  border-color: #ff7b25;
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 0.25rem;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background-color 0.3s ease;
}

.news-card__cta:hover {
  background-color: #e66a1a;
  border-color: #e66a1a;
  color: #ffffff;
}

.news-card__secondary-btn {
  background-color: #e9ecef;
  border-color: #e9ecef;
  color: #333;
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease;
}

.news-card__secondary-btn:hover {
  background-color: #dee2e6;
  border-color: #dee2e6;
  color: #333;
}

/* Navigation Arrows */
.news-slider__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #333;
  background-color: transparent;
  color: #333;
  font-size: 1.5rem;
  font-weight: 300;
  transition: all 0.3s ease;
}

.news-slider__control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  opacity: 1;
  border: 0;
  background: none;
  padding: 0;
  z-index: 10;
  cursor: pointer;
}

.news-slider__control:hover .news-slider__arrow {
  background-color: #333;
  color: #ffffff;
}

.news-slider__control--prev {
  left: 0;
}

.news-slider__control--next {
  right: 0;
}


@media (max-width: 991.98px) {
  .news-slider {
    margin-bottom: 3rem;
    padding-inline: 3rem;
  }

  .news-slider::before,
  .news-slider::after {
    width: 3rem;
  }

  .news-slider .carousel-inner {
    gap: 1rem;
  }

  .news-slider .carousel-item {
    flex: 0 0 calc((100% - 1rem) / 2);
    max-width: calc((100% - 1rem) / 2);
  }

  .news-card {
    padding: 1.25rem;
  }

  .news-card__headline {
    font-size: 1.25rem;
  }

  .news-card__description {
    font-size: 0.8rem;
  }
  
  /* Make slider buttons smaller on mobile */
  .news-slider__arrow {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}

@media (max-width: 755.98px) {
  .news-slider .carousel-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}