/* Contatti.css - Stile moderno e sofisticato per la pagina contatti */

:root {
  --primary-color: #0d6efd;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary-color: #f8fafc;
  --accent-color: #06b6d4;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-light) 100%
  );
  min-height: 50vh;
  position: relative;
  overflow: hidden;
}

.hero-section::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)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(13, 110, 253, 0.95) 0%,
    rgba(59, 130, 246, 0.9) 100%
  );
  backdrop-filter: blur(1px);
}

.hero-section h1 {
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4rem);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
  color: #ffffff;
}

.hero-section p {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  opacity: 1;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Contact Section */
.contact-section {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  padding: 5rem 0;
  position: relative;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* Contact Card */
.contact-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-large);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--accent-color),
    var(--primary-light)
  );
}

.contact-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.15);
}

.contact-card h2 {
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  position: relative;
}

.contact-card h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* Form Elements */
.form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
}

.form-label i {
  opacity: 0.8;
  transition: var(--transition);
}

.form-label:hover i {
  opacity: 1;
  transform: scale(1.1);
}

#contactForm .form-control {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 400;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
}

#contactForm .form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

#contactForm .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

#contactForm .form-control:hover {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.9);
}

#contactForm .form-control.is-valid {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#contactForm .form-control.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

#contactForm .invalid-feedback {
  font-size: 0.875rem;
  color: #ef4444;
  margin-top: 0.25rem;
}

/* Textarea */
#contactForm textarea.form-control {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* Button */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  border: none;
  border-radius: var(--radius-md);
  padding: 0.875rem 2.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
  box-shadow: var(--shadow-medium);
  position: relative;
  overflow: hidden;
  color: white;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -8px rgba(99, 102, 241, 0.3);
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary-color) 100%
  );
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-medium);
}

.btn-primary:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), var(--shadow-medium);
}

/* Loading State */
.btn-loading {
  opacity: 0.8;
  pointer-events: none;
  position: relative;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Feedback Messages */
#feedback {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 1.5rem;
  border: 1px solid;
}

#feedback.alert-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #bbf7d0;
  color: #166534;
}

#feedback.alert-danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fecaca;
  color: #991b1b;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    min-height: 40vh;
    padding: 3rem 0;
  }

  .contact-section {
    padding: 3rem 0;
  }

  .contact-card {
    margin: 0 1rem;
    padding: 2rem 1.5rem;
  }

  .contact-card h2 {
    font-size: 1.5rem;
  }

  .btn-primary {
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .contact-card {
    margin: 0 0.5rem;
    padding: 1.5rem 1rem;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-section p {
    font-size: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
#contactForm .form-control:focus-visible,
.btn-primary:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .contact-card {
    border: 2px solid var(--text-primary);
  }

  #contactForm .form-control {
    border-width: 3px;
  }
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.btn-primary:active {
  transform: translateY(0);
}

#feedback {
  border-radius: 10px;
  padding: 1rem;
  font-weight: 500;
}

#feedback.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-color: #c3e6cb;
  color: #155724;
}

#feedback.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border-color: #f5c6cb;
  color: #721c24;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .contact-section {
    padding: 2rem 0;
  }

  .contact-card {
    margin: 0 1rem;
    padding: 2rem !important;
  }

  .display-4 {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .contact-card {
    margin: 0 0.5rem;
    padding: 1.5rem !important;
  }

  .btn-primary {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Loading state for button */
.btn-loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
