/* Blog Styles - Using main design system variables */
/* Note: This file inherits variables from style.css, but defines blog-specific overrides */
:root {
  --section-spacing: var(--space-3xl);
  --container-pad: var(--space-xl);
  --radius: var(--radius-md);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  background: radial-gradient(ellipse at 10% -10%, #1f2937 0%, rgba(17,24,39,0) 60%),
              radial-gradient(ellipse at 100% 0%, #0b1324 0%, var(--bg-primary) 60%);
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
  color: var(--text-primary);
  line-height: var(--line-height-relaxed);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

@media (min-width: 1024px) {
  :root { --section-spacing: 84px; --container-pad: 32px; }
}

/* Header */
header.sticky {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(10px);
  background: var(--bg-overlay);
  border-bottom: 1px solid var(--border-default);
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  padding: 12px var(--container-pad);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #6366f1, #8b5cf6) padding-box,
              linear-gradient(135deg, #f472b6, #60a5fa, #a78bfa) border-box;
  box-shadow: 0 8px 22px rgba(99,102,241,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-badge img {
  width: 22px;
  height: 22px;
  display: block;
}

.brand-name {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(99, 102, 241, 0.25);
  white-space: nowrap;
}

nav {
  display: none;
  gap: 24px;
}

@media (min-width: 768px) {
  nav { display: flex; }
}

nav a {
  color: var(--text-muted);
  transition: color var(--transition-base);
  text-decoration: none;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter .2s ease, box-shadow .2s ease, transform .12s ease;
  text-decoration: none;
}

.bg-gradient-primary {
  background: var(--color-gradient-primary);
  color: #ffffff !important;
  box-shadow: var(--shadow-glow-lg);
}

.bg-gradient-primary,
.bg-gradient-primary a {
  color: #ffffff !important;
}

.bg-gradient-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-lg);
}

/* Blog Hero */
.blog-hero {
  padding: 72px 0 40px;
  text-align: center;
}

.blog-hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.06;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #f472b6, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blog-hero p {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 auto 24px;
  max-width: 760px;
  line-height: 1.6;
}

/* Featured Post */
.featured-post {
  margin-bottom: 48px;
}

.featured-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .featured-card {
    grid-template-columns: 1fr 1fr;
  }
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.35);
}

.featured-image {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 40px;
}

.featured-image iconify-icon {
  font-size: 80px;
  color: white;
  opacity: 0.95;
}

.featured-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.featured-content h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.2;
}

.featured-content h2 a {
  color: var(--text);
  text-decoration: none;
}

.featured-content h2 a:hover {
  color: var(--primary);
}

.featured-excerpt {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Blog Grid */
.blog-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s ease;
  font-size: 14px;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border-color: transparent;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

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

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

.blog-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.35);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 20px;
}

.blog-card-image iconify-icon {
  font-size: 64px;
  color: white;
  opacity: 0.95;
}

.blog-card-content {
  padding: 20px;
}

.blog-card-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

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

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

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 48px 0;
}

.pagination a,
.pagination span {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all .2s ease;
}

.pagination a:hover {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
}

.pagination .active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
}

/* Newsletter */
.newsletter {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin: 48px 0;
}

.newsletter h3 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 12px;
}

.newsletter p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
}

.newsletter-form input::placeholder {
  color: var(--text-muted);
}

.newsletter-form button {
  padding: 12px 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: filter .2s ease;
}

.newsletter-form button:hover {
  filter: brightness(0.95);
}

.newsletter-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

.modal-icon svg {
  width: 32px;
  height: 32px;
}

.modal-icon.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.35);
}

.modal-content h3 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 12px;
  text-align: center;
}

.modal-content p {
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions .btn {
  min-width: 120px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  padding: 32px 0;
  text-align: center;
  margin-top: 64px;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

/* Article Page */
.article-header {
  padding: 48px 0 32px;
  max-width: 800px;
  margin: 0 auto;
}

.article-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.article-content h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 48px 0 16px;
  line-height: 1.3;
}

.article-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 32px 0 12px;
  line-height: 1.4;
}

.article-content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

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

.article-content a:hover {
  color: #8b5cf6;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 24px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-muted);
}

.cta-box {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

.cta-box h3 {
  margin-top: 0;
  color: var(--primary);
}

/* Related Posts */
.related-posts {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.related-posts h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

@media (max-width: 767px) {
  .mobile-hide { display: none; }
}

