:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --accent-color: #f59e0b;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background-color: #fff;
}

/* Navbar */
.navbar-brand {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.navbar-brand span {
  color: var(--accent-color);
}

.nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::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='%23ffffff' fill-opacity='0.05'%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.5;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
}

.hero-section p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
}

/* Category badges */
.category-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.category-tools {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.category-websites {
  background-color: #dcfce7;
  color: #15803d;
}

.category-open-source {
  background-color: #fef3c7;
  color: #b45309;
}

/* Cards */
.article-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  background: #fff;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card .card-body {
  padding: 1.25rem;
}

.article-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.article-card h3 a {
  color: var(--text-dark);
  text-decoration: none;
}

.article-card h3 a:hover {
  color: var(--primary-color);
}

.article-card .excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Category section */
.category-section {
  padding: 4rem 0;
}

.category-section:nth-child(even) {
  background-color: var(--bg-light);
}

.section-title {
  font-weight: 800;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Article detail */
.article-hero {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 3rem 0 2rem;
  color: #fff;
}

.article-hero-overlay h1 {
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.article-content h2 {
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--bg-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-content code {
  background-color: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: #be185d;
}

.article-content pre {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.feature-box {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
}

.feature-box h4 {
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.pros-cons .pros,
.pros-cons .cons {
  padding: 1.25rem;
  border-radius: 12px;
}

.pros-cons .pros {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.pros-cons .cons {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

.pros-cons h4 {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pros-cons .pros h4 {
  color: #059669;
}

.pros-cons .cons h4 {
  color: #dc2626;
}

/* Sidebar */
.sidebar-card {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.sidebar-card h5 {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.related-link {
  display: block;
  padding: 0.5rem 0;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
}

.related-link:last-child {
  border-bottom: none;
}

.related-link:hover {
  color: var(--primary-color);
}

/* Footer */
.site-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.site-footer h5 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
}

.site-footer a {
  color: #94a3b8;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer .footer-bottom {
  border-top: 1px solid #334155;
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 1rem 0;
  margin-bottom: 0;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
}

/* Stats bar */
.stats-bar {
  background: var(--bg-light);
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.stat-item .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
}

.stat-item .label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hero-section {
    padding: 2.5rem 0;
  }

  .article-hero {
    height: 250px;
  }

  .pros-cons {
    grid-template-columns: 1fr;
  }

  .category-section {
    padding: 2.5rem 0;
  }

  .article-content {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .article-card img {
    height: 180px;
  }
}
