/* Modern UI Components for Servizio-LuceGas.it */

:root {
  --primary-gradient: linear-gradient(135deg, var(--bs-primary) 0%, #3c88ff 100%);
  --hero-gradient: linear-gradient(135deg, #001f4d 0%, #0a3273 100%);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
  --section-padding: 5rem 0;
}

/* General Improvements */
body {
  overflow-x: hidden;
}

.py-6 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Animation Utilities */
.animate-fade-in {
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Headers */
.section-header {
  position: relative;
  margin-bottom: 3rem;
}

.section-subtitle {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--bs-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}

.divider-line {
  width: 70px;
  height: 2px;
  background-color: var(--bs-primary);
  opacity: 0.3;
}

.divider-icon {
  margin: 0 10px;
  color: var(--bs-primary);
  font-size: 1.2rem;
}

/* Modern Hero Section */
.modern-hero {
  position: relative;
  background: var(--hero-gradient);
  color: white;
  padding: 7rem 0;
  overflow: hidden;
}

.hero-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.05;
  background-color: rgba(255, 255, 255, 0.2);
}

.shape-1 {
  width: 500px;
  height: 500px;
  bottom: -250px;
  right: -200px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  top: -150px;
  left: -100px;
}

.shape-3 {
  width: 200px;
  height: 200px;
  top: 30%;
  right: 15%;
}

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

.hero-features {
  display: flex;
  flex-wrap: wrap;
  margin-top: 2rem;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.feature-item i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.floating-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary-gradient);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: float 3s ease-in-out infinite;
  z-index: 4;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.badge-content {
  text-align: center;
  color: white;
  line-height: 1.2;
}

.badge-text {
  display: block;
  font-size: 0.8rem;
}

.badge-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  margin: 5px 0;
}

.hero-image-container {
  position: relative;
  z-index: 3;
}

.pulse-button {
  position: relative;
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

/* Benefits Section */
.benefits-section {
  background-color: #f8f9fa;
  position: relative;
}

.benefit-card {
  transition: var(--transition);
  overflow: visible;
  border-radius: 10px;
  border: none;
  background-color: white;
  box-shadow: var(--card-shadow);
  height: 100%;
  position: relative;
  z-index: 1;
}

.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.benefit-card-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -40px auto 20px;
  position: relative;
  z-index: 2;
}

.benefit-card-icon-wrapper.primary {
  background: var(--primary-gradient);
}

.benefit-card-icon-wrapper.success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.benefit-card-icon-wrapper.info {
  background: linear-gradient(135deg, #17a2b8 0%, #0dcaf0 100%);
}

.benefit-card-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
}

.benefits-card-offset {
  transform: translateY(0);
}

.benefit-features {
  margin-top: 1.5rem;
  text-align: left;
}

.benefit-features .feature {
  display: flex;
  align-items: center;
  margin-bottom: 0.7rem;
  color: #495057;
}

.benefit-features .feature i {
  color: #28a745;
  margin-right: 0.7rem;
  font-size: 1rem;
}

.benefits-counts {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.count-item {
  padding: 2rem 1rem;
}

.count-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
}

.count-label {
  font-size: 1rem;
  color: #6c757d;
}

/* How It Works Section */
.how-it-works-section {
  background-color: #fff;
  position: relative;
  overflow: hidden;
  padding-top: 2rem;
}

.how-bg-shape {
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 100%;
  background-color: #f0f5ff;
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 1;
}

/* Nascondi lo sfondo su dispositivi mobili per evitare sovrapposizioni */
@media (max-width: 768px) {
  .how-bg-shape {
    display: none;
  }
}

.steps-wrapper {
  position: relative;
  z-index: 2;
  padding: 2rem 0;
}

.steps-connector {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background-color: rgba(13, 110, 253, 0.2);
  z-index: -1;
}

.step-card {
  position: relative;
  background-color: white;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  transition: var(--transition);
  height: 100%;
}

.step-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.step-card.active {
  background: var(--primary-gradient);
  color: white;
}

.step-number {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background-color: white;
  color: var(--bs-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--bs-primary);
}

.step-card.active .step-number {
  background-color: var(--bs-primary);
  color: white;
  border-color: white;
}

.step-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background-color: rgba(13, 110, 253, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--bs-primary);
}

