/* Blog Styles - Solitaire Scramble */
/* Matches main site theme: green accent, Inter body, Playfair Display headings */

:root {
  --blog-bg: hsl(145 45% 8%);
  --blog-surface: hsl(145 35% 12%);
  --blog-surface-hover: hsl(145 30% 16%);
  --blog-border: hsl(145 25% 20%);
  --blog-text: hsl(145 15% 90%);
  --blog-text-muted: hsl(145 10% 65%);
  --blog-accent: hsl(145 55% 45%);
  --blog-accent-hover: hsl(145 55% 55%);
  --blog-heading: hsl(45 30% 92%);
}

/* Fallback font metrics to reduce CLS */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Playfair Fallback';
  src: local('Georgia');
  size-adjust: 112%;
  ascent-override: 95%;
  descent-override: 22%;
  line-gap-override: 0%;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--blog-bg);
  color: var(--blog-text);
  line-height: 1.7;
  font-size: 17px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Playfair Fallback', Georgia, serif;
  color: var(--blog-heading);
  line-height: 1.3;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

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

p {
  margin-bottom: 1.25rem;
}

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

a:hover {
  color: var(--blog-accent-hover);
  text-decoration: underline;
}

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

li {
  margin-bottom: 0.5rem;
}

strong {
  color: var(--blog-heading);
  font-weight: 600;
}

/* Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   NAVIGATION - Matches main React navbar
   ============================================ */

.blog-nav {
  background: rgb(15 23 42); /* slate-900 */
  border-bottom: 1px solid rgb(51 65 85); /* slate-700 */
  position: sticky;
  top: 0;
  z-index: 100;
}

.blog-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Playfair Display', 'Playfair Fallback', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.nav-logo:hover {
  text-decoration: none;
  color: white;
  transform: scale(1.05);
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.nav-logo:hover img {
  transform: scale(1.05);
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(203 213 225); /* slate-300 */
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
}

.nav-link-active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* Divider between sections */
.nav-divider {
  width: 1px;
  height: 24px;
  background: rgb(71 85 105); /* slate-600 */
  margin: 0 0.5rem;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 200px;
  background: rgb(30 41 59); /* slate-800 */
  border: 1px solid rgb(51 65 85); /* slate-700 */
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}

.nav-dropdown-content a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: rgb(203 213 225); /* slate-300 */
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-dropdown-content a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgb(71 85 105); /* slate-600 */
  border-radius: 8px;
  color: rgb(203 213 225);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgb(15 23 42); /* slate-900 */
  z-index: 150;
  padding: 1rem;
  overflow-y: auto;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(51 65 85);
  margin-bottom: 1rem;
}

.mobile-menu-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgb(203 213 225);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu-section {
  margin-bottom: 1.5rem;
}

.mobile-menu-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(148 163 184); /* slate-400 */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem;
  border-radius: 8px;
  color: rgb(203 213 225);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
}

.mobile-menu-toggle:checked ~ .mobile-menu {
  display: block;
}

/* Responsive */
@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
}

/* ============================================
   OLD HEADER (for backwards compatibility)
   ============================================ */

.blog-header {
  background: var(--blog-surface);
  border-bottom: 1px solid var(--blog-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 68px;
}

.blog-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.blog-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Playfair Display', 'Playfair Fallback', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--blog-heading);
  text-decoration: none;
}

.blog-logo:hover {
  text-decoration: none;
  color: var(--blog-accent);
}

.blog-logo img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--blog-accent);
  color: hsl(145 45% 8%);
}

.btn-primary:hover {
  background: var(--blog-accent-hover);
  text-decoration: none;
  color: hsl(145 45% 8%);
}

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

.btn-outline:hover {
  background: var(--blog-surface-hover);
  border-color: var(--blog-accent);
  text-decoration: none;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--blog-text-muted);
}

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

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

.breadcrumbs span {
  margin: 0 0.5rem;
}

/* Article Header */
.article-header {
  padding: 2rem 0 1.5rem;
  text-align: center;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--blog-text-muted);
}

.article-tag {
  display: inline-block;
  background: var(--blog-surface);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--blog-accent);
  margin-bottom: 1rem;
}
/* Article Images */
.article-image {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--blog-surface);
  max-width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.article-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.article-image figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--blog-text-muted);
  text-align: center;
  font-style: italic;
}

/* Article Content */
.article-content {
  padding: 2rem 0;
}

.article-content p:first-of-type {
  font-size: 1.125rem;
  color: var(--blog-text);
}

/* Highlight Box */
.highlight-box {
  background: var(--blog-surface);
  border-left: 4px solid var(--blog-accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.highlight-box p:last-child {
  margin-bottom: 0;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--blog-surface);
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--blog-border);
}

.comparison-table th {
  background: var(--blog-surface-hover);
  font-weight: 600;
  color: var(--blog-heading);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, var(--blog-surface) 0%, var(--blog-surface-hover) 100%);
  border: 1px solid var(--blog-border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}

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

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

/* FAQ Section */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--blog-border);
}

.faq-item {
  margin-bottom: 1.5rem;
}

.faq-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--blog-heading);
}

.faq-item p {
  color: var(--blog-text-muted);
  margin-bottom: 0;
}

/* Related Games */
.related-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.game-card {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.game-card:hover {
  border-color: var(--blog-accent);
  background: var(--blog-surface-hover);
  text-decoration: none;
}

.game-card h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.game-card p {
  font-size: 0.875rem;
  color: var(--blog-text-muted);
  margin: 0;
}

/* Footer */
.blog-footer {
  background: var(--blog-surface);
  border-top: 1px solid var(--blog-border);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--blog-text-muted);
  font-size: 0.875rem;
}

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

/* Blog Index Page */
.blog-hero {
  padding: 3rem 0;
  text-align: center;
  min-height: 180px;
}

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

.article-grid {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.article-card {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
  min-height: 160px;
}

.article-card:hover {
  border-color: var(--blog-accent);
  background: var(--blog-surface-hover);
  text-decoration: none;
  transform: translateY(-2px);
}

.article-card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
  color: var(--blog-heading);
}

.article-card p {
  color: var(--blog-text-muted);
  margin: 0;
  font-size: 0.9375rem;
}

.article-card-meta {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--blog-text-muted);
}

/* Responsive */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  
  .blog-header-inner {
    flex-direction: column;
    gap: 1rem;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .comparison-table {
    font-size: 0.875rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem;
  }
}
