/* Blog Styles */

/* Blog Post Single Layout */
.blog-post-single {
  padding: 60px 0;
  background: var(--color-dark);
}

.blog-post-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Post Content */
.blog-post-content {
  background: var(--color-dark-grey);
  border-radius: 15px;
  padding: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Post Header */
.post-header {
  margin-bottom: 40px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-meta i {
  color: var(--color-gold);
}

.post-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--color-white);
}

.post-excerpt {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-light-grey);
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(201, 169, 106, 0.1);
  border-left: 4px solid var(--color-gold);
  border-radius: 8px;
}

/* Author Inline */
.post-author-inline {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: var(--color-white);
}

.author-title {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Featured Image */
.post-featured-image {
  margin: 40px 0;
  border-radius: 15px;
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-featured-image figcaption {
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  color: var(--color-light-grey);
  font-style: italic;
  text-align: center;
}

/* Table of Contents */
.table-of-contents {
  background: rgba(201, 169, 106, 0.1);
  border: 2px solid var(--color-gold);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 30px 0;
}

.toc-title {
  font-size: 1rem;
  margin: 0 0 12px 0;
  padding-bottom: 10px;
  color: var(--color-gold);
  font-weight: 700;
  border-bottom: 1px solid rgba(201, 169, 106, 0.3);
  display: block;
  width: 100%;
}

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

.toc-list li {
  counter-increment: toc-counter;
  margin-bottom: 8px;
  display: block;
  width: 100%;
}

.toc-list li:last-child {
  margin-bottom: 0;
}

.toc-list li::before {
  content: counter(toc-counter) ". ";
  color: var(--color-gold);
  font-weight: 700;
  margin-right: 8px;
  font-size: 0.9rem;
}

.toc-list a {
  color: var(--color-light-grey);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
  line-height: 1.6;
}

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

/* Post Body */
.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-light-grey);
}

.post-body h2 {
  font-size: 1.6rem;
  margin-top: 50px;
  margin-bottom: 20px;
  color: var(--color-gold);
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(201, 169, 106, 0.3);
  scroll-margin-top: 100px;
}

.post-body h3 {
  font-size: 1.5rem;
  margin-top: 35px;
  margin-bottom: 15px;
  color: var(--color-white);
  scroll-margin-top: 100px;
}

.post-body p {
  margin-bottom: 20px;
}

.post-body a {
  color: var(--color-gold);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.post-body a:hover {
  color: var(--color-gold-light);
}

.post-body strong {
  color: var(--color-white);
  font-weight: 700;
}

/* Lists */
.styled-list {
  list-style: none;
  padding: 0;
  margin: 25px 0;
}

.styled-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.styled-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-weight: 700;
}

.numbered-list {
  padding-left: 25px;
  margin: 25px 0;
}

.numbered-list li {
  margin-bottom: 15px;
  padding-left: 10px;
}

.numbered-list li::marker {
  color: var(--color-gold);
  font-weight: 700;
}

/* Callouts */
.post-callout {
  display: flex;
  gap: 20px;
  padding: 25px;
  border-radius: 12px;
  margin: 30px 0;
  border-left: 4px solid;
}

.post-callout i {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 3px;
}

.post-callout strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.post-callout p {
  margin: 0;
  font-size: 0.95rem;
}

.post-callout-info {
  background: rgba(52, 152, 219, 0.1);
  border-left-color: #3498db;
}

.post-callout-info i {
  color: #3498db;
}

.post-callout-success {
  background: rgba(46, 204, 113, 0.1);
  border-left-color: #2ecc71;
}

.post-callout-success i {
  color: #2ecc71;
}

.post-callout-cta {
  background: linear-gradient(135deg, rgba(201, 169, 106, 0.15), rgba(201, 169, 106, 0.05));
  border-left-color: var(--color-gold);
  flex-direction: column;
  align-items: flex-start;
}

.post-callout-cta i {
  color: var(--color-gold);
  font-size: 2rem;
}

.post-callout-cta .btn {
  margin-top: 15px;
  background: var(--color-gold);
  color: #1a1a1a;
  font-weight: 700;
  border: 2px solid var(--color-gold);
}

.post-callout-cta .btn:hover {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

/* Quote */
.post-quote {
  font-size: 1.2rem;
  font-style: italic;
  padding: 30px;
  margin: 30px 0;
  background: rgba(255, 255, 255, 0.02);
  border-left: 5px solid var(--color-gold);
  border-radius: 8px;
  color: var(--color-light-grey);
}

.post-quote cite {
  display: block;
  margin-top: 15px;
  font-size: 0.9rem;
  font-style: normal;
  color: var(--color-gold);
}

.post-quote cite::before {
  content: "— ";
}

/* Tables */
.comparison-table {
  width: 100%;
  margin: 30px 0;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
}

.comparison-table thead {
  background: var(--color-gold);
  color: var(--color-dark);
}

.comparison-table th,
.comparison-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table tbody tr:hover {
  background: rgba(201, 169, 106, 0.05);
}

.comparison-table tbody td:first-child {
  font-weight: 600;
  color: var(--color-gold);
}

/* Image Gallery */
.post-image-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.post-image-gallery figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-image-gallery figure:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(201, 169, 106, 0.3);
}

