/* Custom CSS variables and utilities for the medical website */

:root {
  --background: 0 0% 100%;
  --foreground: 220 15% 25%;
  --card: 0 0% 100%;
  --card-foreground: 220 15% 25%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 15% 25%;
  --primary: 200 85% 55%;
  --primary-foreground: 0 0% 100%;
  --primary-light: 200 90% 90%;
  --secondary: 200 20% 96%;
  --secondary-foreground: 220 15% 25%;
  --accent: 160 60% 65%;
  --accent-foreground: 0 0% 100%;
  --accent-light: 160 60% 95%;
  --muted: 220 13% 95%;
  --muted-foreground: 220 10% 50%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 220 13% 91%;
  --input: 220 13% 91%;
  --ring: 200 85% 55%;
  --radius: 0.75rem;

  /* Medical theme custom tokens */
  --gradient-primary: linear-gradient(135deg, hsl(200 85% 55%) 0%, hsl(200 75% 65%) 100%);
  --gradient-accent: linear-gradient(135deg, hsl(160 60% 65%) 0%, hsl(180 55% 70%) 100%);
  --gradient-hero: linear-gradient(135deg, hsl(200 85% 55%) 0%, hsl(160 60% 65%) 100%);
  --shadow-soft: 0 4px 20px -2px hsl(200 85% 55% / 0.15);
  --shadow-card: 0 2px 12px -2px hsl(220 15% 25% / 0.08);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  border-color: hsl(var(--border));
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.6;
}

/* Utility classes */
.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-accent {
  background: var(--gradient-accent);
}

.bg-gradient-hero {
  background: var(--gradient-hero);
}

.bg-primary-light {
  background-color: hsl(var(--primary-light));
}

.bg-accent-light {
  background-color: hsl(var(--accent-light));
}

.text-primary {
  color: hsl(var(--primary));
}

.text-primary-foreground {
  color: hsl(var(--primary-foreground));
}

.text-accent {
  color: hsl(var(--accent));
}

