/* Kantevra Global Styles */
:root {
  /* Primary Colors */
  --primary-50: #f5f3ff;
  --primary-100: #ede9fe;
  --primary-200: #ddd6fe;
  --primary-300: #c4b5fd;
  --primary-400: #a78bfa;
  --primary-500: #6610f2;
  --primary-600: #7c3aed;
  --primary-700: #6f42c1;
  --primary-800: #5b21b6;
  --primary-900: #4c1d95;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6610f2 0%, #6f42c1 100%);
  --gradient-primary-soft: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%);
  --gradient-hero: linear-gradient(135deg, #6610f2 0%, #6f42c1 50%, #8b5cf6 100%);

  /* Grays */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;

  /* Semantic */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(102, 16, 242, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(102, 16, 242, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(102, 16, 242, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 8px 10px rgba(102, 16, 242, 0.04);
  --glow-primary: 0 0 20px rgba(102, 16, 242, 0.3);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-lg);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--glow-primary); transform: translateY(-2px); }

.btn-outline-primary {
  border: 2px solid var(--primary-500);
  color: var(--primary-500);
  background: white;
  padding: 14px 32px;
  border-radius: var(--radius-lg);
}
.btn-outline-primary:hover { background: var(--primary-500); color: white; }

.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }
.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary-soft);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary-700);
  margin-bottom: 1rem;
}

.step-number {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.step-circle {
  width: 60px;
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.progress-ring-circle-bg {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 4;
}

.progress-ring-circle {
  fill: none;
  stroke: var(--primary-500);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 157; /* 2 * π * 25 */
  stroke-dashoffset: 157;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

/* Progressi per ogni step */
.progress-step-1 {
  stroke-dashoffset: 118; /* 25% completato (157 * 0.75) */
}

.progress-step-2 {
  stroke-dashoffset: 78.5; /* 50% completato (157 * 0.5) */
}

.progress-step-3 {
  stroke-dashoffset: 39.25; /* 75% completato (157 * 0.25) */
}

.progress-step-4 {
  stroke-dashoffset: 0; /* 100% completato */
}

.step-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  z-index: 1;
  position: relative;
}

/* Effetto hover per i cerchi */
.step-circle:hover {
  transform: scale(1.05);
}

.step-circle:hover .progress-ring-circle {
  stroke: var(--primary-600);
  filter: drop-shadow(0 0 8px rgba(102, 16, 242, 0.3));
}

.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}
.nav-link { font-weight: 500; color: var(--gray-700); margin: 0 0.5rem; }
.nav-link:hover { color: var(--primary-500); }
.navbar.scrolled { box-shadow: var(--shadow-md); }

.hero { padding: 7rem 0 4rem; background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%); }
.hero .lead { color: var(--gray-600); }

/* Pricing Cards */
.pricing-card {
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  border: 2px solid var(--gray-200);
  background: white;
  height: 100%;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-500);
}

.pricing-card.recommended {
  border-color: var(--primary-500);
  box-shadow: 0 10px 30px rgba(102, 16, 242, 0.2);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--gradient-primary);
  color: white;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.pricing-header {
  padding: 2rem;
  border-bottom: 1px solid var(--gray-200);
}

.pricing-price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 1rem 0;
}

.pricing-price small {
  font-size: 1.5rem;
  color: var(--gray-500);
}

.pricing-features {
  padding: 2rem;
}

.pricing-feature {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  color: var(--gray-700);
}

.pricing-feature i {
  color: var(--success);
  margin-right: 12px;
  font-size: 18px;
}

.pricing-feature strong {
  color: var(--gray-900);
}

/* FAQ Section */
#faq {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--gray-50) 100%);
}

.faq-item { 
  border: 1px solid var(--primary-200); 
  border-radius: var(--radius-md); 
  background: white;
  box-shadow: var(--shadow-sm);
}

.faq-item .accordion-button {
  background: white;
  color: var(--gray-800);
  font-weight: 600;
  border: none;
  box-shadow: none;
}

.faq-item .accordion-button:not(.collapsed) {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-200);
}

.faq-item .accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(102, 16, 242, 0.25);
  border-color: var(--primary-300);
}

.faq-item .accordion-body {
  background: white;
  color: var(--gray-700);
  border-top: 1px solid var(--primary-100);
}

/* Footer */
footer { 
  background: var(--gray-50); 
  color: var(--gray-700); 
  padding: 2rem 0; 
}

footer a {
  color: var(--primary-500);
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--primary-700);
}

/* Contact Modal Styles */
#contactModal .modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(102, 16, 242, 0.1);
  overflow: hidden;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.98);
}

