/* ============================================
   CURIFY — Global Styles
   AI-Powered Medical Tourism Platform
   ============================================ */

/* === CSS Variables === */
:root {
  --primary: #0066CC;
  --primary-dark: #004999;
  --primary-light: #E8F4FD;
  --trust-green: #22C55E;
  --trust-green-light: #DCFCE7;
  --warning-amber: #F59E0B;
  --warning-amber-light: #FEF3C7;
  --alert-red: #EF4444;
  --alert-red-light: #FEE2E2;
  --navy: #0F172A;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50: #F9FAFB;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.2s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* === Typography === */
h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.025em; }
h2 { font-size: 2rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
h4 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h5 { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
p { color: var(--gray-600); line-height: 1.7; }

@media (max-width: 768px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* === Layout === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

.section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section { padding: 48px 0; }
}

/* === Navigation === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
}

.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--gray-600);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 600; }

.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta .btn-outline { display: none; }
  .hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    gap: 16px;
  }
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--navy);
  color: var(--white);
}
.btn-secondary:hover {
  background: #1E293B;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  padding: 8px 16px;
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.btn-success {
  background: var(--trust-green);
  color: var(--white);
}
.btn-success:hover {
  background: #16A34A;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

/* === Cards === */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: var(--transition);
}

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

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

.card-bordered {
  border: 1px solid var(--gray-200);
  box-shadow: none;
}

.card-bordered:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--trust-green-light); color: #15803D; }
.badge-amber { background: var(--warning-amber-light); color: #B45309; }
.badge-red { background: var(--alert-red-light); color: #DC2626; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* === Progress / Meters === */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1s ease;
}

.progress-fill.green { background: var(--trust-green); }
.progress-fill.blue { background: var(--primary); }
.progress-fill.amber { background: var(--warning-amber); }
.progress-fill.red { background: var(--alert-red); }

/* === Fairness Score === */
.fairness-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

.fairness-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.fairness-green .fairness-dot { background: var(--trust-green); }
.fairness-amber .fairness-dot { background: var(--warning-amber); }
.fairness-red .fairness-dot { background: var(--alert-red); }
.fairness-green { color: #15803D; }
.fairness-amber { color: #B45309; }
.fairness-red { color: #DC2626; }

/* === Alerts === */
.alert {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert-info { background: var(--primary-light); color: var(--primary-dark); border-left: 4px solid var(--primary); }
.alert-success { background: var(--trust-green-light); color: #15803D; border-left: 4px solid var(--trust-green); }
.alert-warning { background: var(--warning-amber-light); color: #92400E; border-left: 4px solid var(--warning-amber); }
.alert-danger { background: var(--alert-red-light); color: #991B1B; border-left: 4px solid var(--alert-red); }

.alert-icon { font-size: 1.2rem; flex-shrink: 0; }

/* === Forms === */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--gray-900);
  transition: var(--transition);
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-input::placeholder { color: var(--gray-400); }

/* === Grid Helpers === */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* === Flex Helpers === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* === Spacing === */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* === Text Helpers === */
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--primary); }
.text-green { color: var(--trust-green); }
.text-amber { color: var(--warning-amber); }
.text-red { color: var(--alert-red); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* === Divider === */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 24px 0;
}

/* === Tooltip === */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.tooltip:hover::after { opacity: 1; }

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease forwards; }
.animate-slide-left { animation: slideInLeft 0.5s ease forwards; }
.animate-slide-right { animation: slideInRight 0.5s ease forwards; }
.animate-pulse { animation: pulse 2s infinite; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.1s; }
.stagger > *:nth-child(2) { animation-delay: 0.2s; }
.stagger > *:nth-child(3) { animation-delay: 0.3s; }
.stagger > *:nth-child(4) { animation-delay: 0.4s; }
.stagger > *:nth-child(5) { animation-delay: 0.5s; }
.stagger > *:nth-child(6) { animation-delay: 0.6s; }
.stagger > *:nth-child(7) { animation-delay: 0.7s; }
.stagger > *:nth-child(8) { animation-delay: 0.8s; }

/* === Spinner === */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

/* === Skeleton Loading === */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-heading {
  height: 28px;
  width: 60%;
  margin-bottom: 16px;
}

/* === Page Wrapper === */
.page-wrapper {
  padding-top: 64px;
  min-height: 100vh;
}

.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 32px 0;
}

.page-header h1 {
  font-size: 1.75rem;
  color: var(--navy);
}

.page-header p {
  margin-top: 8px;
}

/* === Step Indicator === */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid var(--gray-300);
  color: var(--gray-400);
  background: var(--white);
  flex-shrink: 0;
}

.step-dot.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.step-dot.completed {
  border-color: var(--trust-green);
  background: var(--trust-green);
  color: var(--white);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-300);
  min-width: 20px;
}

.step-line.completed {
  background: var(--trust-green);
}

/* === Footer === */
.footer {
  background: var(--navy);
  color: var(--gray-400);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.footer-links {
  list-style: none;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
  color: var(--gray-400);
  font-size: 0.85rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

/* === Checklist === */
.checklist {
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.checklist li::before {
  content: '✓';
  color: var(--trust-green);
  font-weight: 700;
  font-size: 0.85rem;
}

.checklist li.excluded {
  color: var(--gray-400);
  text-decoration: line-through;
}

.checklist li.excluded::before {
  content: '✗';
  color: var(--gray-400);
}

/* === Tags === */
.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* === Print === */
@media print {
  .navbar, .footer, .btn { display: none; }
  .page-wrapper { padding-top: 0; }
  body { background: white; }
}
