/* Components v2 - Warm, Elegant, Medical */

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-xl { max-width: var(--container-xl); }
.container-2xl { max-width: var(--container-2xl); }

/* ============================================
   BUTTONS - Soft and inviting
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
}

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

/* Primary Button - Swiss red */
.btn-primary {
  background: var(--color-swiss-red);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-swiss-red-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Secondary Button - Trust blue */
.btn-secondary {
  background: var(--color-trust-blue);
  color: var(--color-white);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-warm);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--color-swiss-red);
  background: var(--color-red-soft);
  transform: translateY(-2px);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--color-text);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--color-surface-hover);
}

/* White Button */
.btn-white {
  background: var(--color-white);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover:not(:disabled) {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
}

/* Icon Button */
.btn-icon {
  padding: var(--space-3);
  aspect-ratio: 1;
}

/* ============================================
   CARDS - Soft, rounded, warm
   ============================================ */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  transition: all var(--duration-base) var(--ease-out);
}

.card-bordered {
  border: 1px solid var(--color-border);
}

.card-shadow {
  box-shadow: var(--shadow-md);
}

.card-hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-warm {
  background: var(--color-surface-warm);
}

.card-gradient {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-sky) 100%);
}

.card-peach {
  background: linear-gradient(135deg, var(--color-peach-light) 0%, var(--color-surface) 100%);
}

/* ============================================
   BADGES & CHIPS - Soft pills
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
}

.badge-primary {
  background: var(--color-sky);
  color: var(--color-trust-blue);
}

.badge-accent {
  background: var(--color-red-soft);
  color: var(--color-swiss-red-dark);
}

.badge-success {
  background: var(--color-mint-light);
  color: var(--color-teal);
}

.badge-dark {
  background: var(--color-charcoal);
  color: var(--color-white);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all var(--duration-fast) var(--ease-out);
}

.chip:hover {
  border-color: var(--color-accent);
  background: var(--color-peach-light);
}

/* ============================================
   NAVIGATION - Clean and minimal
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: var(--space-4) 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--duration-base) var(--ease-out);
}

.nav-scrolled {
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-xl);
  color: var(--color-text);
}

.nav-logo img, .nav-logo svg {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--color-swiss-red);
  background: var(--color-light-gray);
}

.nav-link.active {
  color: var(--color-swiss-red);
  background: var(--color-light-gray);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  padding: var(--space-1);
  background: var(--color-surface);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

.lang-btn {
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-gray);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

.lang-btn:hover {
  color: var(--color-text);
}

.lang-btn.active {
  background: var(--color-swiss-red);
  color: var(--color-white);
}

/* Mobile Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: var(--space-4);
    right: var(--space-4);
    flex-direction: column;
    padding: var(--space-4);
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: var(--space-3) var(--space-4);
  }

  .nav-toggle {
    display: flex;
  }

  .lang-switcher {
    display: none;
  }
}

/* ============================================
   INPUTS - Soft and friendly
   ============================================ */

.input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  color: var(--color-text);
  transition: all var(--duration-fast) var(--ease-out);
}

.input::placeholder {
  color: var(--color-text-muted);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary-soft);
  box-shadow: 0 0 0 4px var(--color-sky);
}

.input-lg {
  padding: var(--space-5) var(--space-6);
  font-size: var(--text-lg);
  border-radius: var(--radius-2xl);
}

.input-group {
  display: flex;
  gap: var(--space-3);
}

.input-group .input {
  flex: 1;
}

textarea.input {
  min-height: 140px;
  resize: vertical;
  border-radius: var(--radius-xl);
}

/* ============================================
   AVATAR - Rounded with border
   ============================================ */

.avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--color-sky);
  border: 2px solid var(--color-white);
  box-shadow: var(--shadow-sm);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 80px; height: 80px; }

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  margin-left: -12px;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* ============================================
   FOOTER - Clean and warm
   ============================================ */

.footer {
  margin-top: auto;
  padding: var(--space-16) 0 var(--space-8);
  background: var(--color-surface-warm);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-12);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  max-width: 280px;
}

.footer-brand p {
  margin-top: var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.footer-column h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.social-links {
  display: flex;
  gap: var(--space-3);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}

.social-links a:hover {
  background: var(--color-accent);
  color: var(--color-charcoal);
  transform: translateY(-2px);
}

.social-links svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   ORGANIC SHAPES - Blobs and curves
   ============================================ */

.blob {
  border-radius: var(--radius-blob);
}

.blob-1 { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
.blob-2 { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
.blob-3 { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; }

/* ============================================
   UTILITIES
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.mx-auto { margin-inline: auto; }
.mt-auto { margin-top: auto; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { inset: 0; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.rounded-full { border-radius: var(--radius-full); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }

.bg-cream { background: var(--color-cream); }
.bg-surface { background: var(--color-surface); }
.bg-warm { background: var(--color-surface-warm); }
.bg-sky { background: var(--color-sky); }
.bg-peach { background: var(--color-peach-light); }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

.pointer-events-none { pointer-events: none; }
