/* Professional Blog Theme */
/* Custom styling for a modern, clean blog design */

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #64748b;
  --accent-color: #0ea5e9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border-color: #e2e8f0;
  --code-bg: #1e293b;
  --code-text: #e2e8f0;
  --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-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: all 0.2s ease-in-out;
}

/* Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  line-height: 1.7;
  font-size: 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

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

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

/* Navbar - Professional Style */
.pro-navbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.pro-navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.pro-navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pro-navbar .navbar-brand:hover {
  color: var(--primary-color);
}

.pro-navbar .navbar-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.pro-navbar .nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.pro-navbar .nav-link:hover {
  color: var(--primary-color);
  background-color: var(--bg-tertiary);
}

.pro-navbar .navbar-toggler {
  border: none;
  padding: 0.5rem;
  color: var(--text-primary);
}

.pro-navbar .navbar-toggler:focus {
  box-shadow: none;
}

/* Search Box */
.pro-search-form {
  position: relative;
}

.pro-search-form .form-control {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.5rem 1rem;
  padding-right: 2.5rem;
  font-size: 0.875rem;
  transition: var(--transition);
  width: 200px;
}

.pro-search-form .form-control:focus {
  background-color: var(--bg-primary);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  width: 250px;
}

.pro-search-form .btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.75rem;
  color: white;
  font-size: 0.75rem;
}

.pro-search-form .btn:hover {
  background: var(--primary-dark);
}

/* Hero Section */
.pro-hero {
  background: linear-gradient(135deg, var(--text-primary) 0%, #334155 100%);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.pro-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.03'%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");
}

.pro-hero-content {
  position: relative;
  z-index: 1;
}

.pro-hero h1 {
  color: white;
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.pro-hero .subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.25rem;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

.pro-hero .category-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}

/* Main Content Area */
.pro-content {
  padding: 3rem 0;
  background: var(--bg-secondary);
  min-height: 60vh;
}

/* Post Cards */
.pro-post-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.pro-post-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
  transform: translateY(-2px);
}

.pro-post-card .category-tag {
  display: inline-block;
  background: var(--bg-tertiary);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.pro-post-card .category-tag:hover {
  background: var(--primary-color);
  color: white;
}

.pro-post-card .post-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  transition: var(--transition);
}

.pro-post-card .post-title:hover {
  color: var(--primary-color);
}

.pro-post-card .post-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pro-post-card .post-meta i {
  font-size: 0.75rem;
}

/* Post Detail Page */
.pro-article-header {
  background: linear-gradient(135deg, var(--text-primary) 0%, #334155 100%);
  padding: 4rem 0;
  position: relative;
}

.pro-article-header::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.03'%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");
}

.pro-article-header .content {
  position: relative;
  z-index: 1;
}

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

.pro-article-header .meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.pro-article-header .meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pro-article-header .category-link {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition);
}

.pro-article-header .category-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* Article Content */
.pro-article {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}

.pro-article .summary {
  font-size: 1.125rem;
  color: var(--text-secondary);
  border-left: 4px solid var(--primary-color);
  padding-left: 1.25rem;
  margin-bottom: 2rem;
  font-style: italic;
}

/* Code Blocks */
.pro-code-block {
  background: var(--code-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  position: relative;
}

.pro-code-block::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.pro-code-block pre {
  margin: 0;
  background: transparent;
  color: var(--code-text);
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.pro-code-block code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.code-language-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Social Share Buttons */
.pro-social-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

.pro-social-share .share-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.pro-social-share .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: var(--transition);
}

.pro-social-share .share-btn:hover {
  transform: translateY(-2px);
}

.pro-social-share .share-btn.twitter:hover {
  background: #1da1f2;
  color: white;
}

.pro-social-share .share-btn.facebook:hover {
  background: #4267B2;
  color: white;
}

.pro-social-share .share-btn.linkedin:hover {
  background: #0077b5;
  color: white;
}

/* Related Posts */
.pro-related-posts {
  padding: 2rem 0;
}

.pro-related-posts h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.pro-related-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}

.pro-related-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.pro-related-card .card-img {
  height: 140px;
  object-fit: cover;
  width: 100%;
}

.pro-related-card .card-body {
  padding: 1rem;
}

.pro-related-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
  transition: var(--transition);
}

.pro-related-card:hover .card-title {
  color: var(--primary-color);
}

/* Pagination */
.pro-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.pro-pagination .page-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
}

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

/* Footer */
.pro-footer {
  background: var(--text-primary);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.pro-footer .footer-content {
  text-align: center;
}

.pro-footer .social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pro-footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.pro-footer .social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.pro-footer .copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.pro-footer .copyright a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.pro-footer .copyright a:hover {
  color: white;
}

/* Utility Classes */
.container-narrow {
  max-width: 800px;
  margin: 0 auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .pro-hero {
    padding: 3rem 0;
  }

  .pro-hero h1 {
    font-size: 2rem;
  }

  .pro-hero .subtitle {
    font-size: 1rem;
  }

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

  .pro-article {
    padding: 1.5rem;
    margin-top: -1rem;
    border-radius: var(--radius-lg);
  }

  .pro-post-card {
    padding: 1.25rem;
  }

  .pro-post-card .post-title {
    font-size: 1.125rem;
  }

  .pro-search-form .form-control {
    width: 150px;
  }

  .pro-search-form .form-control:focus {
    width: 180px;
  }

  .pro-related-card .card-img {
    height: 120px;
  }
}

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

.animate-fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* jQuery UI Autocomplete Styling */
.ui-autocomplete {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  z-index: 1050 !important;
}

.ui-menu-item {
  padding: 0;
  margin: 0.25rem 0;
}

.ui-menu-item-wrapper {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}

.ui-menu-item-wrapper.ui-state-active {
  background: var(--bg-tertiary);
  color: var(--primary-color);
  border: none;
}

/* Highlight.js overrides for dark theme */
.hljs {
  background: transparent !important;
  padding: 0 !important;
}
