/* CreatorFlow Blog Styles */
/* Matches the main app design system with light/dark theme support */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
  /* Yale Blue - Primary dark blue */
  --yale-blue: 215 38% 28%;
  --yale-blue-100: 218 38% 6%;
  --yale-blue-600: 215 38% 42%;
  --yale-blue-700: 215 40% 57%;

  /* Blue Slate - Secondary blue */
  --blue-slate: 197 35% 33%;
  --blue-slate-600: 197 34% 47%;

  /* Lavender Mist - Light background */
  --lavender-mist: 290 20% 95%;
  --lavender-mist-400: 293 24% 76%;

  /* Soft Fawn - Warm accent */
  --soft-fawn: 40 55% 65%;
  --soft-fawn-900: 40 53% 93%;

  /* Faded Copper - Neutral warm */
  --faded-copper: 36 29% 44%;

  /* Semantic Color Tokens - Light Theme */
  --background: 290 20% 95%;
  --foreground: 215 38% 28%;
  --card: 0 0% 100%;
  --card-foreground: 215 38% 28%;
  --primary: 215 38% 28%;
  --primary-foreground: 0 0% 100%;
  --secondary: 290 20% 95%;
  --secondary-foreground: 197 35% 33%;
  --muted: 290 15% 92%;
  --muted-foreground: 197 20% 45%;
  --accent: 40 55% 65%;
  --accent-foreground: 38 54% 13%;
  --border: 215 30% 80%;
  --success: 142 76% 36%;
  --warning: 38 92% 50%;
  --destructive: 0 84% 60%;
  --radius: 0.75rem;
}

/* Dark Theme */
@media (prefers-color-scheme: dark) {
  :root {
    --background: 215 38% 6%;
    --foreground: 290 20% 95%;
    --card: 215 38% 11%;
    --card-foreground: 290 20% 95%;
    --primary: 215 40% 57%;
    --primary-foreground: 0 0% 100%;
    --secondary: 215 30% 16%;
    --secondary-foreground: 215 40% 85%;
    --muted: 215 25% 14%;
    --muted-foreground: 215 20% 55%;
    --accent: 40 55% 65%;
    --accent-foreground: 40 53% 93%;
    --border: 215 30% 20%;
  }
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: hsl(var(--foreground));
}

h1 {
  font-size: 2.25rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: hsl(var(--accent));
}

strong, b {
  font-weight: 600;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  height: 2.5rem;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: hsl(var(--foreground));
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--muted));
}

/* ===== Cards ===== */
.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 32px hsl(var(--border) / 0.3);
  transform: translateY(-2px);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background-color: hsl(var(--muted));
}

.card-content {
  padding: 1.5rem;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.2);
}

.badge-accent {
  background-color: hsl(var(--accent) / 0.1);
  color: hsl(var(--accent-foreground));
  border-color: hsl(var(--accent) / 0.3);
}

/* ===== Blog Index Page ===== */
.blog-hero {
  padding-top: 8rem;
  padding-bottom: 4rem;
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .blog-hero h1 {
    font-size: 3rem;
  }
}

.blog-hero p {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  max-width: 600px;
  margin: 0 auto;
}

/* Category Filters */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.category-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 9999px;
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn:hover,
.category-btn.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

/* Article Grid */
.article-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 4rem;
}

@media (min-width: 640px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  display: flex;
  flex-direction: column;
}

.article-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--accent) / 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card-image svg {
  width: 3rem;
  height: 3rem;
  color: hsl(var(--primary) / 0.4);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.article-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: hsl(var(--card-foreground));
  transition: color 0.2s ease;
}

.article-card:hover .article-title {
  color: hsl(var(--primary));
}

.article-excerpt {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--primary));
}

.read-more:hover {
  gap: 0.5rem;
}

/* ===== Breadcrumb Navigation ===== */
.breadcrumb {
  padding-top: 5rem;
  max-width: 800px;
  margin: 0 auto;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  color: hsl(var(--muted-foreground));
}

.breadcrumb-list li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: hsl(var(--border));
}

.breadcrumb-list li a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-list li a:hover {
  color: hsl(var(--primary));
}

.breadcrumb-list li:last-child {
  color: hsl(var(--foreground));
  font-weight: 500;
}

/* ===== Article Page ===== */
.article-header {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.article-header .badge {
  margin-bottom: 1rem;
}

.article-header h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .article-header h1 {
    font-size: 2.75rem;
  }
}

.article-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

.author-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.author-meta {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Article Content */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

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

.article-content h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

.article-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

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

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

/* Article Content Links - Make them visible */
.article-content a {
  color: hsl(var(--blue-slate-600));
  text-decoration: underline;
  text-decoration-color: hsl(var(--blue-slate-600) / 0.4);
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.article-content a:hover {
  color: hsl(var(--primary));
  text-decoration-color: hsl(var(--primary));
}

@media (prefers-color-scheme: dark) {
  .article-content a {
    color: hsl(var(--blue-slate-600));
    text-decoration-color: hsl(var(--blue-slate-600) / 0.5);
  }
  
  .article-content a:hover {
    color: hsl(var(--accent));
    text-decoration-color: hsl(var(--accent));
  }
}

.article-content blockquote {
  border-left: 4px solid hsl(var(--primary));
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: hsl(var(--muted-foreground));
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.05), hsl(var(--accent) / 0.05));
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.cta-box h3 {
  margin-top: 0;
  font-size: 1.5rem;
}

.cta-box p {
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

/* Related Articles */
.related-articles {
  padding: 4rem 0;
  border-top: 1px solid hsl(var(--border));
}

.related-articles h2 {
  text-align: center;
  margin-bottom: 2rem;
  border: none;
  padding: 0;
}

/* ===== Newsletter Section ===== */
.newsletter {
  background-color: hsl(var(--muted));
  padding: 4rem 0;
  text-align: center;
}

.newsletter h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.newsletter p {
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .newsletter-form {
    flex-direction: row;
  }
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
}

.newsletter-input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

/* ===== Footer ===== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid hsl(var(--border));
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-logo {
  height: 2rem;
  width: auto;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
}

.footer-link {
  color: hsl(var(--muted-foreground));
}

.footer-link:hover {
  color: hsl(var(--foreground));
}

.footer-copyright {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* ===== Utilities ===== */
.text-center {
  text-align: center;
}

.text-muted {
  color: hsl(var(--muted-foreground));
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground));
}
