/* ==========================================================
   WEBPLAN - HERO MODERNA
   CSS indipendente dalla vecchia hero
   ========================================================== */

#heroModern {
  --wp-header-height: 85px;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #0b1424;
}

#wpHeroCarousel {
  width: 100%;
  margin: var(--wp-header-height) 0 0;
  padding: 0;
}

#heroModern .carousel-inner {
  overflow: hidden;
}

/* ==========================================================
   SLIDE
   ========================================================== */

.wp-hero-slide {
  --wp-accent: #d9232d;
  --wp-accent-rgb: 217, 35, 45;
  --wp-button-background: var(--wp-accent);
  --wp-button-border: var(--wp-accent);
  --wp-button-color: #ffffff;

  position: relative;
  align-items: center;
  min-height: clamp(
    620px,
    calc(100svh - var(--wp-header-height)),
    780px
  );
  overflow: hidden;
  color: #ffffff;

  background:
    radial-gradient(
      circle at 78% 25%,
      rgba(var(--wp-accent-rgb), 0.32) 0,
      rgba(var(--wp-accent-rgb), 0.08) 30%,
      transparent 55%
    ),
    linear-gradient(
      135deg,
      #08111f 0%,
      #12223a 55%,
      #0b1424 100%
    );
}

/*
 * Bootstrap deve poter nascondere le slide inattive.
 * Flex viene applicato soltanto alla slide attiva e a quelle
 * temporaneamente coinvolte nel cambio slide.
 */
#heroModern .wp-hero-slide.active,
#heroModern .wp-hero-slide.carousel-item-next,
#heroModern .wp-hero-slide.carousel-item-prev {
  display: flex;
}

/* ==========================================================
   PALETTE DEI PRODOTTI
   ========================================================== */

