/* FONTS */

@font-face {
  font-family: "EniTab-Bold";
  src: url("/eniquantic/assets/fonts/EniTab-Bold.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "EniTab-Light";
  src: url("/eniquantic/assets/fonts/EniTab-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "EniTab";
  src: url("/eniquantic/assets/fonts/EniTabReg.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "OpenSans-Italic";
  src: url("/eniquantic/assets/fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "OpenSans";
  src: url("/eniquantic/assets/fonts/OpenSans-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "OpenSans-Bold";
  src: url("/eniquantic/assets/fonts/OpenSans-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: 700;
  font-style: bold;
}

@font-face {
  font-family: "OpenSans-SemiBold";
  src: url("/eniquantic/assets/fonts/OpenSans-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-weight: 600;
  font-style: normal;
}

body {
  padding-top: var(--header-offset, 0px);
}

h1 {
  font-family: "EniTab-Bold", sans-serif;
}
h2,
h3 {
  font-family: "EniTab", sans-serif;
}

h1 {
  font-size: 40px;
  color: #040832;
}

h2 {
  font-size: 40px;
  color: #040832;
}

h3 {
  font-size: 32px;
  color: #040832;
}

h5 {
  font-size: 20px;
  color: #040832;
}

p,
span {
  font-family: "OpenSans", sans-serif;
  font-size: 20px;
}

.eni-tab {
  font-family: "EniTab", sans-serif;
}

/* MENU & NAVBAR */

header {
  background-color: #040832;
  border-bottom: 1px solid white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100;
}

.navbar-toggler-icon {
  background-image: url("/eniquantic/assets/hamburger.svg");
}

.nav-container {
  background: linear-gradient(90deg, #040832 0%, #0958a5 100%);

  nav {
    color: white;
    font-family: "EniTab-bold", sans-serif;
    font-size: 14px;

    .nav-link {
      padding: 1rem 1rem 1rem 1.75rem;
      position: relative;
      display: inline-flex;
      align-items: center;
      font-size: 16px;
    }

    .nav-link:hover {
      text-decoration: underline;
    }

    .nav-link::before {
      content: "";
      position: absolute;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      left: 0.75rem;
      top: 50%;
      transform: translate(-5px, -70%);
      background-color: transparent;
      opacity: 0;
      transition: background-color 0.2s ease, opacity 0.2s ease;
    }

    .nav-link--active::before {
      background-color: #ffffff;
      opacity: 1;
    }
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(90deg, #040832 0%, #06417a 75%, #0e62b3 100%);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  color: white;
  padding: 32px 24px;
  overflow-y: auto;
  margin-top: 76px;
}

.overlay-close {
  position: absolute;
  top: 1.7rem;
  right: 2rem;
}

.overlay-nav {
  margin-top: 32px;
  width: 100%;
  gap: 32px;
  align-items: flex-start;
  justify-content: center;
}

@media (max-width: 767.98px) {
  body.menu-open header {
    display: none !important;
  }

  body.menu-open .overlay {
    margin-top: 0;
  }
}

.overlay-language-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
}

.overlay-language-button {
  border: none;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: "EniTab-Bold", sans-serif;
  font-size: 16px;
  line-height: 24px;
  padding: 4px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

.overlay-language-button.active {
  background: white;
  color: #040832;
  border: none;
}

.overlay-language-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.overlay-visit-link {
  display: flex;
  align-items: left;
  justify-content: left;
  text-decoration: none;
  font-family: "EniTab-Bold", sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #ffffff;
}

.overlay-visit-link:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.overlay-visit-highlight {
  font-size: 16px;
  font-family: "EniTab-Bold", sans-serif;

  text-decoration: underline;
  color: #e7a500;
  margin-left: 4px;
}

.overlay-link {
  font-family: "EniTab-Bold", sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #ffffff;
  margin: 0 !important;
  text-decoration: none;
}

.overlay-link:hover {
  text-decoration: underline;
}

header .logo img {
  max-height: 40px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.header-actions {
  gap: 24px;
  span {
    font-size: 16px;
  }
}

.header-visit-link {
  font-family: "EniTab", sans-serif;
  font-size: 14px;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.header-visit-text {
  font-family: "EniTab", sans-serif;
  font-size: 14px;
  color: #ffffff;
  text-decoration: none;
}

.header-visit-link:hover,
.header-visit-link:focus-visible {
  color: #ffffff;
}

.header-visit-highlight {
  font-family: "EniTab", sans-serif;
  color: #ffd300;
  font-size: 14px;
}

.language-selector {
  position: relative;
}

.language-select {
  border: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: transparent;
  border-radius: 999px;
  color: #ffffff;
  font-family: "EniTab", sans-serif;
  font-size: 14px;
  line-height: 1;
  padding: 6px 32px 6px 16px;
  cursor: pointer;
  min-width: 72px;
  background-image: url("/eniquantic/assets/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px 20px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.language-select:focus {
  outline: 1px solid #ffffff;
  outline-offset: 1px;
}

.language-select option {
  color: #040832;
}

.language-popover-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.language-popover {
  --bs-popover-bg: #ffffff;
  --bs-popover-border-color: #d4d4d4;
  --bs-popover-box-shadow: 0px 8px 32px rgba(4, 8, 50, 0.12);
  font-family: "EniTab", sans-serif;
  color: #040832;
  z-index: 1200;
  --bs-popover-arrow-display: none;
}

.language-popover .popover-arrow,
.language-popover .popover-arrow::before,
.language-popover .popover-arrow::after {
  display: none !important;
}

.language-popover .popover-body {
  padding: 16px 42px 16px 8px;
}

.language-popover-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.language-popover-option {
  border: none;
  background: transparent;
  color: #0958a5;
  font-family: "OpenSans-SemiBold", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 768px) {
  header .logo img {
    max-height: 28px;
  }

  header {
    border-bottom: none;
  }
}

/* HERO SECTION */

#hero-section {
  background: linear-gradient(90deg, #040832 0%, #0958a5 100%);
  color: white;

  h1 {
    color: white;
  }

  .hero-img {
    background-image: url("/eniquantic/assets/hero.png");
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    height: 492px;
  }

  .hero-content {
    display: flex;
    align-items: center;
    max-width: 1440px;
    margin-right: 84px;
  }

  .hero-text {
    margin-left: 0;
    padding-left: 56px;
    margin-right: 28px;
    text-align: justify;
  }
}

@media (max-width: 767.98px) {
  h1 {
    font-size: 32px;
    line-height: 36px;
  }

  p {
    font-size: 16px;
    line-height: 28px;
  }

  #hero-section {
    .hero-content {
      flex-direction: column;
      margin-right: 0;
      align-items: stretch;
    }
    h1 {
      font-size: 28px;
      line-height: 36px;
    }

    .hero-img {
      background-image: url("/eniquantic/assets/hero-mobile.png");
      background-position: bottom center;
      height: 229px;
      order: 1;
    }

    .hero-text {
      order: 2;
      padding: 24px;
      margin-right: 0;
      margin-left: 0;
      text-align: center !important;
    }

    .share-text {
      text-align: center;
    }
  }
}

.share-text-style {
  font-family: "EniTab", sans-serif;
  font-size: 16px;
}

/* WHAT WE DO SECTION */

#what-we-do-section .what-we-do-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 400px;
  color: #ffffff;
  padding: 32px 32px 24px 32px;
  border-radius: 24px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  p,
  h5 {
    color: #ffffff;
  }

  h5 {
    font-family: "EniTab-Bold", sans-serif;
  }

  p {
    font-size: 14px;
    margin-bottom: 0;
  }
}

#what-we-do-section .what-we-do-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(34, 34, 34, 0) 0%, #222222 67.52%);
  z-index: 0;
}

#what-we-do-section .what-we-do-card > * {
  position: relative;
  z-index: 1;
}

#what-we-do-section .what-we-do-card.card-hardware {
  background-image: url("/eniquantic/assets/Cards/quantum\ hardware.jpg");
}

#what-we-do-section .what-we-do-card.card-emulator {
  background-image: url("/eniquantic/assets/Cards/classical\ emulator.jpg");
}

#what-we-do-section .what-we-do-card.card-algorithms {
  background-image: url("/eniquantic/assets/Cards/quantum\ algorithms.jpg");
}

/* ABOUT SECTION */

#about-section {
  .text-bubble {
    background-color: #dbedff;
    border-radius: 24px;

    p {
      margin: 40px;
      font-size: 20px;
      color: #222222;
    }
  }
}

@media (max-width: 767.98px) {
  #about-section {
    .text-bubble {
      p {
        font-size: 16px;
      }
    }
  }
}

/* TECHNOLOGY SECTION */

.technology-card {
  border-radius: 16px;
  border: 1px solid #d4d4d4;
  padding: 24px;
  height: 100%;

  .technology-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 32px;
  }

  h5 {
    font-family: "EniTab-Bold", sans-serif;
  }

  p {
    font-size: 14px;
    color: #666666;
  }
}

.swiper-wrapper {
  margin-bottom: 48px;
}

/* Card del carosello */
.technology-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #fff;
  box-shadow: 0px 4px 16px 0px #0305511f;
}

/* Forza altezza uniforme delle slide */
.swiper-slide {
  display: flex !important;
  height: auto !important;
}

/* Paginazione (pallini) */
.swiper-pagination-bullet {
  width: 12px !important;
  height: 12px !important;
  background: #888888;
}

.swiper-pagination-bullet-active {
  background: #0074a7;
}

.team-swiper-pagination {
  padding-bottom: 4px;
}

#application-section {
  background-color: #effaff;
}

/* TEAM SECTION */
.team-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 16px;
  border-radius: 16px;
  border: 1px solid #d4d4d4;
  box-shadow: 0px 4px 16px 0px #0305511f;
  /* .row{
        height: 100px;
    }*/

  h5 {
    font-family: "EniTab-Bold", sans-serif;
  }
}