.post-image-gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

.post-image-gallery figcaption {
  padding: 12px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Post Footer */
.post-footer {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.tags-label {
  font-weight: 600;
  color: var(--color-white);
}

.post-tag {
  padding: 6px 15px;
  background: rgba(201, 169, 106, 0.1);
  border: 1px solid var(--color-gold);
  border-radius: 20px;
  color: var(--color-gold);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.post-tag:hover {
  background: var(--color-gold);
  color: var(--color-dark);
}

/* Share Buttons */
.post-share {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 40px;
}

.share-label {
  font-weight: 600;
  color: var(--color-white);
}

.share-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid;
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
  cursor: pointer;
}

.share-facebook {
  color: #1877f2;
  border-color: #1877f2;
}

.share-facebook:hover {
  background: #1877f2;
  color: white;
}

.share-twitter {
  color: #1da1f2;
  border-color: #1da1f2;
}

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

.share-linkedin {
  color: #0a66c2;
  border-color: #0a66c2;
}

.share-linkedin:hover {
  background: #0a66c2;
  color: white;
}

.share-copy {
  color: var(--color-gold);
  border-color: var(--color-gold);
}

.share-copy:hover {
  background: var(--color-gold);
  color: var(--color-dark);
}

/* Author Box */
.author-box {
  display: flex;
  gap: 25px;
  padding: 30px;
  background: rgba(201, 169, 106, 0.05);
  border: 2px solid var(--color-gold);
  border-radius: 15px;
}

.author-box-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--color-gold);
  flex-shrink: 0;
}

.author-box-name {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--color-gold);
}

.author-box-bio {
  margin-bottom: 15px;
  color: var(--color-light-grey);
  line-height: 1.6;
}

.author-box-social {
  display: flex;
  gap: 10px;
}

.author-social-link {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(201, 169, 106, 0.2);
  color: var(--color-gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

.author-social-link:hover {
  background: var(--color-gold);
  color: var(--color-dark);
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 100px;
  align-self: flex-start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-widget {
  background: var(--color-dark-grey);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
}

.sidebar-widget h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--color-gold);
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(201, 169, 106, 0.3);
}

/* CTA Widget */
.widget-cta {
  background: linear-gradient(135deg, rgba(201, 169, 106, 0.15), rgba(201, 169, 106, 0.05));
  border: 2px solid var(--color-gold);
  text-align: center;
}

.widget-cta p {
  margin-bottom: 20px;
  color: var(--color-light-grey);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* Recent Posts Widget */
.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-posts-list li {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-posts-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.recent-posts-list a {
  display: flex;
  gap: 15px;
  text-decoration: none;
  color: var(--color-light-grey);
  transition: color 0.3s ease;
}

.recent-posts-list a:hover {
  color: var(--color-gold);
}

.recent-posts-list img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.recent-post-title {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--color-white);
}

.recent-post-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Categories Widget */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categories-list li {
  margin-bottom: 12px;
}

.categories-list a {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  color: var(--color-light-grey);
  text-decoration: none;
  transition: all 0.3s ease;
}

.categories-list a:hover {
  background: rgba(201, 169, 106, 0.1);
  color: var(--color-gold);
  padding-left: 20px;
}

.categories-list span {
  color: var(--color-gold);
  font-weight: 600;
}

/* Light Theme */
body.light-theme .blog-post-single {
  background: #f5f5f5;
}

body.light-theme .blog-post-content,
body.light-theme .sidebar-widget {
  background: #fff;
  border-color: #e0e0e0;
}

body.light-theme .post-title,
body.light-theme .post-body h3,
body.light-theme .author-name {
  color: #1a1a1a;
}

body.light-theme .post-excerpt,
body.light-theme .post-body,
body.light-theme .author-box-bio {
  color: #333;
}

body.light-theme .post-meta {
  color: #666;
}

body.light-theme .table-of-contents {
  background: rgba(201, 169, 106, 0.1);
}

body.light-theme .post-featured-image figcaption {
  background: #2F3D40;
  color: #fff;
}

body.light-theme .comparison-table tbody tr:hover {
  background: rgba(201, 169, 106, 0.05);
}

body.light-theme .recent-post-title {
  color: #1a1a1a;
}

/* Responsive */
@media (max-width: 1200px) {
  .blog-post-layout {
    grid-template-columns: 1fr 300px;
    gap: 40px;
  }
}

@media (max-width: 992px) {
  .blog-post-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .blog-sidebar {
    position: static;
    max-height: none;
  }

  .post-body h2 {
    font-size: 1.36rem;
  }

  .post-body h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .blog-post-content {
    padding: 30px 20px;
  }

  .post-title {
    font-size: 2rem;
  }

  .table-of-contents {
    padding: 15px 18px;
    margin: 20px 0;
  }

  .toc-title {
    font-size: 0.95rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .toc-list li {
    margin-bottom: 6px;
  }

  .toc-list li::before {
    font-size: 0.85rem;
  }

  .toc-list a {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .post-image-gallery {
    grid-template-columns: 1fr;
  }

  .author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .comparison-table {
    font-size: 0.9rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px;
  }
}

/* Sidebar TOC - Sticky */
.sidebar-toc {
  background: rgba(37, 37, 37, 0.6);
  border: 1px solid rgba(201, 169, 106, 0.15);
  border-radius: 8px;
  padding: 24px 20px;
  backdrop-filter: blur(10px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  margin-bottom: 30px;
}

.sidebar-toc h3 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--color-gold);
  font-weight: 600;
  border-bottom: 1px solid rgba(201, 169, 106, 0.15);
  padding-bottom: 12px;
}

.sidebar-toc .toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-toc .toc-list li {
  margin-bottom: 0;
  padding: 0;
  display: block;
  width: 100%;
}

.sidebar-toc .toc-list li::before {
  display: none !important;
}

.sidebar-toc .toc-list a {
  display: block;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.8rem;
  border-left: 2px solid transparent;
  transition: all 0.25s ease;
  border-radius: 4px;
  line-height: 1.5;
  margin-bottom: 4px;
}

.sidebar-toc .toc-list a:hover {
  color: var(--color-gold);
  background: rgba(201, 169, 106, 0.08);
  border-left-color: var(--color-gold);
  padding-left: 16px;
  transform: translateX(2px);
}

.sidebar-toc .toc-list a.active {
  color: var(--color-gold);
  background: rgba(201, 169, 106, 0.12);
  border-left-color: var(--color-gold);
  font-weight: 600;
}

/* Scrollbar dla TOC */
.sidebar-toc::-webkit-scrollbar {
  width: 4px;
}

.sidebar-toc::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.sidebar-toc::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 106, 0.3);
  border-radius: 4px;
}

.sidebar-toc::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 169, 106, 0.5);
}