#contactModal .modal-header {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  position: relative;
  overflow: hidden;
}

#contactModal .modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

#contactModal .modal-title {
  font-weight: 700;
  font-size: 1.25rem;
  position: relative;
  z-index: 1;
  color: white !important;
}

#contactModal .modal-title i {
  color: white !important;
}

#contactModal .btn-close {
  filter: none;
  opacity: 1;
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  padding: 0;
}

#contactModal .btn-close::before,
#contactModal .btn-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: white;
}

#contactModal .btn-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#contactModal .btn-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#contactModal .btn-close:hover::before,
#contactModal .btn-close:hover::after {
  background: rgba(255, 255, 255, 0.8);
}

#contactModal .modal-body {
  padding: 1.5rem 0.5rem 2rem 0.5rem;
}

/* Contact info styles removed - no longer needed */

#contactModal .form-label {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

#contactModal .form-control {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
  background: white;
  margin-bottom: 0.75rem;
}

#contactModal .form-control:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 0.2rem rgba(102, 16, 242, 0.15);
  background: white;
}

#contactModal .form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.15);
}

#contactModal .invalid-feedback {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

#contactModal .form-check-input {
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  width: 1.2em;
  height: 1.2em;
  transition: all 0.3s ease;
}

#contactModal .form-check-input:checked {
  background-color: var(--primary-500);
  border-color: var(--primary-500);
  box-shadow: 0 2px 8px rgba(102, 16, 242, 0.3);
}

#contactModal .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(102, 16, 242, 0.15);
}

#contactModal .form-check-input:hover {
  border-color: var(--primary-400);
}

#contactModal .form-check-label {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

#contactModal .form-check-label a {
  color: var(--primary-500);
  text-decoration: none;
  font-weight: 500;
}

#contactModal .form-check-label a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

#contactModal .btn-primary {
  background: var(--gradient-primary);
  border: none;
  padding: 0.875rem 2rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s ease;
  font-size: 0.95rem;
}

#contactModal .btn-primary:hover:not(:disabled) {
  box-shadow: var(--glow-primary);
}

#contactModal .btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

#contactModal .d-grid {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

#contactModal .spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Contact Notification Styles */
.contact-notification {
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  animation: slideInRight 0.3s ease-out;
}

.contact-notification.alert-success {
  background: var(--success-light);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.contact-notification.alert-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Modal */
@media (max-width: 768px) {
  #contactModal .modal-dialog {
    margin: 1rem;
  }
  
  #contactModal .modal-body {
    padding: 1rem 0.5rem 1.5rem 0.5rem;
  }
  
  #contactModal .modal-header {
    padding: 1rem 1.5rem;
  }
  
  #contactModal .col-md-8 {
    max-width: 100%;
  }
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Hero section fixes */
  .hero {
    padding: 6rem 0 3rem !important;
  }
  
  .hero .d-flex {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .hero .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero .mt-3 {
    text-align: center;
  }
  
  /* Hero image margin fix */
  .hero img {
    margin-left: 0 !important;
    max-width: 100%;
    height: auto;
  }
  
  /* Navbar mobile menu auto-close */
  .navbar-collapse.show {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  
  /* Footer links - max 2 per row */
  footer .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
  
  footer .d-flex > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 100%;
  }
  
  footer .d-flex > div:last-child a {
    flex: 0 0 calc(50% - 0.5rem);
    text-align: left;
  }
  
  /* Ensure all elements stay within viewport */
  .row {
    margin-left: 0;
    margin-right: 0;
  }
  
  .col-lg-6, .col-md-6, .col-lg-3, .col-md-3 {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Pricing cards responsive */
  .pricing-card {
    margin-bottom: 2rem;
  }
  
  /* Feature cards responsive */
  .feature-card {
    margin-bottom: 1.5rem;
  }
  
  /* Step circles responsive */
  .step-circle {
    width: 60px;
    height: 60px;
  }
  
  .step-text {
    font-size: 16px;
  }
}

/* Modal Backdrop */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

/* Animazioni rimosse per migliore reattività */

/* Form Focus States */
#contactModal .form-control:focus,
#contactModal .form-check-input:focus {
  outline: none;
}

/* Loading State */
#contactModal .btn-primary .spinner-border {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Honeypot Field (Hidden) */
#contactModal input[name="website_url"] {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* reCAPTCHA Badge Visibility Logic
   Hidden by default, shown only when modal is open (Bootstrap adds modal-open to body)
*/
.grecaptcha-badge {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
}

body.modal-open .grecaptcha-badge {
    visibility: visible;
    opacity: 1;
    z-index: 9999; /* Assicuriamoci che sia sopra la backdrop del modal */
}