.fullscreen-menu ul {
  padding-top: 104px;
}

.fullscreen-menu.open .menu-link {
  animation: menuLinkIn .5s ease both;
}

.fullscreen-menu.open li:nth-child(2) .menu-link { animation-delay: .06s; }
.fullscreen-menu.open li:nth-child(3) .menu-link { animation-delay: .12s; }
.fullscreen-menu.open li:nth-child(4) .menu-link { animation-delay: .18s; }
.fullscreen-menu.open li:nth-child(5) .menu-link { animation-delay: .24s; }

.hero-home {
  perspective: 1200px;
}

.hero-floating a,
.masked-logo,
.masked-logo div {
  will-change: transform, opacity;
}

.hero-floating a {
  opacity: 0;
  transform: translateY(28px);
  animation: heroTextIn .8s ease forwards;
}

.hero-floating a:nth-child(2) { animation-delay: .1s; }
.hero-floating a:nth-child(3) { animation-delay: .2s; }
.hero-floating a:nth-child(4) { animation-delay: .3s; }

.masked-logo {
  transform: scale(.94);
  animation: heroLogoIn 1s cubic-bezier(.19, 1, .22, 1) .12s forwards;
  max-width: 700px;
  width: 100%;
  height: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
}

.masked-logo img {
  -webkit-mask-image: url("../images/o.png");
  mask-image: url("../images/o.png");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transform: scale(var(--hero-img-scale, 1));
  transform-origin: center;
}

.masked-logo h1 {
  color: var(--red);
  font-size: clamp(2rem, 6vw, 3.2rem);
}

.masked-logo p {
  font-size: clamp(.52rem, 1.65vw, .95rem);
}

.training-list .list-row {
  grid-template-columns: minmax(260px, 1fr) minmax(240px, .9fr);
  cursor: pointer;
  transition: background-color .3s ease, padding-left .3s ease;
}

.training-list .list-row:hover,
.training-list .list-row:focus {
  background: rgba(0, 0, 0, .018);
  padding-left: .75rem;
}

.training-list .list-summary {
  margin: 0;
  color: #666;
  font-family: monospace;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.training-list .list-detail {
  grid-column: 2;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  color: #666;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.7;
  transition: max-height .5s ease, opacity .35s ease, margin-top .35s ease;
}

.training-list .list-row:hover .list-detail,
.training-list .list-row:focus .list-detail {
  max-height: 180px;
  margin-top: .85rem;
  opacity: 1;
}

.scheme-slider {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scheme-slider::-webkit-scrollbar {
  display: none;
}

.scheme-panel {
  min-width: 100vw;
  height: clamp(500px, 80vh, 720px);
}

.scheme-content,
.scheme-panel b {
  transform: translateY(24px);
  opacity: 0;
  transition: transform .7s ease, opacity .7s ease;
}

.scheme-panel.is-visible .scheme-content,
.scheme-panel.is-visible b {
  transform: translateY(0);
  opacity: 1;
}

.image-card {
  display: block;
  width: min(100%, 470px);
  isolation: isolate;
  transition: transform .5s ease, opacity .7s ease;
}

.image-card.ms-auto {
  margin-left: auto !important;
}

.image-card img {
  display: block;
  z-index: 0;
  opacity: 1;
  visibility: visible;
  transition: transform .7s ease;
}

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

.image-card div,
.image-card:after {
  z-index: 1;
}

.visual-tile {
  transition: transform .6s ease, opacity .7s ease;
}

.about-teaser .row {
  margin-top: 2rem;
}

.faq-section {
  border-top: 1px solid #eee;
}

.faq-intro h2 span,
.faq-intro h2 strong,
.faq-intro h2 em {
  display: block;
  font-style: normal;
}

.faq-intro h2 span {
  color: #6b7280;
}

.faq-intro h2 strong {
  color: var(--red);
}

.faq-intro h2 em {
  color: #59606a;
}

.faq-intro p {
  color: #666;
  font-size: 1.05rem;
  line-height: 1.8;
}

.faq-section details {
  transition: background-color .3s ease;
}

.faq-section details:hover,
.faq-section details[open] {
  background: #fafafa;
}

.faq-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-section summary:after {
  content: "+";
  color: var(--red);
  flex: 0 0 auto;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  transition: transform .25s ease;
}

.faq-section details[open] summary {
  color: var(--red);
}

.faq-section details[open] summary:after {
  transform: rotate(45deg);
}

.reveal-item {
  opacity: 0;
  transform: translateY(35px) scale(0.96);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item img { transition: inherit; }

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-item:nth-child(2) { transition-delay: 0.12s; }
.reveal-item:nth-child(3) { transition-delay: 0.24s; }
.reveal-item:nth-child(4) { transition-delay: 0.36s; }

.zigzag .image-card.reveal-item {
  transform: translateY(100px) scale(0.88);
  transition: opacity 1.2s cubic-bezier(0.2, 1, 0.3, 1), transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.zigzag .image-card.reveal-item.is-visible {
  transform: translateY(0) scale(1);
}

@keyframes heroTextIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroLogoIn {
  to {
    transform: scale(1);
  }
}

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

@media (max-width: 767px) {
  .fullscreen-menu ul {
    padding-top: 96px;
  }

  .masked-logo {
    height: auto;
    aspect-ratio: 1;
  }

  .masked-logo h1 {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  .masked-logo p {
    letter-spacing: .38em;
  }

  .training-list .list-row {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .training-list .list-detail {
    grid-column: 1;
  }

  .scheme-content h1 {
    font-size: clamp(1.6rem, 10vw, 2.4rem);
  }

  .faq-section summary {
    padding: 1.2rem .6rem;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-floating a,
  .masked-logo,
  .reveal-item,
  .scheme-content,
  .scheme-panel b {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.masked-logo h1 {
  font-size: clamp(1.9rem, 5.5vw, 3rem) !important;
  text-align: center;
}

.training-list h2.txtred {
  color: #3B4B5A; /* Dark color for "Campaigns" part, same as Core Technology */
  text-transform: uppercase;
  font-weight: 900; /* Bold weight like Energica logo */
  letter-spacing: -0.08em; /* Tight spacing like the branding */
  font-size: clamp(2rem, 4.2vw, 2.65rem); /* Same size scale as brand name */
  line-height: 0.9;
}

.training-list h2.txtred span {
  color: var(--red); /* Red color for "Training" */
}

.masked-logo h2 {
  font-size: clamp(1rem, 2.5vw, 1.35rem) !important;
  font-weight: 700 !important;
  color: #4b5563 !important; /* Professional gray color for contrast */
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-top: 0.5rem !important;
}

.scheme-content h2 {
  color: #fff;
  font-size: clamp(1.8rem, 5vw, 2.25rem) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -0.05em !important;
  margin: 1.1rem 0;
  text-align: center;
  text-transform: uppercase !important;
}

.hero-home + .white-section {
  padding-top: 0 !important;
}

.about-teaser .row {
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.scheme-content,
.scheme-panel b {
  will-change: opacity, transform;
}

.scheme-panel.is-visible .scheme-content,
.scheme-panel.is-visible b {
  will-change: auto;
}

main img.image-reveal {
  transition: opacity .7s ease, transform .85s cubic-bezier(.2, 1, .3, 1), filter .45s ease;
}

main img.image-reveal.is-visible {
  opacity: var(--image-final-opacity, 1);
  transform: translate3d(0, 0, 0) scale(1);
}

@media (max-width: 767px) {
  .masked-logo h1 {
    font-size: clamp(1.7rem, 8vw, 2.35rem) !important;
  }
}
