*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  color: var(--text, #1e293b);
  line-height: 1.6;
  background: #f8fafc;
}

a {
  color: var(--primary, #1e40af);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  background: var(--header-bg, #fff);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.logo {
  height: 40px;
  width: auto;
}

.practice-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.header-nav a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: background 0.15s;
}

.header-nav a:hover,
.header-nav a.active {
  background: #f1f5f9;
  text-decoration: none;
}

/* Index page */
.index-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.index-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.index-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.index-hero p {
  font-size: 1.125rem;
  color: #64748b;
}

.category-section {
  margin-bottom: 2.5rem;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 700;
  padding-left: 0.75rem;
  border-left: 4px solid var(--primary);
  margin-bottom: 1rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.content-link {
  display: block;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.content-link:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

/* Article page */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.breadcrumb {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--primary);
}

.breadcrumb .separator {
  color: #cbd5e1;
}

.article-body {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 2rem 2.5rem;
  line-height: 1.75;
}

.article-body h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--secondary, var(--primary));
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.article-body th,
.article-body td {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.article-body th {
  background: #f8fafc;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: #1e293b;
  color: #e2e8f0;
  padding: 2rem 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-branding strong {
  color: #fff;
  font-size: 1.125rem;
}

.footer-branding p,
.footer-contact p {
  font-size: 0.875rem;
  margin-top: 0.25rem;
  color: #94a3b8;
}

.footer-copy {
  font-size: 0.8rem;
  color: #64748b;
}

.footer-copy a {
  color: #94a3b8;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  overflow: hidden;
}

.lang-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s;
}

.lang-btn:hover {
  background: #f1f5f9;
}

.lang-btn.active {
  background: var(--primary, #1e40af);
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .article-body {
    padding: 1.5rem 1rem;
  }

  .index-hero h1 {
    font-size: 1.75rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}
