/**
 * Blog-specific overrides
 * Uses main app design system (blog-styles.css) + minimal blog-specific layout
 */

/* Navbar styles from main app */
.text-gradient {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.backdrop-blur-sm {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Language dropdown scroll */
#language-selector-dropdown {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground)) transparent;
}

#language-selector-dropdown::-webkit-scrollbar {
  width: 6px;
}

#language-selector-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

#language-selector-dropdown::-webkit-scrollbar-thumb {
  background-color: hsl(var(--muted-foreground));
  border-radius: 3px;
}

/* Remove any margin around navbar */
body {
  margin: 0;
  padding: 0;
}

nav {
  margin: 0 !important;
  padding: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  max-width: 1400px;
  margin: 16px auto 0;
  padding: 0 20px;
  font-size: 0.9rem;
  color: hsl(var(--foreground));
  opacity: 0.7;
}

.breadcrumbs a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  color: hsl(var(--primary) / 0.8);
}

/* Container - wider for better desktop/ultrawide experience */
.container {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Article container narrower for readability */
.container article {
  max-width: 800px;
  margin: 0 auto;
}

/* Article card */
article {
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 2px 20px hsla(var(--foreground) / 0.08);
  border: 1px solid hsl(var(--border));
}

.article-meta {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-category {
  display: block;
  font-size: 0.85rem;
}

.article-category a {
  color: hsl(var(--primary));
  font-weight: 600;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.article-tags a {
  color: hsl(var(--accent));
  transition: opacity 0.2s;
}

.article-tags a:hover {
  opacity: 0.7;
}

/* Article typography (inherits from main app + overrides) */
article h1 {
  font-size: 2.5rem;
  color: hsl(var(--foreground));
  margin-bottom: 20px;
  line-height: 1.3;
  font-weight: 700;
}

article h2 {
  font-size: 1.8rem;
  color: hsl(var(--foreground));
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: 600;
}

article h3 {
  font-size: 1.4rem;
  color: hsl(var(--muted-foreground));
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

article p {
  margin-bottom: 20px;
  color: hsl(var(--foreground));
  line-height: 1.8;
  opacity: 0.9;
}

article ul, article ol {
  margin: 20px 0 20px 40px;
  color: hsl(var(--foreground));
  opacity: 0.9;
}

article li {
  margin-bottom: 10px;
  color: hsl(var(--foreground));
}

article strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

article a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

article a:hover {
  text-decoration: underline;
  color: hsl(var(--primary) / 0.8);
}

/* Tip Box */
.tip-box {
  background: hsl(var(--primary) / 0.05);
  border-left: 4px solid hsl(var(--primary));
  padding: 20px;
  margin: 30px 0;
  border-radius: calc(var(--radius) * 0.5);
}

.tip-box h3 {
  margin-top: 0;
  color: hsl(var(--primary));
}

/* CTA Box */
.cta-box {
  background: var(--gradient-primary);
  color: white;
  padding: 30px;
  margin: 40px 0;
  border-radius: var(--radius);
  text-align: center;
}

.cta-box h3 {
  color: white;
  margin-bottom: 15px;
}

.cta-button {
  display: inline-block;
  background: white;
  color: hsl(var(--primary));
  padding: 12px 30px;
  border-radius: calc(var(--radius) * 2);
  text-decoration: none;
  font-weight: 600;
  margin-top: 10px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Blog Index - Article Cards - mobile first, then desktop/ultrawide */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 40px;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Ultrawide: 4 columns */
@media (min-width: 1536px) {
  .articles-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.article-card {
  background: hsl(var(--card));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 20px hsla(var(--foreground) / 0.08);
  border: 1px solid hsl(var(--border));
  transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px hsla(var(--foreground) / 0.15);
}

.article-image {
  width: 100%;
  height: 200px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.article-content {
  padding: 25px;
}

.article-title {
  font-size: 1.4rem;
  color: hsl(var(--foreground));
  margin-bottom: 12px;
  line-height: 1.3;
}

.article-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-title a:hover {
  color: hsl(var(--primary));
}

.article-excerpt {
  color: hsl(var(--foreground));
  opacity: 0.85;
  margin-bottom: 15px;
  line-height: 1.6;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  padding: 4px 12px;
  border-radius: calc(var(--radius) * 0.5);
  font-size: 0.8rem;
}

/* Footer */
footer {
  background: hsl(222.2 50% 8%);
  color: hsl(210 40% 98%);
  padding: 40px 20px;
  margin-top: 60px;
  text-align: center;
}

footer a {
  color: hsl(var(--primary));
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  article h1 {
    font-size: 2rem;
  }

  article h2 {
    font-size: 1.5rem;
  }

  article {
    padding: 20px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .cta-box h2 {
    font-size: 1.8rem;
  }
}