@media (max-width: 768px) {
  .team-card {
    width: 100%;
  }
}

.team-card > .row {
  flex-grow: 1;
}

/*@media (max-width: 768px) {
    .team-card > .row {
    flex-grow: 1;
}}*/

.team-card-description {
  font-size: 14px;
  color: #222222;
}

.team-card_image {
  width: 74px;
  height: 94px;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.team-card-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e6e6e6;
  display: flex;
  align-items: center;
}

.team-card__linkedin {
  display: inline-flex;
  line-height: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  text-decoration: none;
}

.text-link__linkedin {
  font-family: "EniTab-Bold", sans-serif;
  font-size: 14px;
  letter-spacing: 3%;
  color: #0958a5;
}

.team-card__linkedin-icon {
  width: 20px;
  height: 20px;
}

/* CARREERS SECTION */

#carrers-section {
  padding-bottom: 40px;
  margin-top: 80px;
}

.btn-white {
  background-color: white;
  color: #040832;
  border: none;
  border-radius: 59px;
  padding: 16px 32px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  span {
    color: #040832;
    font-family: "EniTab-bold", sans-serif;
    font-size: 16px;
    font-weight: 400;
  }
}

.btn-white:hover {
  background-color: #dbedff;
}

.btn-bordered {
  background-color: white;
  color: #040832;
  border: 2px solid #040832;
  border-radius: 59px;
  padding: 16px 32px;
  font-family: "EniTab-bold", sans-serif;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  display: inline-block;
  text-transform: uppercase;
}