/* RelaxBooking */
.wp-hero-relax {
  --wp-accent: #26d0ce;
  --wp-accent-rgb: 38, 208, 206;
  --wp-button-background: linear-gradient(135deg, #126aa0, #09b7c9);
  --wp-button-border: #09b7c9;

  background:
    radial-gradient(
      circle at 82% 22%,
      rgba(38, 208, 206, 0.34) 0,
      rgba(9, 183, 201, 0.14) 28%,
      transparent 54%
    ),
    radial-gradient(
      circle at 15% 90%,
      rgba(245, 166, 35, 0.12) 0,
      transparent 38%
    ),
    linear-gradient(
      135deg,
      #071a3d 0%,
      #0b2c66 48%,
      #126aa0 100%
    );
}

/* OfficinaCloud */
.wp-hero-officina {
  --wp-accent: #f39a3e;
  --wp-accent-rgb: 243, 154, 62;
  --wp-button-background: linear-gradient(135deg, #7b2318, #c63f16);
  --wp-button-border: #c63f16;

  background:
    radial-gradient(
      circle at 82% 20%,
      rgba(243, 154, 62, 0.3) 0,
      rgba(198, 63, 22, 0.12) 31%,
      transparent 55%
    ),
    radial-gradient(
      circle at 12% 90%,
      rgba(198, 63, 22, 0.23) 0,
      transparent 38%
    ),
    linear-gradient(
      135deg,
      #261c1b 0%,
      #4a1d16 50%,
      #7b2318 100%
    );
}

/* CassaFlash */
.wp-hero-cassa {
  --wp-accent: #ffd54a;
  --wp-accent-rgb: 255, 213, 74;
  --wp-button-background: #ffd54a;
  --wp-button-border: #ffd54a;
  --wp-button-color: #111827;

  background:
    radial-gradient(
      1200px 600px at 10% 10%,
      rgba(255, 213, 74, 0.2),
      transparent 60%
    ),
    radial-gradient(
      1000px 500px at 90% 20%,
      rgba(65, 209, 127, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 30% 90%,
      rgba(71, 120, 255, 0.14),
      transparent 55%
    ),
    #0b1220;
}

/* Easy Concierge */
.wp-hero-concierge {
  --wp-accent: #9b6cff;
  --wp-accent-rgb: 155, 108, 255;
  --wp-button-background: linear-gradient(135deg, #7041cf, #9b6cff);
  --wp-button-border: #9b6cff;

  background:
    radial-gradient(
      circle at 82% 22%,
      rgba(155, 108, 255, 0.34) 0,
      rgba(155, 108, 255, 0.1) 30%,
      transparent 55%
    ),
    linear-gradient(
      135deg,
      #120d25 0%,
      #241444 53%,
      #432278 100%
    );
}

/* ==========================================================
   DECORAZIONI DELLO SFONDO
   ========================================================== */

.wp-hero-slide::before,
.wp-hero-slide::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.wp-hero-slide::before {
  right: -220px;
  bottom: -330px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.wp-hero-slide::after {
  right: -80px;
  bottom: -250px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(var(--wp-accent-rgb), 0.35);
}

.wp-hero-container {
  position: relative;
  z-index: 2;
  padding-top: 55px;
  padding-bottom: 95px;
}

/* ==========================================================
   TESTI
   ========================================================== */

.wp-hero-content {
  position: relative;
  z-index: 3;
}

.wp-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 8px 14px;
  border: 1px solid rgba(var(--wp-accent-rgb), 0.45);
  border-radius: 50px;
  background: rgba(var(--wp-accent-rgb), 0.12);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.wp-hero-eyebrow i {
  color: var(--wp-accent);
  font-size: 17px;
}

.wp-hero-title {
  margin: 0 0 20px;
  color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -2px;
}

.wp-hero-title span {
  color: var(--wp-accent);
}

.wp-hero-text {
  max-width: 590px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.79);
  font-size: 18px;
  line-height: 1.7;
}

/* ==========================================================
   PUNTI DI FORZA
   ========================================================== */

.wp-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 31px;
  padding: 0;
  list-style: none;
}

.wp-hero-points li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.wp-hero-points i {
  color: var(--wp-accent);
}

/* ==========================================================
   PULSANTI
   ========================================================== */

.wp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wp-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 49px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.wp-hero-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.wp-hero-btn-primary {
  border-color: var(--wp-button-border);
  background: var(--wp-button-background);
  color: var(--wp-button-color);
  box-shadow: 0 12px 30px rgba(var(--wp-accent-rgb), 0.28);
}

.wp-hero-btn-primary:hover {
  color: var(--wp-button-color);
  box-shadow: 0 16px 35px rgba(var(--wp-accent-rgb), 0.4);
}

.wp-hero-btn-outline {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.wp-hero-btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* ==========================================================
   IMMAGINE / MOCKUP
   ========================================================== */

.wp-hero-visual {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  padding: 25px 28px 38px;
  opacity: 0;
  transform: translateX(45px) scale(0.97);
}

.wp-hero-visual::before {
  content: "";
  position: absolute;
  top: 4%;
  left: 8%;
  width: 84%;
  height: 85%;
  border-radius: 50%;
  background: rgba(var(--wp-accent-rgb), 0.25);
  filter: blur(65px);
  pointer-events: none;
}

.wp-hero-screen {
  position: relative;
  z-index: 2;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 35px 80px rgba(0, 0, 0, 0.45),
    0 10px 25px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: rotate(-1deg);
}

.wp-hero-screen-bar {
  display: flex;
  align-items: center;
  min-height: 39px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.7);
}

.wp-hero-screen-bar small {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.wp-hero-screen-dots {
  display: flex;
  gap: 6px;
}

.wp-hero-screen-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.wp-hero-screen-dots span:nth-child(1) {
  background: #ff605c;
}

.wp-hero-screen-dots span:nth-child(2) {
  background: #ffbd44;
}

.wp-hero-screen-dots span:nth-child(3) {
  background: #00ca4e;
}

.wp-hero-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 15px;
  background: #111827;
}

.wp-hero-image {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================================
   RIQUADRO FLOTTANTE
   ========================================================== */

.wp-hero-floating-card {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 225px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(8, 17, 31, 0.86);
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.wp-hero-floating-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 12px;
  background: rgba(var(--wp-accent-rgb), 0.16);
  color: var(--wp-accent);
  font-size: 21px;
}

.wp-hero-floating-card strong,
.wp-hero-floating-card small {
  display: block;
}

.wp-hero-floating-card strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.wp-hero-floating-card small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

/* ==========================================================
   INDICATORI
   ========================================================== */

.wp-hero-indicators {
  z-index: 10;
  bottom: 24px;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.wp-hero-indicators [data-bs-target] {
  --wp-indicator-color: #d9232d;
  --wp-indicator-text: #ffffff;

  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-indent: 0;
  opacity: 1;
  transition: 0.3s ease;
}

.wp-hero-indicators [data-bs-slide-to="0"] {
  --wp-indicator-color: #09b7c9;
}

.wp-hero-indicators [data-bs-slide-to="1"] {
  --wp-indicator-color: #c63f16;
}

.wp-hero-indicators [data-bs-slide-to="2"] {
  --wp-indicator-color: #ffd54a;
  --wp-indicator-text: #111827;
}

.wp-hero-indicators [data-bs-slide-to="3"] {
  --wp-indicator-color: #9b6cff;
}

.wp-hero-indicators [data-bs-target].active {
  border-color: var(--wp-indicator-color);
  background: var(--wp-indicator-color);
  color: var(--wp-indicator-text);
}

/* ==========================================================
   FRECCE
   ========================================================== */

.wp-hero-control {
  z-index: 8;
  width: 72px;
  opacity: 1;
}

.wp-hero-control-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 21px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: 0.3s ease;
}

.wp-hero-control:hover .wp-hero-control-circle {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.17);
  color: #ffffff;
}

/* ==========================================================
   ANIMAZIONI
   ========================================================== */

.wp-hero-content > * {
  opacity: 0;
  transform: translateY(20px);
}

.wp-hero-slide.active .wp-hero-content > * {
  animation: wpHeroContent 0.7s ease forwards;
}

.wp-hero-slide.active .wp-hero-content > *:nth-child(1) {
  animation-delay: 0.12s;
}

.wp-hero-slide.active .wp-hero-content > *:nth-child(2) {
  animation-delay: 0.22s;
}

.wp-hero-slide.active .wp-hero-content > *:nth-child(3) {
  animation-delay: 0.32s;
}

.wp-hero-slide.active .wp-hero-content > *:nth-child(4) {
  animation-delay: 0.42s;
}

.wp-hero-slide.active .wp-hero-content > *:nth-child(5) {
  animation-delay: 0.52s;
}

.wp-hero-slide.active .wp-hero-visual {
  animation: wpHeroVisual 0.9s 0.25s ease forwards;
}

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

@keyframes wpHeroVisual {
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

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

@media (max-width: 1199.98px) {
  .wp-hero-title {
    font-size: 52px;
  }

  .wp-hero-text {
    font-size: 16px;
  }

  .wp-hero-control {
    width: 48px;
  }
}

@media (max-width: 991.98px) {
  .wp-hero-slide {
    min-height: auto;
  }

  .wp-hero-container {
    padding-top: 75px;
    padding-bottom: 105px;
  }

  .wp-hero-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
  }

  .wp-hero-text {
    margin-right: auto;
    margin-left: auto;
  }

  .wp-hero-points,
  .wp-hero-actions {
    justify-content: center;
  }

  .wp-hero-visual {
    max-width: 720px;
    margin: 40px auto 0;
  }

  .wp-hero-control {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .wp-hero-container {
    padding-top: 62px;
    padding-bottom: 82px;
  }

  .wp-hero-eyebrow {
    margin-bottom: 17px;
    padding: 7px 12px;
    font-size: 11px;
  }

  .wp-hero-title {
    margin-bottom: 17px;
    font-size: clamp(34px, 11vw, 46px);
    letter-spacing: -1px;
  }

  .wp-hero-text {
    margin-bottom: 21px;
    font-size: 15px;
    line-height: 1.6;
  }

  .wp-hero-points {
    gap: 9px 13px;
    margin-bottom: 26px;
  }

  .wp-hero-points li {
    font-size: 12px;
  }

  .wp-hero-visual {
    margin-top: 30px;
    padding: 10px 4px 34px;
  }

  .wp-hero-screen {
    padding: 5px;
    border-radius: 15px;
    transform: none;
  }

  .wp-hero-screen-bar {
    min-height: 31px;
    padding: 0 8px;
  }

  .wp-hero-screen-bar small {
    font-size: 9px;
  }

  .wp-hero-image-container {
    border-radius: 10px;
  }

  .wp-hero-floating-card {
    right: 10px;
    min-width: 190px;
    padding: 10px 13px;
  }

  .wp-hero-floating-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 17px;
  }

  .wp-hero-floating-card strong {
    font-size: 11px;
  }

  .wp-hero-floating-card small {
    font-size: 9px;
  }

  .wp-hero-indicators {
    bottom: 22px;
    gap: 9px;
  }

  .wp-hero-indicators [data-bs-target] {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
    font-size: 0;
  }

  .wp-hero-indicators [data-bs-target].active {
    width: 25px;
    border-radius: 8px;
  }
}

@media (max-width: 575.98px) {
  .wp-hero-actions {
    flex-direction: column;
  }

  .wp-hero-btn {
    width: 100%;
  }

  .wp-hero-points {
    flex-direction: column;
    align-items: center;
  }
}

/* ==========================================================
   ACCESSIBILITA
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  #heroModern *,
  #heroModern *::before,
  #heroModern *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
