/* ===== BLOG SPECIFIC STYLES ===== */

/* Related Post Inline */
.related-post-inline {
  background: rgba(147, 228, 1, 0.05);
  border-left: 4px solid var(--brand);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0.5rem;
}

.related-post-inline p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
}

.related-post-inline a {
  color: var(--brand);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  transition: color 0.2s ease;
}

.related-post-inline a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* Contact Invitation Section */
.contact-invitation {
  background: rgba(147, 228, 1, 0.05);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.contact-invitation p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--fg);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(147, 228, 1, 0.1);
  color: var(--brand);
  text-decoration: none !important;
  border-radius: 8px;
  font-weight: normal;
  border: 1px solid rgba(147, 228, 1, 0.2);
  transition: background-color 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease !important;
}

.contact-link:hover {
  background: rgba(147, 228, 1, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 228, 1, 0.15);
}

.contact-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Mobile responsive styles for contact invitation */
@media (max-width: 768px) {
  .contact-links {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .contact-link {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* Blog Hero Section */
.blog-hero {
  padding: 8rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(147, 228, 1, 0.05) 0%, transparent 100%);
  border-bottom: 1px solid rgba(147, 228, 1, 0.1);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .blog-hero {
    padding: 8rem 0 3rem;
  }
}

.blog-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: var(--font-weight-black);
  color: var(--fg);
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-hero-description {
  font-size: 1rem;
  color: var(--hero-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Blog Grid Layout */
.blog-grid-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
  padding: 4rem 0;
}

.blog-main {
  min-width: 0;
}

/* Blog Posts Grid */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Blog Card */
.blog-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(147, 228, 1, 0.15);
}

.blog-card-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(147, 228, 1, 0.1);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.blog-card-category {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: rgba(147, 228, 1, 0.1);
  color: var(--brand);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-card-date svg {
  width: 16px;
  height: 16px;
}

.blog-card-title {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--fg);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-card-title a {
  transition: color 0.3s ease;
}

.blog-card-title a:hover {
  color: var(--brand);
}

.blog-card-body {
  padding: 2rem;
}

.blog-card-excerpt {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-tag {
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border-radius: 6px;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.blog-tag:hover {
  background: rgba(147, 228, 1, 0.1);
  color: var(--brand);
}

.blog-card-read-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.blog-card-read-time svg {
  width: 16px;
  height: 16px;
}

/* Blog Sidebar */
.blog-sidebar {
  position: sticky;
  top: 7rem;
  height: fit-content;
}

.sidebar-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--fg);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(147, 228, 1, 0.1);
}

.sidebar-categories {
  list-style: none;
}

.sidebar-categories li {
  margin-bottom: 0.75rem;
}

.sidebar-categories a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  color: var(--muted);
  transition: color 0.3s ease;
}

.sidebar-categories a:hover {
  color: var(--brand);
}

.category-count {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  background: rgba(147, 228, 1, 0.1);
  color: var(--brand);
  border-radius: 6px;
}

/* Popular Posts */
.popular-post {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(147, 228, 1, 0.05);
}

.popular-post:last-child {
  border-bottom: none;
}

.popular-post-content h4 {
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  color: var(--fg);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.popular-post-content a {
  transition: color 0.3s ease;
}

.popular-post-content a:hover {
  color: var(--brand);
}

.popular-post-date {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Article Page Styles */
.article-header {
  max-width: 600px;
  margin: 0 auto;
  padding: 8rem 0 3rem;
  text-align: center;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.article-breadcrumb a {
  transition: color 0.3s ease;
}

.article-breadcrumb a:hover {
  color: var(--brand);
}

.article-breadcrumb svg {
  width: 16px;
  height: 16px;
}

/* Hide breadcrumb on mobile devices */
@media (max-width: 767px) {
  .article-breadcrumb {
    display: none;
  }
}

.article-category {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(147, 228, 1, 0.1);
  color: var(--brand);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2rem;
}

.article-title {
  font-size: clamp(2rem, 2vw, 3.5rem);
  font-weight: var(--font-weight-black);
  color: var(--fg);
  margin-bottom: 2rem;
  line-height: 1.2;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-meta-item svg {
  width: 18px;
  height: 18px;
}

/* Article Content */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 0;
}

.article-content h2 {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  color: var(--fg);
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(147, 228, 1, 0.2);
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-semibold);
  color: var(--brand);
  margin: 2.5rem 0 1rem;
}

.article-content h4 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  color: var(--brand);
  margin: 2rem 0 1rem;
}

.article-content p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  color: var(--muted);
  line-height: 1.8;
}

/* Blog post list styles with green bullets */
article.article-content ul {
  list-style-type: disc !important;
  list-style-position: outside !important;
}

article.article-content ul li {
  color: var(--muted);
  padding-left: 0.5rem;
}

/* Green color for list bullets */
article.article-content ul li::marker {
  color: var(--brand) !important;
}

/* Ordered lists styling */
article.article-content ol {
  list-style-type: decimal !important;
  list-style-position: outside !important;
}

article.article-content ol li {
  color: var(--muted);
  padding-left: 0.5rem;
}

/* Green color for ordered list numbers */
article.article-content ol li::marker {
  color: var(--brand) !important;
  font-weight: var(--font-weight-semibold);
}

.article-content li {
  margin-bottom: 0.75rem;
}

.article-content strong {
  color: var(--fg);
  font-weight: var(--font-weight-semibold);
}

.article-content a {
  color: var(--brand);
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.article-content a:hover {
  opacity: 0.8;
}

.article-content code {
  background: rgba(147, 228, 1, 0.1);
  color: var(--brand);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.article-content blockquote {
  border-left: 4px solid var(--brand);
  padding-left: 2rem;
  margin: 2rem 0;
  color: var(--muted);
  font-style: italic;
}

/* Table of Contents */
.article-toc {
  background: rgba(147, 228, 1, 0.05);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
}

.article-toc h3 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--fg);
  margin-bottom: 1rem;
}

.article-toc ul {
  counter-reset: item;
  list-style-type: none;
  padding-left: 0;
}

.article-toc ul li {
  counter-increment: item;
  margin-bottom: 0.75rem;
  list-style-type: none;
}

.article-toc ul li::before {
  content: counter(item) ". ";
  color: var(--brand);
  font-weight: var(--font-weight-semibold);
  margin-right: 0.5rem;
}

.article-toc a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-toc a:hover {
  color: var(--brand);
}

/* Related Articles */
.related-articles {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 4rem 0;
  border-top: 1px solid rgba(147, 228, 1, 0.1);
}

.related-articles h2 {
  font-size: 1.6rem;
  font-weight: var(--font-weight-bold);
  color: var(--fg);
  margin-bottom: 2rem;
  text-align: center;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .blog-grid-container {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .blog-posts-grid {
    grid-template-columns: 1fr;
  }

  .article-header {
    padding: 7rem 0 2rem;
  }

  .article-title {
    font-size: clamp(1.2rem, 3vw, 3.5rem);
  }

  .article-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .article-content {
    padding: 2rem 0;
  }

  .article-content h2 {
    font-size: 1.5rem;
  }

  .related-articles h2 {
    font-size: 1.4rem;
  }

  .related-articles-grid {
    grid-template-columns: 1fr;
  }
}

/* Blog Post Hero - New Classes (for PHP files) */
.blog-post-hero {
  max-width: 600px;
  margin: 0 auto;
  padding: 8rem 0 3rem;
  text-align: center;
}

.blog-post-hero .breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.blog-post-hero .breadcrumb a {
  transition: color 0.3s ease;
}

.blog-post-hero .breadcrumb a:hover {
  color: var(--brand);
}

.blog-post-hero .breadcrumb svg {
  width: 16px;
  height: 16px;
}

/* Hide breadcrumb on mobile devices */
@media (max-width: 767px) {
  .blog-post-hero .breadcrumb {
    display: none;
  }
}

.blog-post-title {
  font-size: clamp(2rem, 2vw, 3.5rem);
  font-weight: var(--font-weight-black);
  color: var(--fg);
  margin-bottom: 2rem;
  line-height: 1.2;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.blog-post-category {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(147, 228, 1, 0.1);
  color: var(--brand);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Blog Post Content - New Classes (for PHP files) */
.blog-post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 0;
}

.blog-post-body {
  /* Additional container for content structure */
}

/* Blog Post Content Styles - Inherit from article-content */
.blog-post-content h2 {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  color: var(--fg);
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(147, 228, 1, 0.2);
}

.blog-post-content h3 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-semibold);
  color: var(--brand);
  margin: 2.5rem 0 1rem;
}

.blog-post-content h4 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  color: var(--brand);
  margin: 2rem 0 1rem;
}

.blog-post-content p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  color: var(--muted);
  line-height: 1.8;
}

