/* Website Enhancements - Updates CSS */

/* ============================================
   FOOTER IMPROVEMENTS
   ============================================ */

/* Add subtitle under footer logo */
.footer-top .logo::after {
  content: "ALL COMMUNICATION";
  display: block;
  margin: 12px 0 0 0;
  font-family: "Britanica-Regular", sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 120%;
  text-transform: uppercase;
  color: #fff8f5;
  opacity: 0.8;
}

/* Fix footer text alignment and padding */
.footer-cols {
  align-items: flex-start;
}

.footer-cols__col {
  padding: 0;
}

/* Ensure consistent background, remove visual breaks */
.wrap--contacts {
  background: url(../img/bgs/contacts-bg.png) right bottom no-repeat, linear-gradient(180deg, #000111 0%, #0B1A85 148.47%), linear-gradient(180deg, #000111 0%, #142EEB 100%);
  margin-bottom: 0;
}

.wrap-footer {
  background: #000111;
  margin-top: 0;
}

/* ============================================
   HOMEPAGE INTRO IMPROVEMENTS
   ============================================ */

/* Slightly raise first section to show scroll start and number animation */
.wrap--hero {
  margin-bottom: 0;
  padding-bottom: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.accordion__content p {
    max-width: 640px;
  }
  
/* Toggle visibility for hero content (text and CTA) */
.hero-content.hide-content .hero-content__title,
.hero-content.hide-content .hero-content__btn {
  display: none;
}

/* Hero button as cursor for hero section */
.wrap--hero {
  cursor: none !important;
}

.wrap--hero * {
  cursor: none !important;
}

/* Remove positioning from hero button */
.hero-content__btn {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transition: none !important;
}

/* Hide original button position */
.wrap--hero .hero-content .hero-content__btn {
  visibility: hidden !important;
}

/* Show button as cursor - remove ALL transitions and animations */
.hero-content__btn.cursor-active,
.hero-content__btn.cursor-active *,
.hero-content__btn.cursor-active::before,
.hero-content__btn.cursor-active::after,
.hero-content__btn.cursor-active *::before,
.hero-content__btn.cursor-active *::after,
.hero-content__btn.cursor-active span,
.hero-content__btn.cursor-active span *,
.hero-content__btn.cursor-active span::before,
.hero-content__btn.cursor-active span::after,
.hero-content__btn.cursor-active i,
.hero-content__btn.cursor-active i *,
.hero-content__btn.cursor-active i::before,
.hero-content__btn.cursor-active i::after,
.hero-content__btn.cursor-active:hover,
.hero-content__btn.cursor-active:hover *,
.hero-content__btn.cursor-active:hover::before,
.hero-content__btn.cursor-active:hover::after,
.hero-content__btn.cursor-active:hover span,
.hero-content__btn.cursor-active:hover span *,
.hero-content__btn.cursor-active:hover span::before,
.hero-content__btn.cursor-active:hover span::after,
.hero-content__btn.cursor-active:hover i,
.hero-content__btn.cursor-active:hover i *,
.hero-content__btn.cursor-active:hover i::before,
.hero-content__btn.cursor-active:hover i::after {
  transition: none !important;
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
  animation: none !important;
  -webkit-animation: none !important;
  -moz-animation: none !important;
  -o-animation: none !important;
}

/* Button positioning - optimized for GSAP animation */
/* GSAP handles positioning via transform, so we just set base styles */
.hero-content__btn.cursor-active {
  position: fixed !important;
  pointer-events: auto !important;
  z-index: 99999 !important;
  margin: 0 !important;
  /* GSAP will handle left, top, transform via JavaScript */
}

/* Prevent any transform on children */
.hero-content__btn.cursor-active span,
.hero-content__btn.cursor-active:hover span {
  transform: none !important;
}

.hero-content__btn.cursor-active i,
.hero-content__btn.cursor-active:hover i {
  transform: none !important;
}

/* Ensure number animations are visible on initial load */
.wrap--moments {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.moments__title {
  opacity: 1;
  visibility: visible;
  will-change: contents;
}

/* ============================================
   CHI SIAMO ANIMATIONS
   ============================================ */

/* Initial state for fade-in animations */
.desc-list__img {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.desc-list__content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out 0.3s, transform 0.8s ease-out 0.3s;
}

/* Animated state */
.desc-list__img.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.desc-list__content.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Remove scaling effect on accordion titles */
.accordion__title {
  transform: none !important;
  transition: none !important;
}

.accordion__item.is-active .accordion__title {
  transform: none !important;
}

.accordion__title:hover {
  transform: none !important;
}

/* Expand values section background to full width */
.wrap--values {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

.wrap--values .container {
  max-width: 100%;
  width: 100%;
}

@media only screen and (min-width: 1100px) {
  .wrap--values {
    padding-left: 40px;
    padding-right: 40px;
  }
  
  .wrap--values .container {
    max-width: 1680px;
    margin: 0 auto;
  }
}

/* ============================================
   SERVIZI PARALLAX EFFECT
   ============================================ */

/* Parallax container setup */
.wrap--path {
  position: relative;
  overflow: hidden;
}

.path {
  position: relative;
  will-change: transform;
}

/* Parallax background layer */
.path::before {
  will-change: transform;
}

.path::after {
  will-change: transform;
}

/* Enhanced parallax for path shapes */
@media only screen and (min-width: 767px) {
  .path::before,
  .path::after {
    transition: transform 0.1s linear;
  }
}

/* ============================================
   SETTE TEMPI INTERACTIVE BEHAVIOR
   ============================================ */

/* Base state - all items have blue background */
.time-slider__item {
  background: #142eeb;
  transition: all 0.4s ease;
}

/* Inactive state: blue title (lighter blue for visibility), large size, title only */
.time-slider__item:not(.is-active) .time-slider__title {
  color: #83cfff;
  font-size: 40px;
  line-height: 120%;
  transition: color 0.4s ease, font-size 0.4s ease;
}

.time-slider__item:not(.is-active) .time-slider__txt {
  display: none !important;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  transition: opacity 0.4s ease, max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
}

/* Active state: white title, normal size, show description */
.time-slider__item.is-active {
  background: #142eeb;
}

/* Swiper active slide - darker blue background */
.time-slider__item.swiper-slide-active {
  background: #0B1667 !important;
}

.time-slider__item.is-active .time-slider__title {
  color: #fff8f5;
  font-size: 32px;
  line-height: 120%;
  transition: color 0.4s ease, font-size 0.4s ease;
}

.time-slider__item.is-active .time-slider__txt {
  display: block !important;
  opacity: 1;
  max-height: 500px;
  margin-top: 35px;
  padding: 0;
  transition: opacity 0.4s ease 0.2s, max-height 0.4s ease 0.2s, margin 0.4s ease 0.2s, padding 0.4s ease 0.2s;
}

/* Reduce spacing between elements on scroll */
.time-slider__wrap {
  gap: 8px;
}

@media only screen and (min-width: 600px) {
  .time-slider__item:not(.is-active) .time-slider__title {
    font-size: 48px;
  }
  
  .time-slider__item.is-active .time-slider__title {
    font-size: 32px;
  }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media only screen and (min-width: 1100px) {
  /* Footer subtitle desktop */
  .footer-top .logo::after {
    font-size: 12px;
    margin: 16px 0 0 0;
  }

  /* Values section desktop padding */
  .wrap--values {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media only screen and (min-width: 1600px) {
  .footer-top .logo::after {
    font-size: 14px;
  }
}

/* ============================================
   SCROLL ANIMATIONS - INITIAL STATES
   ============================================ */

/* GSAP will handle visibility - no need to hide via CSS */

/* ============================================
   HOMEPAGE: REDUCE PADDING ON BEST SLIDER HOVER
   ============================================ */
@media only screen and (min-width: 1100px) {
  .best-slider__item:hover .best-slider__content {
    bottom: 20px;
    left: 40px;
    right: 40px;
  }
}

/* ============================================
   HOMEPAGE: PARALLAX EFFECT FOR BALLS
   ============================================ */
.balls__item {
  will-change: transform;
}

/* ============================================
   FOOTER: TWO-LINE CTA TEXT AND SEAMLESS TRANSITION
   ============================================ */
.contacts__btn span {
  white-space: normal;
  line-height: 1.2;
  padding: 10px 20px;
  text-align: center;
  display: inline-block;
  max-width: 200px;
}

@media only screen and (min-width: 767px) {
  .contacts__btn span {
    max-width: none;
  }
}

/* Seamless footer transition */
.wrap--contacts {
  background: url(../img/bgs/contacts-bg.png) right bottom no-repeat, 
              linear-gradient(180deg, #000111 0%, #0B1A85 148.47%), 
              linear-gradient(180deg, #000111 0%, #142EEB 100%);
  margin-bottom: 0;
  padding-bottom: 60px;
}

.wrap-footer {
  background: linear-gradient(180deg, #142EEB 0%, #000111 20%);
  margin-top: -40px;
  padding-top: 60px;
}

@media only screen and (min-width: 1100px) {
  .wrap--contacts {
    background: url(../img/bgs/desktop/contacts-bg.png) right bottom no-repeat, 
                linear-gradient(180deg, #000111 0%, #0b1a85 148.47%), 
                linear-gradient(180deg, #000111 0%, #142eeb 100%);
    padding-bottom: 80px;
  }
  
  .wrap-footer {
    margin-top: -60px;
    padding-top: 80px;
  }
}

/* ============================================
   PROJECTS: HERO TEXT POSITION AND VISIBILITY
   ============================================ */
.wrap--hero-page .hero-content {
  top: 45%;
}

.wrap--projects {
  margin-top: -150px;
  padding-top: 0;
}

.projects-list {
  opacity: 1;
  visibility: visible;
}

.projects-list__item {
  opacity: 1;
  transform: none;
}

/* ============================================
   SERVICES: HERO TEXT POSITION
   ============================================ */
.services .wrap--hero-page .hero-content,
.wrap--hero-page.services .hero-content {
  top: 45%;
}

/* ============================================
   WHO: HERO TEXT POSITION
   ============================================ */
.who .wrap--hero-page .hero-content,
.wrap--hero-page.who .hero-content {
  top: 45%;
}

/* ============================================
   WHO: FIX ACCORDION OPENING EFFECT
   ============================================ */
.accordion__content {
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  display: block !important;
}

.accordion__item {
  min-height: auto;
  transition: background-color 0.3s ease-in-out;
  position: relative;
}

.accordion__item.is-active .accordion__content {
  min-height: auto;
  display: block !important;
}

/* Smooth transition for content */
.accordion__content {
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Prevent text rendering causing layout shift */
.accordion__content p {
  margin: 0;
  padding: 16px 0 0 0;
  will-change: auto;
  backface-visibility: hidden;
}

/* ============================================
   ACCORDION VALUES: FADE-IN ANIMATION
   ============================================ */
/* Initial state - hide accordion items (GSAP will handle animation) */
.accordion--values .accordion__item {
  opacity: 0;
  transform: translateY(30px);
  /* No CSS transition - GSAP handles all animations */
}