.btn-bordered:hover {
  background-color: #dbedff;
}

.jumbo-card {
  border-radius: 24px;

  .jumbo-card-image {
    border-bottom-left-radius: 24px;
    border-top-left-radius: 24px;
    background-image: url("/eniquantic/assets/team/Gruppo2-01.jpg");
    background-size: cover;
    background-position: center;
  }

  .jumbo-card-text {
    border-bottom-right-radius: 24px;
    border-top-right-radius: 24px;
    color: white !important;
    padding: 80px 64px;
    background-color: #06417a;

    h1,
    h2 {
      color: white !important;
    }

    p {
      font-size: 16px;
    }
  }
}

.jumbo-card-link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  #carrers-section {
    margin-top: 40px;
    padding-bottom: 0px !important;
  }

  .jumbo-card {
    border-bottom-right-radius: 0px;
    border-top-right-radius: 0px;
  }

  .jumbo-card-text {
    border-bottom-right-radius: 0px !important;
    border-top-right-radius: 0px !important;
    padding: 40px 16px !important;
    h2 {
      font-size: 24px !important;
      font-family: "EniTab-Bold";
    }

    p {
      font-size: 14px;
    }
  }
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

.justify-content-left {
  justify-content: flex-start !important;
}

.footer {
  background-color: #040832;
  color: #ffffff;
  font-family: "OpenSans", sans-serif;
}