/* Blog post list styles with green bullets */
article.blog-post-content ul {
  list-style-type: disc !important;
  list-style-position: outside !important;
}

article.blog-post-content ul li {
  color: var(--muted);
  padding-left: 0.5rem;
}

/* Green color for list bullets */
article.blog-post-content ul li::marker {
  color: var(--brand) !important;
}

/* Ordered lists styling */
article.blog-post-content ol {
  list-style-type: decimal !important;
  list-style-position: outside !important;
}

article.blog-post-content ol li {
  color: var(--muted);
  padding-left: 0.5rem;
}

/* Green color for ordered list numbers */
article.blog-post-content ol li::marker {
  color: var(--brand) !important;
  font-weight: var(--font-weight-semibold);
}

.blog-post-content li {
  margin-bottom: 0.75rem;
}

.blog-post-content strong {
  color: var(--fg);
  font-weight: var(--font-weight-semibold);
}

.blog-post-content a {
  color: var(--brand);
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.blog-post-content a:hover {
  opacity: 0.8;
}

.blog-post-content code {
  background: rgba(147, 228, 1, 0.1);
  color: var(--brand);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.blog-post-content blockquote {
  border-left: 4px solid var(--brand);
  padding-left: 2rem;
  margin: 2rem 0;
  color: var(--muted);
  font-style: italic;
}

/* Related Posts - New Classes (for PHP files) */
.related-posts {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 4rem 0;
  border-top: 1px solid rgba(147, 228, 1, 0.1);
}

.related-posts h2 {
  font-size: 1.6rem;
  font-weight: var(--font-weight-bold);
  color: var(--fg);
  margin-bottom: 2rem;
  text-align: center;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Pagination Styles */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 4rem;
  padding: 2rem 0;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  transition: all 0.3s ease;
  cursor: pointer;
}

.pagination-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.pagination-btn:hover {
  background: rgba(147, 228, 1, 0.1);
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 228, 1, 0.15);
}

.pagination-btn:hover svg {
  transform: translateX(-3px);
}

.pagination-next:hover svg {
  transform: translateX(3px);
}

.pagination-btn:disabled,
.pagination-btn[aria-disabled="true"],
.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  transition: all 0.3s ease;
  cursor: pointer;
}

