/* Blog specifické styly */

/* Blog header */
.blog-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.blog-header h1 {
  margin-bottom: 0.5rem;
}

.blog-header .lead {
  color: #6b7280;
  font-size: 1.125rem;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Blog list */
.blog-list {
  display: grid;
  gap: 2rem;
}

.blog-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-soft);
  border-radius: 12px;
  transition: box-shadow 0.2s;
}

.blog-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

@media (min-width: 640px) {
  .blog-card {
    grid-template-columns: 200px 1fr;
  }
}

.blog-card__image {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.blog-card__category {
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 600;
}

.blog-card__title {
  font-size: 1.25rem;
  margin: 0;
}

.blog-card__title a {
  color: var(--ink);
  text-decoration: none;
}

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

.blog-card__excerpt {
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

.blog-card__link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-top: auto;
}

.blog-card__link:hover {
  text-decoration: underline;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.pagination__link {
  padding: 0.5rem 1rem;
  background: var(--bg-soft);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.pagination__link:hover:not(.pagination__disabled) {
  background: var(--accent);
  color: white;
}

.pagination__disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination__current {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Blog post detail */
.blog-post {
  max-width: 100%;
}

.post-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.post-category {
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 600;
}

.post-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem;
}

.post-author {
  color: #6b7280;
  margin: 0;
}

.post-image {
  margin: 0 auto 2rem;
  border-radius: 12px;
  overflow: hidden;
  max-width: 600px;
}

.post-image img {
  width: 100%;
  height: auto;
  cursor: pointer;
}

.post-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.post-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

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

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 1.5rem auto;
}

.post-content blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem 1rem 1.5rem;
  background: var(--bg-soft);
  font-style: italic;
  position: relative;
  box-shadow: none;
  border-radius: 0;
}

.post-content blockquote::before {
  display: none;
}

.post-content blockquote:hover {
  transform: none;
}

.post-content blockquote p {
  margin: 0;
  text-indent: 0;
}

.post-content code {
  background: var(--bg-soft);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.post-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-tags a {
  background: var(--bg-soft);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--ink);
}

.post-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-share a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
}

.post-share a:hover {
  text-decoration: underline;
}

/* Empty state */
.blog-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-soft);
  border-radius: 12px;
  color: #6b7280;
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
  cursor: pointer;
}

.image-modal img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: white;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s;
}

.modal-close:hover {
  opacity: 0.7;
}

/* Thumbnail effect for clickable images */
.post-content img,
.blog-card__image img {
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-content img:hover,
.blog-card__image img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