.step-card.active .step-icon {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.step-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.step-description {
  font-size: 0.95rem;
  color: #6c757d;
}

.step-card.active .step-description {
  color: rgba(255, 255, 255, 0.8);
}

.step-arrow {
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  color: var(--bs-primary);
  font-size: 1.5rem;
  z-index: 5;
}

.cta-extras {
  font-size: 0.9rem;
  color: #6c757d;
}

/* CTA Section */
.cta-section {
  padding: 5rem 0;
  background-color: #f8f9fa;
}

.cta-card {
  position: relative;
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.cta-card-content {
  position: relative;
  z-index: 2;
  padding: 3rem;
}

.cta-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.cta-shape-1 {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background-color: rgba(13, 110, 253, 0.05);
  top: -150px;
  right: -100px;
}

.cta-shape-2 {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: rgba(13, 110, 253, 0.05);
  bottom: -100px;
  left: -50px;
}

.cta-badge {
  display: inline-block;
  background-color: rgba(13, 110, 253, 0.1);
  color: var(--bs-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.cta-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.cta-description {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 2rem;
}

.cta-testimonial {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
}

.testimonial-quote {
  font-style: italic;
  color: #495057;
}

.testimonial-quote i {
  color: var(--bs-primary);
  opacity: 0.5;
  font-size: 0.8rem;
  margin: 0 5px;
}

.testimonial-author {
  margin-top: 1rem;
  text-align: right;
  font-weight: 600;
  color: #6c757d;
}

.cta-contact-card {
  background-color: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contact-card-header {
  background: var(--primary-gradient);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.contact-card-header h4 {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-card-header p {
  margin-bottom: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

.contact-card-body {
  padding: 1.5rem;
}

.contact-methods {
  margin-bottom: 1.5rem;
}

.contact-method {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.8rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.contact-method i {
  color: var(--bs-primary);
  font-size: 1.5rem;
  margin-right: 1rem;
  width: 40px;
  height: 40px;
  background-color: rgba(13, 110, 253, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info {
  flex-grow: 1;
}

.contact-label {
  display: block;
  font-size: 0.8rem;
  color: #6c757d;
}

.contact-value {
  display: block;
  font-weight: 600;
  color: #212529;
  text-decoration: none;
}

.contact-value:hover {
  color: var(--bs-primary);
}

.contact-button {
  margin-bottom: 1rem;
}

.contact-card-footer {
  background-color: white;
  padding: 1rem;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.85rem;
  color: #6c757d;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  .section-title {
    font-size: 2rem;
  }
  
  .steps-connector {
    display: none;
  }
  
  .step-arrow {
    display: none;
  }
  
  .floating-badge {
    width: 100px;
    height: 100px;
  }
  
  .badge-value {
    font-size: 1.8rem;
  }
  
  .cta-card-content {
    padding: 2rem;
  }
  
  .cta-title {
    font-size: 1.8rem;
  }
  
  /* Miglioramenti per la visualizzazione tablet */
  .step-card {
    margin-bottom: 2rem;
  }
  
  .container {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 767.98px) {
  .py-6 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .modern-hero {
    padding: 5rem 0 7rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .benefits-card-offset {
    transform: translateY(0);
  }
  
  .floating-badge {
    width: 80px;
    height: 80px;
    top: 10px;
    right: 10px;
  }
  
  .badge-value {
    font-size: 1.5rem;
  }
  
  .badge-text {
    font-size: 0.7rem;
  }
  
  .cta-card-content {
    padding: 1.5rem;
  }
  
  .cta-title {
    font-size: 1.5rem;
  }
  
  .count-value {
    font-size: 2rem;
  }
  
  /* Fix per pulsanti su mobile */
  .btn-lg {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    width: 100%;
    max-width: 280px;
    white-space: normal;
  }
  
  .cta-wrapper {
    max-width: 100%;
    overflow: hidden;
    padding: 0 10px;
  }
  
  .cta-extras {
    max-width: 100%;
    overflow: hidden;
  }
}