.pagination-number:hover {
  background: rgba(147, 228, 1, 0.1);
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 228, 1, 0.15);
}

.pagination-number.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--bg);
  box-shadow: 0 4px 12px rgba(147, 228, 1, 0.25);
}

.pagination-number.active:hover {
  transform: translateY(0);
}

.pagination-dots {
  color: var(--muted);
  padding: 0 0.5rem;
  user-select: none;
}

/* Responsive Pagination */
@media (max-width: 768px) {
  .blog-pagination {
    gap: 0.5rem;
    margin-top: 3rem;
  }

  .pagination-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }

  .pagination-btn span {
    display: none;
  }

  .pagination-btn svg {
    width: 16px;
    height: 16px;
  }

  .pagination-number {
    min-width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }

  .pagination-numbers {
    gap: 0.25rem;
  }

  /* Hide some page numbers on mobile */
  .pagination-number:nth-child(n+4):not(:last-child) {
    display: none;
  }

  .pagination-dots {
    display: none;
  }
}

/* Responsive styles for new blog post classes */
@media (max-width: 768px) {
  .blog-post-hero {
    padding: 6rem 0 2rem;
  }

  .blog-post-title {
    font-size: clamp(1.2rem, 3vw, 3.5rem);
  }

  .blog-post-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .blog-post-content {
    padding: 2rem 0;
  }

  .blog-post-content h2 {
    font-size: 1.5rem;
  }

  .related-posts h2 {
    font-size: 1.4rem;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .pagination-btn {
    padding: 0.5rem;
  }

  .pagination-number {
    min-width: 32px;
    height: 32px;
  }
}

/* Comparison Table Styles */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(147, 228, 1, 0.1);
}

