/* Additional custom styles for Preact Health website */

/* Email Contact Form Styling */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 0.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  font-family: inherit;
}

.contact-form button {
  background: #0081A7;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background: #006a8a;
}

/* Stats Display */
.stats-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.stat-box {
  text-align: center;
  padding: 1.5rem;
  min-width: 150px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #0081A7;
  display: block;
}

.stat-label {
  font-size: 1rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Timeline (for version history, etc.) */
.timeline {
  position: relative;
  padding: 2rem 0;
  margin: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #00AFB9;
  transform: translateX(-50%);
}

.timeline-item {
  margin-bottom: 2rem;
  position: relative;
}

.timeline-content {
  background: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 45%;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: 55%;
}

/* Team Cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.team-card {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.team-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 4px solid #00AFB9;
}

.team-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0081A7;
  margin-bottom: 0.5rem;
}

.team-role {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Badge/Tag Styling */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin: 0.25rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: #e0f4f7;
  color: #0081A7;
}

.badge.success {
  background: #d4edda;
  color: #155724;
}

.badge.warning {
  background: #fff3cd;
  color: #856404;
}

.badge.error {
  background: #f8d7da;
  color: #721c24;
}

/* Math Equations Styling */
.katex {
  font-size: 1.1em;
}

.katex-display {
  margin: 1.5rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Loading Spinner */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0081A7;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

/* Alert Boxes */
.alert {
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-info {
  background: #e0f4f7;
  border-color: #00AFB9;
  color: #004852;
}

.alert-warning {
  background: #fff3cd;
  border-color: #F07167;
  color: #856404;
}

.alert-success {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

/* Callout Boxes */
.callout {
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  background: #f8f9fa;
  border-left: 4px solid #0081A7;
}

.callout-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #0081A7;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

figure {
  margin: 2rem 0;
  text-align: center;
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 40px !important;
  }

  .stats-container {
    flex-direction: column;
    align-items: center;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
  }
  
  /* Uncomment to enable dark mode
  body {
    background: var(--bg-color);
    color: var(--text-color);
  }
  */
}

/* Print Optimization */
@media print {
  .no-print {
    display: none !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }

  .timeline::before {
    background: #000;
  }
}