.footer-logo {
  max-height: 56px;
}

.footer-social-link {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-social-link img {
  width: 32px;
  height: 32x;
}

.footer-social-link:hover {
  background-color: rgba(255, 255, 255, 0.28);
}

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.footer-section-title,
.footer-info-title,
.footer-info-text {
  font-size: 12px;
}

.footer-section-title {
  text-transform: uppercase;
  font-family: "OpenSans-bold", sans-serif;
  font-weight: bold;
  color: #89c4fd;
}

.footer-info-title {
  font-family: "OpenSans-bold", sans-serif;
  font-weight: bold;
  color: #89c4fd;
}

.footer-note {
  font-size: 12px;
  line-height: 1.5;
}

.footer-link {
  font-family: "EniTab-Bold", sans-serif;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;

  span {
    font-family: "EniTab-Bold", sans-serif;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
  }
}

.footer-link-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-link-icon img {
  width: 100%;
  height: 100%;
}

.footer-link:hover {
  color: #3f86e2;
}

/* Hide horizontal menu and language selector on small screens */
@media (max-width: 767.98px) {
  nav.d-md-flex,
  .language-selector.d-md-block {
    display: none !important;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  #team-section .team-swiper {
    /* padding-bottom: 32px; */
  }

  .footer {
    text-align: left;
  }

  .footer .row.align-items-center {
    align-items: flex-start;
  }

  .footer-social-link {
    background-color: rgba(255, 255, 255, 0.2);
  }

  .footer-info-title,
  .footer-section-title {
    text-transform: uppercase;
  }

  .footer-note {
    margin-top: 24px;
  }
}

@media (max-width: 991px) {
  .share-control {
    display: flex;

    .share-menu {
      left: 50% !important;
      transform: translate(-50%, 16px) !important;
      height: 100px;

      &::before {
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
      }

      &.is-visible {
        transform: translate(-50%, 0);
      }

      .share-menu__list {
        gap: 24px !important;
      }
    }
  }
}

.share-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: "EniTab";
  color: #ffffff;

  .share-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;

    &:hover,
    &:focus {
      color: inherit;
    }

    &:focus {
      outline: 2px solid #0d3fa0;
      outline-offset: 4px;
    }

    .share-trigger__icon {
      display: inline-flex;
      align-items: center;
    }
  }

  .share-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    padding: 16px 20px;
    background: #ffffff;
    min-width: 240px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 20;

    &.is-visible {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateY(0);
    }

    .share-menu__list {
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 32px;
      margin: 0;
      padding: 0;
    }

    .share-menu__button {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border-radius: 999px;
      border: none;
      color: #0d3fa0;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;

      &:hover,
      &:focus {
        color: #ffffff;
      }

      &:focus {
        outline: 2px solid #0d3fa0;
        outline-offset: 3px;
      }

      &::after {
        content: "Link copied";
        position: absolute;
        bottom: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        background: #222;
        color: #ffffff;
        font-size: 12px;
        font-family: "EniTab";
        padding: 4px 10px;
        border-radius: 4px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        white-space: nowrap;
        z-index: 1;
      }

      &::before {
        content: "";
        position: absolute;
        bottom: calc(100%);
        left: 50%;
        transform: translateX(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: #222 transparent transparent transparent;
        opacity: 0;
        transition: opacity 0.2s ease;
        z-index: 1;
      }

      &.share-menu__button--copied::after,
      &.share-menu__button--copied::before {
        opacity: 1;
      }
    }

    .share-menu__icon {
      display: block;
      background-color: white;
      width: 32px;
      height: 32px;
    }
  }
}

.back-to-top-btn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  cursor: pointer;

  border: none;
  background-color: transparent;
  padding: 0;

  width: 50px;
  height: 50px;

  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: none;

  transition: opacity 0.3s, transform 0.3s;
}

.back-to-top-btn img {
  width: 100%;
  height: 100%;
  display: block;
}

.back-to-top-btn:hover {
  opacity: 0.8;
  transform: scale(1.05);
  background-color: transparent;
}

.mobile-only {
  display: none !important;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .back-to-top-btn {
    width: 40px;
    height: 40px;
    right: 16px;
    bottom: 16px;
  }
}
