:root {

  /* colori base */
  --enel-offer-bg: #ffffff;
  --enel-dark: #131416;
  --enel-magenta: #d3135a;

  /* giallo header / badge */
  --enel-offer-yellow-start: #ffba35;
  --enel-offer-yellow-end: #ffd35a;
  --enel-offer-badge-start: #ffd35a;
  --enel-offer-badge-end: #ffba35;
  --enel-offer-round-badge-start: #ffba35;
  --enel-offer-round-badge-end: #ffd35a;

  /* sezioni offerte */
  --enel-offer-border: #ebebec;    /* athen grey */
  --enel-offer-soft-bg: #f9fafc;   /* catskill */
  --enel-offer-muted: #8f8f91;     /* testo grigio (per prezzo barrato ecc.) */

  /* ombra */
  --enel-offer-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  --enel-offer-badge-shadow: 2px 6px 8px rgba(0, 0, 0, 0.25);
}

.btn.btn-enel { background-color: var(--enel-magenta); }

/* ----- TITOLO e HERO (CUSTOM) ----- */

.hero-row .hero-copy h1 {
  line-height: 1.4em;
}

.hero-container {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  .hero-container {
    overflow-x: clip;
  }
}

.hero-title-mobile,
.hero-title-non-mobile {
  display: none;
}

.hero-title-mobile {
  display: inline;
}

.blue-accent {
  padding: 3px 10px;
  background: white;
  color: #0046cc;
  border-radius: 5px;
}

.white-plus-accent {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: .82em;
  height: .82em;
  padding: 0;
  margin-left: .1em;
  background: #0046cc;
  color: transparent;
  border-radius: .15em;
  font-size: .78em;
  line-height: 1;
  transform: rotate(-13deg);
  transform-origin: center;
  vertical-align: .08em;
}

.white-plus-accent::before {
  content: "+";
  position: absolute;
  top: 50%;
  left: 50%;
  color: white;
  font-size: 1em;
  line-height: .82;
  transform: translate(-58%, -53%);
}

.swiping-commodity {
  position: relative;
  display: inline-grid;
  justify-items: end;
  overflow: hidden;
  vertical-align: -0.03em;
  line-height: .98;
}

.swiping-commodity__item {
  grid-area: 1 / 1;
  display: block;
  text-align: right;
  transform-origin: center;
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.swiping-commodity__item--luce {
  animation: commodity-luce 5.6s cubic-bezier(.22, 1, .36, 1) infinite both;
}

.swiping-commodity__item--gas {
  animation: commodity-gas 5.6s cubic-bezier(.22, 1, .36, 1) infinite both;
}

.hero-offer-wrapper {
  position: relative;
  max-width: 360px;
  margin: 20px auto 0;
}

.hero-offer-wrapper .hero-offer {
  position: relative;
  z-index: 1;
  margin: 0;
}

.hero-offer-sim {
  position: absolute;
  z-index: 0;
  top: -40px;
  right: -50px;
  width: 98px;
  max-width: none;
  pointer-events: none;
  transform: rotate(10deg);
  transform-origin: center;
}

.rotating-mobile-feature {
  display: grid;
  align-items: stretch;
  overflow: hidden;
}

.hero-row .hero-offer .rotating-mobile-feature__item {
  grid-area: 1 / 1;
  flex: initial;
  padding: 0;
  background: transparent;
  color: inherit;
  transform-origin: center;
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.hero-row .hero-offer .rotating-mobile-feature__item + .rotating-mobile-feature__item {
  border-left: 0;
  background: transparent;
  color: inherit;
}

.rotating-mobile-feature__item--calls {
  animation: mobile-feature-calls 9s ease-in-out infinite both;
}

.rotating-mobile-feature__item--sms {
  animation: mobile-feature-sms 9s ease-in-out infinite both;
}

@media (max-width: 767px) {

  .hero-row .hero-copy h1,
  .hero-row .hero-copy h2,
  .hero-row .hero-copy h3,
  .hero-row .hero-copy h4,
  .hero-row .hero-copy p {
    text-align: center;
  }

  .hero-offer-sim {
    top: -40px;
    right: -60px;
  }
}

@media (min-width: 768px) {
  .hero-title-mobile {
    display: none;
  }

  .hero-title-non-mobile {
    display: inline;
  }

  .hero-offer-wrapper {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (min-width: 1601px) {
  .hero-row .hero-copy {
    padding-left: 0;
    padding-right: 0;
  }

  .hero-offer-wrapper {
    margin-left: auto;
    margin-right: auto;
  }
}

@keyframes commodity-luce {
  0%,
  36% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
  }
  46% {
    opacity: 0;
    filter: blur(4px);
    transform: translate3d(0, -115%, 0);
  }
  54%,
  86% {
    opacity: 0;
    filter: blur(4px);
    transform: translate3d(0, 115%, 0);
  }
  96%,
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
  }
}

@keyframes commodity-gas {
  0%,
  36% {
    opacity: 0;
    filter: blur(4px);
    transform: translate3d(0, 115%, 0);
  }
  46%,
  86% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
  }
  96%,
  100% {
    opacity: 0;
    filter: blur(4px);
    transform: translate3d(0, -115%, 0);
  }
}

@keyframes mobile-feature-calls {
  0%,
  56% {
    opacity: 1;
    transform: scale(1);
  }
  64%,
  88% {
    opacity: 0;
    transform: scale(.86);
  }
  98%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes mobile-feature-sms {
  0%,
  56% {
    opacity: 0;
    transform: scale(.86);
  }
  64%,
  88% {
    opacity: 1;
    transform: scale(1);
  }
  98%,
  100% {
    opacity: 0;
    transform: scale(.86);
  }
}

@media (prefers-reduced-motion: reduce) {
  .swiping-commodity__item {
    animation: none;
    filter: none;
    transform: none;
  }

  .swiping-commodity__item--luce {
    opacity: 1;
  }

  .swiping-commodity__item--gas {
    opacity: 0;
  }

  .rotating-mobile-feature__item {
    animation: none;
    filter: none;
    transform: none;
  }

  .rotating-mobile-feature__item--calls {
    opacity: 1;
  }

  .rotating-mobile-feature__item--sms {
    opacity: 0;
  }
}

/* ----- CARD BASE ----- */

.enel-offer-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--enel-offer-bg);
  border-radius: 10px;
  box-shadow: var(--enel-offer-shadow);
  color: var(--enel-dark);
  min-height: 500px;
  margin-bottom: 3rem;
}