/* Light Theme */
body.light-theme .sidebar-toc {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(201, 169, 106, 0.25);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body.light-theme .sidebar-toc h3 {
  border-bottom-color: rgba(201, 169, 106, 0.25);
}

body.light-theme .sidebar-toc .toc-list a {
  color: #555;
}

body.light-theme .sidebar-toc .toc-list a:hover {
  color: var(--color-gold);
  background: rgba(201, 169, 106, 0.1);
}

body.light-theme .sidebar-toc::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

body.light-theme .sidebar-toc::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 106, 0.4);
}

body.light-theme .blog-post-content {
  background: #fff;
}

body.light-theme .post-title {
  color: #1a1a1a;
}

body.light-theme .post-excerpt {
  color: #666;
}

body.light-theme .post-body {
  color: #333;
}

body.light-theme .post-body h2,
body.light-theme .post-body h3,
body.light-theme .post-body h4 {
  color: #1a1a1a;
}

body.light-theme .table-of-contents {
  background: rgba(201, 169, 106, 0.08);
}

body.light-theme .author-box {
  background: #f9f9f9;
  border-color: #e0e0e0;
}

body.light-theme .author-box h3 {
  color: #1a1a1a;
}

body.light-theme .author-bio {
  color: #666;
}

body.light-theme .post-callout {
  background: #2F3D40;
  border-color: var(--color-gold);
  color: #fff;
}

body.light-theme .post-callout strong {
  color: #fff;
}

body.light-theme .post-callout p {
  color: rgba(255,255,255,0.85);
}

body.light-theme .post-callout i {
  color: var(--color-gold);
}

body.light-theme .post-quote {
  background: rgba(201, 169, 106, 0.08);
  color: #333;
}

body.light-theme .comparison-table th {
  background: var(--color-gold);
  color: #fff;
}

body.light-theme .comparison-table td {
  border-color: #e0e0e0;
  color: #333;
}

/* Related Posts Section (po wpisie) */
.related-posts-section {
  padding: 80px 0;
  background: var(--color-dark);
}

.related-posts-section h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 50px;
  color: var(--color-gold);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.related-post-card {
  background: var(--color-dark-grey);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.related-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--color-gold);
}

.related-post-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.related-post-content {
  padding: 25px;
}

.related-post-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  display: block;
}

.related-post-title {
  font-size: 1.2rem;
  color: var(--color-white);
  margin-bottom: 12px;
  line-height: 1.4;
  font-weight: 600;
}

.related-post-excerpt {
  font-size: 0.95rem;
  color: var(--color-light-grey);
  line-height: 1.6;
  margin-bottom: 15px;
}

.related-post-link {
  color: var(--color-gold);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s ease;
}

.related-post-card:hover .related-post-link {
  gap: 12px;
}

/* Light Theme */
body.light-theme .related-posts-section {
  background: #f5f5f5;
}

body.light-theme .related-post-card {
  background: #fff;
  border-color: #e0e0e0;
}

body.light-theme .related-post-title {
  color: #1a1a1a;
}

body.light-theme .related-post-excerpt {
  color: #666;
}

/* Responsive */
@media (max-width: 992px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .related-posts-section {
    padding: 60px 0;
  }

  .related-posts-section h2 {
    font-size: 1.28rem;
    margin-bottom: 30px;
  }
}
