/* Modern Ayurvedic Herbs Database - Contemporary Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  /* Modern color palette */
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #10b981;
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --bg: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Offset for sticky header */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }

/* Border & Shadow */
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Typography */
.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: 2rem; line-height: 2.5rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }

/* Colors */
.text-gray-600 { color: var(--text-secondary); }
.text-gray-700 { color: var(--text); }
.text-gray-800 { color: var(--text); }
.text-green-800 { color: var(--primary-dark); }
.text-white { color: #fff; }
.bg-white { background: #fff; }
.bg-slate-50 { background: var(--bg-secondary); }
.bg-green-50 { background: #ecfdf5; }
.bg-green-600 { background: var(--primary); }
.bg-sky-600 { background: #0284c7; }
.border { border: 1px solid var(--border); }
.border-green-600 { border-color: var(--primary); }
.border-gray-200 { border-color: var(--border); }

/* Badge - Modern pill design */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: var(--primary-dark);
  border: 1px solid rgba(5, 150, 105, 0.2);
  transition: var(--transition);
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.2);
}

/* Header - Modern sticky with blur */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.header a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.header a:hover {
  color: var(--primary);
  background: var(--bg-secondary);
}

.header .text-xl {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* Logo styling */
.header img.logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 50%, #e0f2fe 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23059669' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

/* Buttons - Modern with gradient */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.4);
  color: #fff;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* Cards - Modern elevated design */
.card {
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(5, 150, 105, 0.3);
}

.card img {
  transition: var(--transition);
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.card:hover img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* Forms */
input[type="search"],
input[type="text"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--bg);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  z-index: 100;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* Table of Contents - Modern sidebar */
.toc {
  position: sticky;
  top: 6rem;
}

.toc figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.toc figure img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: cover;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  color: var(--text-secondary);
  padding: 0.5rem 0;
  display: block;
  border-left: 3px solid transparent;
  padding-left: 1rem;
  transition: var(--transition);
}

.toc a:hover {
  color: var(--primary);
  border-left-color: var(--primary);
  background: var(--bg-secondary);
}

/* Footer - Modern dark theme */
.footer {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: #e5e7eb;
  margin-top: 4rem;
}

.footer a {
  color: #d1d5db;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary-light);
}

/* Prose - Modern typography */
.prose {
  line-height: 1.75;
  color: var(--text);
}

.prose h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.prose p {
  margin-bottom: 1.25rem;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
  margin-left: 1.5rem;
  color: var(--text);
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose strong {
  font-weight: 600;
  color: var(--text);
}

.prose a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(5, 150, 105, 0.3);
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--primary-dark);
  text-decoration-color: var(--primary-dark);
}

.prose code {
  background: var(--bg-tertiary);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
  color: var(--accent);
}

.prose hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2rem 0;
}

.prose blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card,
article {
  animation: fadeIn 0.5s ease-out;
}

/* Breadcrumb */
nav[aria-label="Breadcrumb"] {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

nav[aria-label="Breadcrumb"] a {
  color: var(--text-secondary);
  transition: var(--transition);
}

nav[aria-label="Breadcrumb"] a:hover {
  color: var(--primary);
}

/* Note/Alert boxes */
[role="note"] {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .prose h1 { font-size: 2rem; }
  .prose h2 { font-size: 1.5rem; }
  .text-3xl { font-size: 1.75rem; }
}
