/* ============================================
   CONTACT PAGE STYLES
   Enhanced UX/UI for the contact form and page sections
   ============================================ */

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.welcome-banner h2 {
  margin: 0 0 1.5rem 0;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
}

.welcome-banner p {
  margin: 0 0 2rem 0;
  font-size: 1.1rem;
  text-align: center;
  opacity: 0.95;
}

/* Audience Grid */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.audience-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.audience-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Quick Links Grid */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.quick-link-card {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: #2c3e50;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.quick-link-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.quick-link-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c3e50;
}

.quick-link-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #34495e;
  opacity: 0.9;
}

/* Contact Form Styles */
.contact-form {
  max-width: 600px;
  margin: 2rem 0;
}

.form-messages {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  display: none;
}

.form-messages.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-messages.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary, #2c3e50);
  font-size: 1rem;
}

.required-indicator {
  color: #dc3545;
  margin-left: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background-color: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background-color: #f8f9ff;
}

.form-group input:hover:not(:focus),
.form-group select:hover:not(:focus),
.form-group textarea:hover:not(:focus) {
  border-color: #9ca3af;
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.field-help {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
}

.character-count {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: right;
  font-weight: 600;
}

.error-message {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #dc3545;
  font-weight: 600;
}

.field-error {
  border-color: #dc3545 !important;
  background-color: #fff5f5 !important;
}

.field-error:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: #6b7280;
  border-color: #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #f3f4f6;
  border-color: #9ca3af;
  color: #374151;
}

.btn-spinner {
  display: none;
  animation: spin 1s linear infinite;
}

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

/* Auto-save Indicator */
.autosave-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #4caf50;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(20px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .quick-link-card {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #e2e8f0;
  }
  
  .quick-link-card h3 {
    color: #f7fafc;
  }
  
  .quick-link-card p {
    color: #cbd5e0;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    background-color: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
  }
  
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    background-color: #1a2332;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  }
  
  .form-group label {
    color: #e2e8f0;
  }
  
  .field-help,
  .character-count {
    color: #a0aec0;
  }
  
  .field-error {
    background-color: #4a1c1c !important;
    border-color: #dc3545 !important;
  }
  
  .form-messages.success {
    background-color: #1c4a2c;
    color: #9ae6b4;
    border-color: #2d5a3d;
  }
  
  .form-messages.error {
    background-color: #4a1c1c;
    color: #ffcdd2;
    border-color: #721c24;
  }
  
  .btn-secondary {
    color: #e2e8f0;
    border-color: #4a5568;
  }
  
  .btn-secondary:hover:not(:disabled) {
    background-color: #3a4556;
    border-color: #a0aec0;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .form-group input,
  .form-group select,
  .form-group textarea,
  .quick-link-card,
  .audience-item {
    transition: none;
  }
  
  .btn-spinner {
    animation: none;
  }
  
  .autosave-indicator {
    animation: none;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .welcome-banner {
    padding: 2rem 1.5rem;
  }
  
  .welcome-banner h2 {
    font-size: 1.5rem;
  }
  
  .audience-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  
  .audience-item {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .quick-links-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .contact-form {
    margin: 1rem 0;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .autosave-indicator {
    bottom: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .welcome-banner h2 {
    font-size: 1.25rem;
  }
  
  .welcome-banner p {
    font-size: 1rem;
  }
  
  .audience-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-link-card {
    padding: 1.25rem;
  }
  
  .quick-link-icon {
    font-size: 1.5rem;
  }
}