.enel-offer-card-wrapper {
  display: flex;
  justify-content: center;
}

/* ----- FASCIA SUPERIORE (EYEBROW) ----- */

.enel-offer-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: linear-gradient(
    90deg,
    var(--enel-offer-yellow-start) 0%,
    var(--enel-offer-yellow-end) 100%
  );
  border-radius: 10px 10px 0 0;
}

.enel-offer-card__header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.enel-offer-card__header-icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

/* Eyebrow text */

.enel-offer-card__eyebrow {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1.2;
}

.enel-offer-eyebrow-amount {
  font-size: 2.5rem;
  font-weight: 900;
}

.enel-offer-eyebrow-text {
  font-weight: 500;
}

/* ----- BODY / TITOLO ----- */

.enel-offer-card__body {
  padding: 20px 22px 24px 22px;
}

.enel-offer-card__title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-bottom: 8px;
}

.enel-offer-card__headline {
  margin: 10px 0 5px;
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1.1;
}

.enel-offer-card__headline .accent {
  font-weight: 700;
  color: var(--enel-magenta);
}

/* icona prodotto (lampadina) */

.enel-offer-card__product-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--enel-magenta);
}

.enel-offer-card__product-icon svg {
  height: 2.2em;
  width: auto;
  fill: currentColor;
}

/* Sottotitolo */

.enel-offer-card__subtitle {
  margin: 0 0 12px;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1;
}

/* ----- SECTION FULL (sottobox) ----- */

.enel-offer-section {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--enel-offer-border);
  background-color: var(--enel-offer-soft-bg);
  padding: 14px 16px 14px;
  margin-bottom: 14px;
}

/* header: testi a sinistra, icona opzionale a destra */

.enel-offer-section__header-row {
  position: relative;
  display: block;
  margin-bottom: 10px;
}

.enel-offer-section__header-text {
  flex: 1 1 auto;
}

/* 1) caption / titoletto */

.enel-offer-section__eyebrow {
  margin: 0 0 2px;
  font-size: 1.8rem;
  font-weight: 800;
}

/* 3) titolo nero */

.enel-offer-section__title {
  margin: 0 0 2px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--enel-dark);
}

.enel-offer-section__title.long {
  font-size: 1.7rem;
  letter-spacing: -0.02rem;
}

