:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #64748b;
  --text-color: #1e293b;
  --text-light: #64748b;
  --bg-color: #ffffff;
  --bg-gray: #f8fafc;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --max-width: 1280px;
  --header-height: 70px;
  --sidebar-width: 280px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  height: var(--header-height);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  display: none;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: var(--primary-color);
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: var(--bg-gray);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.lang-current:hover {
  border-color: var(--primary-color);
  background: #eef2ff;
}

.lang-icon {
  font-size: 1.1rem;
}

.lang-code {
  font-weight: 700;
  letter-spacing: 0.12em;
}

.lang-chevron {
  font-size: 0.7rem;
  opacity: 0.7;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  min-width: 140px;
  display: none;
  z-index: 100;
  padding: 0.35rem;
}

.lang-dropdown.active {
  display: block;
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.75rem;
  margin: 0.1rem 0;
  color: var(--text-color);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border-radius: 999px;
}

.lang-dropdown a:hover {
  background: #e0ecff;
  color: var(--primary-dark);
}

.lang-flag {
  display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/* Main Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 3rem;
  min-height: calc(100vh - var(--header-height) - 200px);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: fit-content;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 0.5rem;
}

.sidebar-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--bg-gray);
  color: var(--primary-color);
}

/* Main Content */
.main-content {
  max-width: 800px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--primary-color);
}

.breadcrumbs-separator {
  color: var(--border-color);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  margin-bottom: 3rem;
  color: white;
  box-shadow: 0 10px 40px rgba(37, 99, 235, 0.3);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.hero-section > * {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.2rem;
  line-height: 1.6;
  opacity: 0.95;
  margin-bottom: 0;
}

/* Hero actions (buttons) */
.hero-section .hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Article Header */
.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

/* Article Hero Image */
.article-hero {
  margin-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.article-hero-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.article-title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--text-color);
  background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.article-description {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-light);
  padding: 1.5rem;
  background: var(--bg-gray);
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

/* Article Content */
.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.article-content h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 0;
  list-style: none;
}

.article-content li {
  margin-bottom: 0.75rem;
  padding-left: 2rem;
  position: relative;
  line-height: 1.6;
}

.article-content ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2em;
}

.article-content ol {
  counter-reset: item;
}

.article-content ol li {
  counter-increment: item;
}

.article-content ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  background: var(--primary-color);
  color: white;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
}

.article-content a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.article-content a:hover {
  border-bottom-color: var(--primary-color);
}

.article-content strong {
  font-weight: 600;
  color: var(--text-color);
}

.article-content code {
  background: var(--bg-gray);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-light);
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2.5rem 0;
  font-size: 0.95rem;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background: var(--bg-color);
}

.article-content th,
.article-content td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.article-content th {
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--primary-color);
}

.article-content tbody tr {
  transition: background 0.2s;
}

.article-content tbody tr:hover {
  background: var(--bg-gray);
}

.article-content tbody tr:last-child td {
  border-bottom: none;
}

/* Table wrapper for responsive scroll */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Info Boxes & Callouts */
.info-box, .callout {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 4px solid var(--primary-color);
  padding: 1.75rem;
  margin: 2.5rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
}

.info-box::before {
  content: "ℹ️";
  position: absolute;
  left: 1.75rem;
  top: 1.75rem;
  font-size: 1.5rem;
}

.info-box p:first-of-type {
  margin-left: 2.5rem;
}

.info-box.warning {
  border-left-color: var(--warning-color);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.info-box.warning::before {
  content: "⚠️";
}

.info-box.success {
  border-left-color: var(--success-color);
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.info-box.success::before {
  content: "✅";
}

/* Comparison Cards */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.comparison-card {
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s;
}

.comparison-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.comparison-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.comparison-card ul {
  list-style: none;
  padding: 0;
}

.comparison-card li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.comparison-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* Related Articles */
.related-articles {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid var(--border-color);
}

.related-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.related-card {
  background: var(--bg-gray);
  padding: 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.related-card h3 {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.related-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* Thumbnails inside related cards */
.related-card-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: block;
}

/* Footer */
.footer {
  background: var(--text-color);
  color: #fff;
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Buttons & CTAs */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: var(--bg-gray);
  color: var(--text-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

/* Badges & Labels */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-color);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.success {
  background: var(--success-color);
}

.badge.warning {
  background: var(--warning-color);
}

.badge.secondary {
  background: var(--secondary-color);
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s;
  text-align: center;
}

.feature-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Steps / Process */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.step-item {
  counter-increment: step;
  position: relative;
  padding: 2rem;
  padding-left: 5rem;
  margin-bottom: 2rem;
  background: var(--bg-gray);
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
}

.step-item::before {
  content: counter(step);
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.step-item h3 {
  margin: 0 0 0.75rem 0;
  color: var(--text-color);
}

.step-item p {
  margin: 0;
  color: var(--text-light);
}

/* Pros & Cons Lists */
.pros-cons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.pros, .cons {
  padding: 2rem;
  border-radius: 12px;
}

.pros {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid var(--success-color);
}

.cons {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #ef4444;
}

.pros h3::before {
  content: "✅ ";
}

.cons h3::before {
  content: "❌ ";
}

.pros ul, .cons ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.pros li, .cons li {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.pros li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-size: 1.5rem;
  line-height: 1;
}

.cons li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #ef4444;
  font-size: 1.5rem;
  line-height: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: none;
  }
  
  .sidebar.mobile-active {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-color);
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  
  .main-nav.mobile-active {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-color);
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