.comparison-table thead {
  background: rgba(147, 228, 1, 0.1);
}

.comparison-table th {
  padding: 1rem;
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--fg);
  border-bottom: 2px solid rgba(147, 228, 1, 0.2);
}

.comparison-table td {
  padding: 1rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(147, 228, 1, 0.05);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: rgba(147, 228, 1, 0.05);
}

/* Responsive comparison table */
@media (max-width: 768px) {
  .comparison-table {
    font-size: 0.875rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .comparison-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ===== BLOG SEARCH STYLES ===== */

/* Blog Search Container */
.blog-search-container {
  max-width: 600px;
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.blog-search {
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(147, 228, 1, 0.1);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--muted);
}

/* Hide native browser clear / reveal icons for input[type="search"] so only our custom .search-clear is visible */
.search-input,
.sticky-search-input {
  -webkit-appearance: none;
  /* Safari/Chrome */
  appearance: none;
}

.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration,
.sticky-search-input::-webkit-search-cancel-button,
.sticky-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.search-input::-ms-clear,
.search-input::-ms-reveal,
.sticky-search-input::-ms-clear,
.sticky-search-input::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.search-input::-moz-search-clear,
.sticky-search-input::-moz-search-clear {
  display: none;
}

.search-clear {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
}

.search-clear svg {
  width: 16px;
  height: 16px;
}

.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 12px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  backdrop-filter: blur(30px);
}

.search-results-list {
  padding: 0.5rem;
}

.search-result-item {
  display: flex;
  align-items: start;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0.25rem;
}

.search-result-item:hover,
.search-result-item.highlighted {
  background: rgba(147, 228, 1, 0.1);
}

.search-result-content {
  flex: 1;
}

.search-result-title {
  font-weight: var(--font-weight-semibold);
  color: var(--fg);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.search-result-excerpt {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.search-result-category {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: rgba(147, 228, 1, 0.1);
  color: var(--brand);
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.search-no-results {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.search-no-results p {
  margin: 0;
  font-size: 0.9rem;
}

.search-query {
  color: var(--brand);
  font-weight: var(--font-weight-semibold);
}

/* Highlight matched text */
.search-result-title mark {
  background: rgba(147, 228, 1, 0.2);
  color: var(--brand);
  padding: 0.125rem 0.25rem;
  border-radius: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .blog-search-container {
    margin: 1.5rem auto 0;
  }

  .search-results {
    max-height: 300px;
  }
}

/* Animations */
@keyframes searchFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-results {
  animation: searchFadeIn 0.3s ease;
}

.search-result-item {
  animation: searchFadeIn 0.3s ease;
}

/* Sticky Search for Mobile */
.sticky-search-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(147, 228, 1, 0.1);
  padding: 1rem;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: none;
}

.sticky-search-container.visible {
  transform: translateY(0);
}

/* Sticky search results positioning */
.sticky-search-results {
  position: fixed;
  bottom: 80px;
  /* Prosta wartość zamiast calc() */
  left: 16px;
  right: 16px;
  max-height: 300px;
  z-index: 9999;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 12px;
  overflow-y: auto;
  padding: 8px;
}

/* Mobile table scrolling */
@media (max-width: 768px) {
  .article-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .article-content thead,
  .article-content tbody,
  .article-content tr {
    display: table;
    width: 100%;
  }

  .article-content th,
  .article-content td {
    display: table-cell;
    vertical-align: top;
  }

  .article-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Word wrapping for long words in lists */
  .article-content li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Specific styling for code elements in lists */
  .article-content li code {
    word-break: break-all;
    white-space: pre-wrap;
  }
}

/* Word wrapping for blog post content on mobile */
@media (max-width: 768px) {
  .blog-post-content li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .blog-post-content li code {
    word-break: break-all;
    white-space: pre-wrap;
  }
}

/* ===== COMPARISON CARDS ===== */
.comparison-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.comparison-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 228, 1, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  will-change: transform;
}

.comparison-card:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 228, 1, 0.3);
  box-shadow: 0 8px 24px rgba(147, 228, 1, 0.15);
}

.comparison-card-header {
  background: rgba(147, 228, 1, 0.1);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(147, 228, 1, 0.1);
}

.comparison-parameter {
  font-size: 1.1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--brand);
  margin: 0;
}

