/* Fix per errori di caricamento */
.registrazione-soci {
  min-height: 200px;
  animation: fadeInUp 0.8s ease-out;
}

.registrazione-soci .loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  font-size: 1.2rem;
  color: #667eea;
}

/* Nasconde errori PayPal durante il caricamento */
.paypal-sdk-error {
  display: none;
}

/* Book Soci&Eventi - Stili Puliti */
.book-soci-eventi {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.membership-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px 20px 0 0;
  margin: -1rem -1rem 2rem -1rem;
  position: relative;
}

.membership-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.membership-header * {
  position: relative;
  z-index: 1;
}

.membership-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.membership-description {
  font-size: 1.2rem;
  line-height: 1.7;
  opacity: 0.95;
  font-weight: 300;
}

.main-content {
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* CARDS CONTAINER */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.registration-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.registration-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(45deg, #667eea, #764ba2);
}

.registration-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.member-card::before {
  background: linear-gradient(45deg, #667eea, #764ba2);
}

.event-card::before {
  background: linear-gradient(45deg, #56ab2f, #a8e6cf);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.registration-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 1.5rem;
}

.registration-card p {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: left;
}

.benefits-list li {
  padding: 0.5rem 0;
  color: #4a5568;
  font-weight: 500;
}

.events-preview {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.event-count {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.next-event {
  color: #6b7280;
  font-size: 0.9rem;
}

.no-events {
  color: #9ca3af;
  font-style: italic;
}

/* PRICE DISPLAY */
.price-display {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 15px;
  padding: 1.5rem;
  color: white;
  margin: 1.5rem 0;
  position: relative;
}

.price-amount {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.price-label {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.9;
}

/* FORM STYLES */
.registration-form-container {
  max-width: 600px;
  margin: 0 auto;
}

.registration-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

.registration-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 2px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.form-group.captcha-highlight {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 1rem;
}

.form-group.captcha-highlight label {
  color: #856404;
  font-weight: 700;
}

/* EVENT SELECTION */
.event-selection {
  margin-bottom: 2rem;
}

.event-info {
  margin-top: 1.5rem;
}

.selected-event {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 2rem;
  border: 2px solid #e2e8f0;
}

.selected-event h3 {
  color: #2d3748;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.event-details {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.event-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4a5568;
}

.map-link {
  margin-left: 0.5rem;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.map-link:hover {
  text-decoration: underline;
}

.event-description {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.urgency-notice {
  background: #fef3c7;
  color: #92400e;
  padding: 1rem;
  border-radius: 10px;
  border: 2px solid #fbbf24;
  font-weight: 600;
  text-align: center;
}

/* FORM NOTICES */
.form-notice {
  background: #f0f9ff;
  border: 2px solid #0ea5e9;
  border-radius: 10px;
  padding: 1rem;
  margin: 1.5rem 0;
  text-align: center;
}

.form-notice p {
  margin: 0;
  color: #0c4a6e;
  font-weight: 600;
}

/* BUTTONS */
.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-bottom: 1rem;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-success {
  background: linear-gradient(45deg, #56ab2f, #a8e6cf);
  color: white;
  box-shadow: 0 4px 15px rgba(86, 171, 47, 0.4);
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(86, 171, 47, 0.6);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.link-btn {
  background: none;
  border: none;
  color: #667eea;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
  transition: color 0.3s ease;
  padding: 0.5rem;
}

.link-btn:hover {
  color: #764ba2;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e2e8f0;
}

/* STATUS MESSAGES */
.registration-status {
  text-align: center;
  padding: 2rem;
  border-radius: 15px;
  margin: 2rem 0;
  position: relative;
}

.status-success {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: #155724;
  border: 2px solid rgba(21, 87, 36, 0.2);
}

.status-error {
  background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
  color: #721c24;
  border: 2px solid rgba(114, 28, 36, 0.2);
}

.success-actions {
  margin-top: 1.5rem;
}

.success-actions .btn {
  width: auto;
  min-width: 200px;
}

/* PAYPAL CONTAINER */
.paypal-container {
  margin-top: 2rem;
  text-align: center;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 15px;
  border: 2px dashed #667eea;
}

.paypal-container h4 {
  margin-bottom: 1.5rem;
  color: #2d3748;
  font-size: 1.3rem;
  font-weight: 600;
}

#paypal-button-container {
  max-width: 350px;
  margin: 0 auto;
}

/* LOADING */
.loading {
  text-align: center;
  padding: 3rem;
  color: #667eea;
  font-size: 1.2rem;
  font-weight: 600;
}

.loading::after {
  content: "...";
  animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    color: rgba(102, 126, 234, 0);
    text-shadow: .25em 0 0 rgba(102, 126, 234, 0), .5em 0 0 rgba(102, 126, 234, 0);
  }
  40% {
    color: #667eea;
    text-shadow: .25em 0 0 rgba(102, 126, 234, 0), .5em 0 0 rgba(102, 126, 234, 0);
  }
  60% {
    text-shadow: .25em 0 0 #667eea, .5em 0 0 rgba(102, 126, 234, 0);
  }
  80%,
  100% {
    text-shadow: .25em 0 0 #667eea, .5em 0 0 #667eea;
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .registrazione-soci {
    padding: 0.5rem;
    margin: 0.5rem;
  }

  .membership-header {
    padding: 2rem 1rem;
    margin: -0.5rem -0.5rem 1.5rem -0.5rem;
  }

  .membership-title {
    font-size: 2rem;
  }

  .main-content {
    padding: 1.5rem;
  }

  .cards-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .registration-card {
    padding: 2rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .price-amount {
    font-size: 2.5rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.875rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .membership-title {
    font-size: 1.8rem;
  }

  .registration-card {
    padding: 1.5rem;
  }

  .price-amount {
    font-size: 2rem;
  }

  .registration-title {
    font-size: 1.5rem;
  }
}

/* Animazioni */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-countdown {
  background: #e0f2fe;
  border: 2px solid #0284c7;
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
  font-weight: 600;
  color: #0c4a6e;
}

.event-countdown span {
  font-size: 1.2rem;
  color: #dc2626;
  font-weight: 800;
}
