/* OpenclawMCP Blog - Custom Styles */

:root {
  --color-primary: #6d28d9;
  --color-primary-dark: #5b21b6;
  --color-primary-light: #8b5cf6;
  --color-accent: #10b981;
  --color-accent-dark: #059669;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-secondary: #64748b;
  --color-border: #e2e8f0;
  --color-code-bg: #1e1e2e;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 0.75rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== HEADER / NAVIGATION ===== */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-primary);
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.875rem;
}

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

.nav-links a {
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1.25rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

.mobile-menu-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, #6d28d9 0%, #4338ca 50%, #0891b2 100%);
  color: white;
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::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-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--color-primary);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  color: var(--color-primary-dark);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== BLOG CARD GRID ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.blog-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e0e7ff, #ddd6fe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 3rem;
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.blog-card-tag {
  background: #ede9fe;
  color: var(--color-primary);
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-card-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.blog-card-body h3 a {
  color: var(--color-text);
}

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

.blog-card-body p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-primary);
}

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

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 2px dashed var(--color-border);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.empty-state p {
  color: var(--color-text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* ===== FEATURES / INFO GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: box-shadow 0.2s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ===== NEWSLETTER / CTA SECTION ===== */
.newsletter-section {
  background: linear-gradient(135deg, #6d28d9, #4338ca);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  color: white;
  margin-top: 4rem;
}

.newsletter-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.newsletter-section p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
  border-color: rgba(255, 255, 255, 0.6);
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--color-primary);
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.newsletter-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== PAGE HEADER (for inner pages) ===== */
.page-header {
  background: linear-gradient(135deg, #6d28d9 0%, #4338ca 100%);
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.9;
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.breadcrumbs a {
  color: var(--color-text-secondary);
}

.breadcrumbs a:hover {
  color: var(--color-primary);
}

.breadcrumbs span {
  margin: 0 0.5rem;
}

/* ===== ARTICLE / POST STYLES ===== */
.article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.article-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.article-meta .author-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.875rem;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--color-text);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--color-text);
  font-size: 1.0625rem;
  line-height: 1.8;
}

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

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

.article-content code {
  background: #f1f5f9;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
}

.article-content pre {
  background: var(--color-code-bg);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

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

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

/* ===== ABOUT PAGE ===== */
.about-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.about-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--color-text);
}

.about-content p {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text);
}

.about-content ul {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.about-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-text);
  color: #94a3b8;
  padding: 3rem 1.5rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #334155;
}

.footer-brand p {
  margin-top: 0.75rem;
  line-height: 1.6;
  font-size: 0.9375rem;
}

.footer-links h4,
.footer-social h4 {
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: background 0.2s, color 0.2s;
  font-size: 1rem;
}

.social-link:hover {
  background: var(--color-primary);
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.875rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: all 0.2s;
}

.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination .active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1.0625rem;
  }

  .hero {
    padding: 3rem 1.5rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a.active::after {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .article-header h1 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .main-content {
    padding: 2rem 1rem;
  }
}