.comparison-card-content {
  display: flex;
  padding: 0;
}

.comparison-column {
  flex: 1;
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.comparison-column:first-child {
  border-right: 1px solid rgba(147, 228, 1, 0.1);
}

.server-name {
  font-size: 0.9rem;
  font-weight: var(--font-weight-semibold);
  color: var(--fg);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.server-value {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .comparison-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
  }

  .comparison-card {
    border-radius: 8px;
  }

  .comparison-card-header {
    padding: 0.75rem 1rem;
  }

  .comparison-parameter {
    font-size: 1rem;
  }

  .comparison-card-content {
    flex-direction: column;
  }

  .comparison-column {
    padding: 1rem;
    text-align: left;
  }
  
  /* Code Description Styles */
  .code-description {
    background: rgba(147, 228, 1, 0.05);
    border: 1px solid rgba(147, 228, 1, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .code-description p {
    margin-bottom: 1rem;
    color: var(--muted);
    line-height: 1.6;
  }
  
  .code-description p:last-child {
    margin-bottom: 0;
  }
  
  .code-description ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
  }
  
  .code-description li {
    margin-bottom: 0.5rem;
    color: var(--muted);
    line-height: 1.6;
  }
  
  .code-description code {
    background: rgba(147, 228, 1, 0.1);
    color: var(--brand);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
  }

  .comparison-column:first-child {
    border-right: none;
    border-bottom: 1px solid rgba(147, 228, 1, 0.1);
  }

  .server-name {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  .server-value {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .comparison-card-header {
    padding: 0.5rem 0.75rem;
  }

  .comparison-parameter {
    font-size: 0.9rem;
  }

  .comparison-column {
    padding: 0.75rem;
  }

  .server-name {
    font-size: 0.8rem;
  }

  .server-value {
    font-size: 0.85rem;
  }
}

/* Animation for cards */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comparison-card {
  animation: cardFadeIn 0.6s ease forwards;
}

.comparison-card:nth-child(1) {
  animation-delay: 0.1s;
}

.comparison-card:nth-child(2) {
  animation-delay: 0.2s;
}

.comparison-card:nth-child(3) {
  animation-delay: 0.3s;
}

.comparison-card:nth-child(4) {
  animation-delay: 0.4s;
}

.comparison-card:nth-child(5) {
  animation-delay: 0.5s;
}

.comparison-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* Sticky search input styling */
.sticky-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
}

.sticky-search-input::placeholder {
  color: var(--muted);
}


/* Only for mobile devices */
@media (max-width: 768px) {
  .sticky-search-container {
    display: block;
  }
}

@media (min-width: 769px) {
  .sticky-search-container {
    display: none !important;
  }
}