.text-accent-foreground {
  color: hsl(var(--accent-foreground));
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.text-foreground {
  color: hsl(var(--foreground));
}

.bg-card {
  background-color: hsl(var(--card));
}

.bg-background {
  background-color: hsl(var(--background));
}

.bg-secondary\/30 {
  background-color: hsl(var(--secondary) / 0.3);
}

.bg-foreground\/5 {
  background-color: hsl(var(--foreground) / 0.05);
}

.border-border {
  border-color: hsl(var(--border));
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

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

.transition-all {
  transition: var(--transition-smooth);
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out forwards;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grid utilities */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.gap-12 {
  gap: 3rem;
}

/* Flex utilities */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

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

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

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

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

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1 1 0%;
}

/* Spacing */
.m-0 {
  margin: 0;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-8 {
  padding: 2rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-16 {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.pt-4 {
  padding-top: 1rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

.pt-8 {
  padding-top: 2rem;
}

.pt-20 {
  padding-top: 5rem;
}

.pb-6 {
  padding-bottom: 1.5rem;
}

.pl-4 {
  padding-left: 1rem;
}

.pl-6 {
  padding-left: 1.5rem;
}

.pl-10 {
  padding-left: 2.5rem;
}

.pr-4 {
  padding-right: 1rem;
}

/* Width and height */
.w-full {
  width: 100%;
}

.w-fit {
  width: fit-content;
}

.h-4 {
  height: 1rem;
}

.h-5 {
  height: 1.25rem;
}

.h-6 {
  height: 1.5rem;
}

.h-8 {
  height: 2rem;
}

.h-12 {
  height: 3rem;
}

.h-14 {
  height: 3.5rem;
}

.h-20 {
  height: 5rem;
}

.h-64 {
  height: 16rem;
}

.h-auto {
  height: auto;
}

.min-h-screen {
  min-height: 100vh;
}

.min-h-\[120px\] {
  min-height: 120px;
}

.min-h-\[400px\] {
  min-height: 400px;
}

/* Text */
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.font-medium {
  font-weight: 500;
}

.font-bold {
  font-weight: 700;
}

.leading-tight {
  line-height: 1.25;
}

.leading-relaxed {
  line-height: 1.625;
}

/* Background */
.bg-transparent {
  background-color: transparent;
}

.bg-background\/95 {
  background-color: hsl(var(--background) / 0.95);
}

.bg-background\/90 {
  background-color: hsl(var(--background) / 0.9);
}

.bg-background\/50 {
  background-color: hsl(var(--background) / 0.5);
}

.bg-primary {
  background-color: hsl(var(--primary));
}

.bg-primary\/10 {
  background-color: hsl(var(--primary) / 0.1);
}

.bg-primary\/90 {
  background-color: hsl(var(--primary) / 0.9);
}

.bg-accent {
  background-color: hsl(var(--accent));
}

.bg-accent\/90 {
  background-color: hsl(var(--accent) / 0.9);
}

.bg-card {
  background-color: hsl(var(--card));
}

.bg-gradient-to-t {
  background-image: linear-gradient(to top, var(--tw-gradient-stops));
}

.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

/* Border */
.border {
  border-width: 1px;
}

.border-2 {
  border-width: 2px;
}

.border-t {
  border-top-width: 1px;
}

.border-border {
  border-color: hsl(var(--border));
}

.border-primary {
  border-color: hsl(var(--primary));
}

.border-accent {
  border-color: hsl(var(--accent));
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.rounded-full {
  border-radius: 9999px;
}

/* Position */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.top-0 {
  top: 0;
}

.top-2 {
  top: 0.5rem;
}

.top-3 {
  top: 0.75rem;
}

.top-6 {
  top: 1.5rem;
}

.bottom-6 {
  bottom: 1.5rem;
}

.bottom-0 {
  bottom: 0;
}

.left-0 {
  left: 0;
}

.left-2 {
  left: 0.5rem;
}

.left-3 {
  left: 0.75rem;
}

.left-6 {
  left: 1.5rem;
}

.right-0 {
  right: 0;
}

.right-6 {
  right: 1.5rem;
}

.-bottom-6 {
  bottom: -1.5rem;
}

.-left-6 {
  left: -1.5rem;
}

.-left-2 {
  left: -0.5rem;
}

.-top-2 {
  top: -0.5rem;
}

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

/* Display */
.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}

/* Object fit */
.object-cover {
  object-fit: cover;
}

/* Z-index */
.z-10 {
  z-index: 10;
}

.z-50 {
  z-index: 50;
}

/* Opacity */
.opacity-0 {
  opacity: 0;
}

.opacity-90 {
  opacity: 0.9;
}

.opacity-100 {
  opacity: 1;
}

/* Transform */
.transform {
  transform: var(--tw-transform);
}

.translate-y-0 {
  transform: translateY(0);
}

.-translate-y-1 {
  transform: translateY(-0.25rem);
}

.scale-95 {
  transform: scale(0.95);
}

.scale-100 {
  transform: scale(1);
}

.scale-105 {
  transform: scale(1.05);
}

.scale-110 {
  transform: scale(1.1);
}

/* Transition */
.transition-all {
  transition: var(--transition-smooth);
}

.transition-colors {
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.transition-opacity {
  transition: opacity 0.15s ease-in-out;
}

.transition-shadow {
  transition: box-shadow 0.15s ease-in-out;
}

.transition-transform {
  transition: transform 0.15s ease-in-out;
}

/* Hover effects */
.hover\:scale-105:hover {
  transform: scale(1.05);
}

.hover\:scale-110:hover {
  transform: scale(1.1);
}

.hover\:shadow-soft:hover {
  box-shadow: var(--shadow-soft);
}

.hover\:shadow-lg:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.hover\:-translate-y-1:hover {
  transform: translateY(-0.25rem);
}

.hover\:border-primary:hover {
  border-color: hsl(var(--primary));
}

.hover\:border-accent:hover {
  border-color: hsl(var(--accent));
}

.hover\:bg-primary\/90:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.hover\:bg-accent\/90:hover {
  background-color: hsl(var(--accent) / 0.9);
}

.hover\:text-primary:hover {
  color: hsl(var(--primary));
}

.hover\:text-primary-foreground:hover {
  color: hsl(var(--primary-foreground));
}

.hover\:opacity-100:hover {
  opacity: 1;
}

/* Focus */
.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px hsl(var(--ring));
}

.focus\:border-transparent:focus {
  border-color: transparent;
}

/* Group hover */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

/* Responsive */
@media (min-width: 768px) {
  .md\:hidden {
    display: none;
  }

  .md\:flex {
    display: flex;
  }

  .md\:block {
    display: block;
  }

  .md\:text-left {
    text-align: left;
  }

  .md\:text-right {
    text-align: right;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:flex-row {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lg\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .lg\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }

  .lg\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--muted));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--primary));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary) / 0.8);
}

/* Form styles */
input, textarea {
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
}

/* Button styles */
button {
  cursor: pointer;
  font-family: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Image styles */
img {
  max-width: 100%;
  height: auto;
}

/* Link styles */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: hsl(var(--primary));
}

/* List styles */
ul {
  list-style: none;
}

li {
  list-style: none;
}

/* Heading styles */
h1, h2, h3, h4, h5, h6 {
  color: hsl(var(--foreground));
  font-weight: inherit;
  line-height: inherit;
}

/* Paragraph styles */
p {
  margin: 0;
}

/* Utility classes for gradients */
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Backdrop blur */
.backdrop-blur-md {
  backdrop-filter: blur(12px);
}

/* Duration */
.duration-300 {
  transition-duration: 300ms;
}

/* Ease */
.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Max width */
.max-w-3xl {
  max-width: 48rem;
}

.max-w-4xl {
  max-width: 56rem;
}

.max-w-xs {
  max-width: 20rem;
}

/* Whitespace */
.whitespace-nowrap {
  white-space: nowrap;
}

/* Cursor */
.cursor-pointer {
  cursor: pointer;
}

/* Select */
.select-none {
  user-select: none;
}

/* Scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Toast styles */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-card);
  z-index: 1000;
  max-width: 400px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-color: hsl(var(--primary));
}

.toast.error {
  border-color: hsl(var(--destructive));
}

.toast .title {
  font-weight: 600;
  margin-bottom: 4px;
}

.toast .description {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}