/* 4) sottotitolo light */

.enel-offer-section__subtitle {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--enel-offer-muted);
}

/* 2) icona in alto a destra */

.enel-offer-section__icon {
  position: absolute;
  top: -4px;
  right: -4px;
  color: var(--enel-magenta);
  pointer-events: none;
  z-index: 1;
}

.enel-offer-section__icon svg {
  height: 3rem;
  width: auto;
  fill: currentColor;
}

/* footer: price-block + badge sovrapposto */

.enel-offer-section__footer {
  position: relative;
  margin-top: 12px;
  padding-top: 14px; /* spazio "di sicurezza" se il badge scende un po' */
}

.enel-offer-section__footer.moretm {
  margin-top: 18px;
}
.enel-offer-section__footer.lesstm {
  margin-top: 6px;
}
.enel-offer-section__footer.notm {
  margin-top: 0;
}

.enel-offer-section__footer.moretp {
  padding-top: 21px;
}
.enel-offer-section__footer.lesstp {
  padding-top: 7px;
}
.enel-offer-section__footer.notp {
  padding-top: 0;
}

/* riga prezzi: a) prezzo principale, b) prezzo vecchio */
.enel-offer-section__price-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

/* prezzo barrato */
.enel-offer-section__price-old {
  position: relative;
  font-size: 1.25rem;
  color: var(--enel-offer-muted);
  /*text-decoration: line-through;*/
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.enel-offer-section__price-old::before {
  content: "";
  width: calc(100% + 5px);
  height: 0;
  border-bottom: 1.5px solid var(--enel-offer-muted);
  position: absolute;
  top: 48%;
  left: 0;
  transform: translate(-2px, 2px) rotate(4deg);
}

/* badge sovrapposto sopra il price-block */
.enel-offer-section__badge {
  position: absolute;
  top: 0;
  right: -10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 500;
  background: linear-gradient(
    90deg,
    var(--enel-offer-round-badge-start) 0%,
    var(--enel-offer-round-badge-end) 100%
  );
  white-space: nowrap;      /* niente a capo */
  z-index: 1;
}

/* blocco prezzo */

.enel-offer-section__price-main {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.enel-offer-section__price-main-value {
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--enel-magenta);
}

.enel-offer-section__price-main-unit {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 3px; /* Serve perché il prezzo ha la virgola */
}

.enel-offer-section__price-secondary {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.enel-offer-section__price-secondary-value {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--enel-magenta);
}

.enel-offer-section__price-secondary-unit {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 3px; /* Serve perché il prezzo ha la virgola */
}

/* mi assicuro che siano "sul fondo" */
.enel-offer-section__price-main-value,
.enel-offer-section__price-main-unit,
.enel-offer-section__price-secondary-value,
.enel-offer-section__price-secondary-unit,
.enel-offer-section__price-old {
  line-height: 1;   /* niente spazio extra sopra/sotto */
  display: block;   /* così il line-height si applica pulito */
}

/* ----- LINGUETTA (BADGE) ----- */

.enel-offer-card__badge {
  position: absolute;
  top: 70px;
  right: -10px;
  width: 120px;
  height: 48px;
  pointer-events: none;
}

/* SVG che riempie il container + ombra che segue la forma */
.enel-offer-card__badge-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(var(--enel-offer-badge-shadow));
}

/* testo centrato sopra lo sfondo */
.enel-offer-card__badge-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  font-size: 1.5rem;
  line-height: 1.05;
  transform: translateX(6px); /* centro ottico */
}

/* ----- NOTA SOTTO LE SECTION ----- */

.enel-offer-card__disclaimer {
  margin: 4px 0 18px;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--enel-offer-muted);
  line-height: 1.1;
}

/* ----- CTA FULL WIDTH ----- */

.enel-offer-card__cta-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

/* ----- UTILITIES TESTO ----- */

.enel-offer-text--regular { font-weight: 400; }
.enel-offer-text--bold    { font-weight: 700; }

.enel-offer-text--sm { font-size: 0.875rem; }
.enel-offer-text--md { font-size: 1rem; }
.enel-offer-text--lg { font-size: 1.3rem; }

.enel-offer-text--black   { color: var(--enel-dark); }
.enel-offer-text--magenta { color: var(--enel-magenta); }

/* ----- RESPONSIVE ----- */

@media (max-width: 767px) {
  .enel-offer-card {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .space-saver {
    display: none;
  }
}
