/* ScoreWrite Blog Styles - Updated to match index2.html */

:root {
  /* Hostinger-inspired minimal color palette */
  --primary-500: #673ab7;
  --primary-600: #5e35b1;
  --primary-700: #512da8;
  --primary-800: #4527a0;
  
  --accent-blue: #2196f3;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  
  --neutral-0: #ffffff;
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #111827;
  
  --gradient-primary: linear-gradient(135deg, #673ab7 0%, #2196f3 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #10b981 100%);
  
  /* Legacy mappings for compatibility */
  --primary-color: var(--primary-600);
  --secondary-color: var(--primary-500);
  --text-dark: var(--neutral-800);
  --text-medium: var(--neutral-500);
  --text-light: var(--neutral-400);
  --bg-white: var(--neutral-0);
  --bg-light: var(--neutral-50);
  --bg-card: var(--neutral-0);
  --border-light: var(--neutral-200);
  --border-medium: var(--neutral-300);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --max-width: 1200px;
  --content-width: 800px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--neutral-800);
  background-color: var(--neutral-0);
  overflow-x: hidden;
}

/* Typography Improvements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.875rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.5rem;
  margin-bottom: 0.875rem;
}

h5 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

h6 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--neutral-700);
}

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

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

/* Header */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  width: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: 3rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.me-2 {
  margin-right: 0.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--neutral-700);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--primary-600);
}

.account-btn {
  text-decoration: none;
  color: var(--neutral-700);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: 1px solid var(--neutral-300);
  background: var(--neutral-0);
}

.account-btn:hover {
  color: var(--primary-600);
  border-color: var(--primary-600);
  background: var(--neutral-50);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--neutral-700);
  cursor: pointer;
}

