/* Custom styles for Servizio-LuceGas.it */

/* Global Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--bs-body-color);
  line-height: 1.6;
}

.bg-light-gradient {
  background: linear-gradient(135deg, var(--bs-light) 0%, var(--bs-light-rgb, 248, 249, 250) 100%);
}

/* Header Styles */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.animated-logo {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.animated-brand {
  position: relative;
  display: inline-block;
  color: var(--bs-primary);
  font-weight: 700;
  background: linear-gradient(90deg, var(--bs-primary) 0%, #3c88ff 50%, var(--bs-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientText 5s ease infinite;
}

@keyframes gradientText {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}

.animated-banner {
  background-color: var(--bs-primary);
  color: white;
  padding: 8px 0;
  overflow: hidden;
  position: relative;
}

.animated-banner:before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 150%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
  animation: shimmer 4s infinite;
  transform: skewX(-20deg);
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) skewX(-20deg);
  }
  100% {
    transform: translateX(100%) skewX(-20deg);
  }
}

.animated-text {
  display: flex;
  overflow: hidden;
  height: 25px;
}

.animated-text-item {
  flex-shrink: 0;
  width: 100%;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  animation: slideText 12s infinite;
  opacity: 0;
  transform: translateY(20px);
}

.animated-text-item:nth-child(1) {
  animation-delay: 0s;
}

.animated-text-item:nth-child(2) {
  animation-delay: 4s;
}

.animated-text-item:nth-child(3) {
  animation-delay: 8s;
}

@keyframes slideText {
  0%, 10% {
    opacity: 0;
    transform: translateY(20px);
  }
  15%, 30% {
    opacity: 1;
    transform: translateY(0);
  }
  35%, 100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.hero-section {
  padding: 5rem 0;
  position: relative;
}

/* Custom Card Styles */
.benefit-card {
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.benefit-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--bs-primary);
}

/* Form Styles */
.form-control {
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.form-label {
  font-weight: 500;
}

.form-check-label {
  font-size: 0.9rem;
}

/* Comparison Styles */
.comparison-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.comparison-header {
  background-color: var(--bs-light);
  padding: 1.5rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.comparison-body {
  padding: 1.5rem;
}

.nav-tabs .nav-link {
  border-radius: 8px 8px 0 0;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
}

.nav-tabs .nav-link.active {
  font-weight: 600;
}

/* Nuovo comparatore tariffe */
.filter-section {
  margin: 30px 0;
}

.results h2, .results h3 {
  margin-bottom: 20px;
}

.results .table th {
  background-color: var(--bs-light);
}

.results .table tbody tr:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.results .table-success {
  background-color: rgba(var(--bs-success-rgb), 0.1) !important;
}

.results .badge {
  font-size: 0.75rem;
  padding: 0.3em 0.6em;
  margin-left: 5px;
}

.results .btn-primary {
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
}

/* Results Table Styles */
.results-table th {
  font-weight: 600;
  background-color: var(--bs-light);
}

.results-table .table-success {
  --bs-table-bg: rgba(var(--bs-success-rgb), 0.1) !important;
  font-weight: 600;
}

/* Footer Styles */
.footer {
  background-color: var(--bs-dark);
  color: var(--bs-light);
  padding: 3rem 0 2rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--bs-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--bs-primary);
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  margin-right: 10px;
  color: var(--bs-light);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--bs-primary);
  color: white;
}

/* Mobile Contact Button */
.mobile-contact-button {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  padding: 0 15px;
  z-index: 1000;
  text-align: center;
}

.mobile-contact-button .btn {
  width: 100%;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 12px 24px;
  font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
  .hero-section {
    padding: 3rem 0;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .benefit-card {
    margin-bottom: 1.5rem;
  }
  
  .animated-text {
    height: 20px;
  }
  
  .animated-text-item {
    font-size: 0.85rem;
  }
  
  .animated-banner {
    padding: 6px 0;
  }
  
  /* Add padding to the bottom to avoid content being hidden behind the fixed button */
  body {
    padding-bottom: 80px;
  }
}

/* How it works section styles */
.how-bg-shape {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  background-color: #f8f9fa;
  clip-path: polygon(15% 0, 100% 0%, 100% 100%, 0% 100%);
  z-index: -1;
}

/* Fixed: Step cards should have consistent height and be positioned properly */
.step-card {
  height: 100%;
  position: relative;
  z-index: 1;
  background-color: white;
  border-radius: 12px;
  padding: 30px 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.step-number {
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Hero section button styling with improved mobile spacing */
.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

/* Enhanced animation styling */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

/* Pulse animation */
.pulse {
  animation: pulse 2s infinite;
}

/* Additional responsive styling */
@media (max-width: 767.98px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 20px;
  }
  
  .hero-buttons .btn {
    width: 100%;
    margin-right: 0 !important;
  }
  
  /* Improved button animations for mobile */
  .btn-primary.pulse {
    animation: pulse 2s infinite;
  }
  
  .btn-outline-light:hover {
    transform: translateY(-3px);
    transition: transform 0.3s ease;
  }
}

/* Miglioramento del bottone mobile "Contattaci Ora" */
.mobile-contact-button .btn {
  transition: all 0.3s ease;
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: pulse-mobile 2s infinite;
}

@keyframes pulse-mobile {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
}