/* Main Content */
.main-content {
  padding-top: 64px;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Blog Hero */
.blog-hero {
  background: transparent;
  padding: 4rem 0;
  text-align: center;
}

.blog-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--neutral-900);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.blog-subtitle {
  font-size: 1.25rem;
  color: var(--neutral-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Blog Posts */
.blog-posts {
  padding: 4rem 0;
  background: transparent;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Blog Header */
.blog-header {
  background: transparent;
  border-bottom: 1px solid var(--border-light);
  padding: 2rem 0;
  margin-bottom: 3rem;
}

.blog-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.blog-subtitle {
  color: var(--text-medium);
  font-size: 1.1rem;
}

/* Navigation */
.blog-nav {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.blog-nav a {
  color: var(--text-medium);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.blog-nav a:hover,
.blog-nav a.active {
  color: var(--primary-color);
  background: var(--bg-light);
}

/* Search Bar */
.search-container {
  position: relative;
  margin-bottom: 2rem;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Post Cards */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.post-card {
  background: var(--neutral-0);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid var(--neutral-200);
  min-height: 200px;
  display: flex;
  flex-direction: row;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: var(--neutral-300);
}

.post-image {
  flex-shrink: 0;
  width: 280px;
  height: 200px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-header {
  margin-bottom: 1rem;
}

.post-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.post-title a {
  color: var(--text-dark);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--primary-600);
}

/* Pinned post styling */
.text-primary {
  color: var(--primary-600) !important;
}

.me-2 {
  margin-right: 0.5rem !important;
}

.pinned-indicator {
  color: var(--primary-600) !important;
  font-weight: 600;
  font-size: 0.8rem;
  background: var(--neutral-100);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  margin-left: 1rem;
}

/* Special styling for pinned posts */
.post-card-pinned {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-blue) 100%);
  border: 2px solid var(--primary-600);
  box-shadow: 0 8px 25px -5px rgba(103, 58, 183, 0.3), 0 10px 10px -5px rgba(103, 58, 183, 0.2);
  transform: scale(1.02);
  position: relative;
  overflow: hidden;
}

.post-card-pinned::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.post-card-pinned .post-content {
  background: var(--neutral-0);
  margin: 1rem;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-card-pinned .post-image {
  margin: 1rem 1rem 0 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.post-card-pinned .post-title a {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.post-card-pinned .pinned-indicator {
  background: var(--gradient-primary);
  color: var(--neutral-0) !important;
  font-weight: 700;
}

.post-excerpt {
  color: var(--neutral-600);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* Blog Post Detail Styles */
.post-detail {
  background: var(--neutral-0);
  border-radius: 12px;
  padding: 3rem;
  margin-bottom: 3rem;
  border: 1px solid var(--neutral-200);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-image-header {
  margin: -3rem -3rem 2rem -3rem;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.post-image-header img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.post-content-detail {
  color: var(--neutral-700);
  line-height: 1.8;
  font-size: 1.1rem;
}

.post-content-detail h1,
.post-content-detail h2,
.post-content-detail h3,
.post-content-detail h4,
.post-content-detail h5,
.post-content-detail h6 {
  color: var(--neutral-800);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.post-content-detail h1 { font-size: 2rem; }
.post-content-detail h2 { font-size: 1.75rem; }
.post-content-detail h3 { font-size: 1.5rem; }

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

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

.related-posts {
  margin-top: 3rem;
}

.related-posts h3 {
  color: var(--neutral-800);
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-600);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  margin-top: auto;
}

.read-more-btn:hover {
  color: var(--primary-700);
  transform: translateX(4px);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem 0;
}

.post-tag {
  background: var(--neutral-100);
  color: var(--neutral-700);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.post-tag:hover {
  background: var(--primary-100);
  color: var(--primary-700);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-medium);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.post-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-reading-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-description {
  color: var(--text-medium);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: var(--bg-light);
  color: var(--text-medium);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.read-more:hover {
  text-decoration: underline;
}

/* Individual Post */
.post-article {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.7;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin: 2rem 0 1rem 0;
  color: var(--text-dark);
}

.post-content h1 { font-size: 2.25rem; }
.post-content h2 { font-size: 1.875rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.25rem; }

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

.post-content ul,
.post-content ol {
  margin: 1rem 0 1.5rem 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-medium);
  font-style: italic;
  background: var(--bg-light);
  padding: 1rem 1rem 1rem 2rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.post-content code {
  background: var(--bg-light);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.875em;
}

.post-content pre {
  background: var(--text-dark);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
}

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

.post-content a:hover {
  text-decoration: none;
}

/* Social Sharing */
.social-sharing {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
}

.social-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.social-button:hover::before {
  left: 100%;
}

.social-button.twitter {
  background: #1da1f2;
  color: white;
  box-shadow: 0 4px 14px rgba(29, 161, 242, 0.3);
}

.social-button.facebook {
  background: #4267b2;
  color: white;
  box-shadow: 0 4px 14px rgba(66, 103, 178, 0.3);
}

.social-button.linkedin {
  background: #0077b5;
  color: white;
  box-shadow: 0 4px 14px rgba(0, 119, 181, 0.3);
}

.social-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Footer */
.footer {
  background: var(--neutral-50);
  padding: 4rem 0 2rem;
  text-align: center;
  margin-top: auto;
}

.footer h5 {
  color: var(--neutral-800);
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  text-align: center;
}

.footer p {
  color: var(--neutral-600);
  line-height: 1.6;
  text-align: center;
}

.footer .copyright {
  color: var(--neutral-500);
  font-size: 0.9rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-medium);
  transition: all 0.2s ease;
}

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

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

/* Newsletter Signup */
.newsletter-signup {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin: 3rem 0;
}

.newsletter-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.newsletter-description {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

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

.newsletter-input {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.newsletter-button {
  background: var(--primary-600);
  color: var(--neutral-0);
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(103, 58, 183, 0.3);
}

.newsletter-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.newsletter-button:hover::before {
  left: 100%;
}

.newsletter-button:hover {
  background: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(103, 58, 183, 0.4);
}

/* Table of Contents */
.table-of-contents {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin: 2rem 0;
  border-left: 4px solid var(--primary-color);
}

.toc-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

.toc-list a {
  color: var(--text-medium);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Reading Progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--bg-light);
  z-index: 100;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  width: 0%;
  transition: width 0.1s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  
  .header-actions {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .header-container {
    padding: 0 1rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .blog-title {
    font-size: 2.25rem;
  }
  
  .blog-subtitle {
    font-size: 1.125rem;
  }
  
  .posts-list {
    gap: 1.5rem;
  }
  
  .post-card {
    flex-direction: column;
    min-height: auto;
  }
  
  .post-image {
    width: 100%;
    height: 200px;
  }
  
  .post-content {
    padding: 1.5rem;
  }
  
  .post-article {
    padding: 1.5rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .social-sharing {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .blog-header {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
  }
  
  .blog-title {
    font-size: 1.75rem;
  }
  
  .post-title {
    font-size: 1.25rem;
  }
  
  .post-content {
    font-size: 1rem;
  }
  
  .post-content h1 { font-size: 1.75rem; }
  .post-content h2 { font-size: 1.5rem; }
  .post-content h3 { font-size: 1.25rem; }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* Print Styles */
@media print {
  .blog-nav,
  .search-container,
  .social-sharing,
  .newsletter-signup,
  .reading-progress {
    display: none;
  }
  
  .post-article {
    box-shadow: none;
    padding: 0;
  }
}