/* Blog Styles for Elixir Aesthetics */

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Blog Card */
.blog-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-card__image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f5f5f5;
}

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

.blog-card:hover .blog-card__image img {
  transform: scale(1.05);
}

.blog-card__content {
  padding: 30px;
}

.blog-card__date {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-card__title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  line-height: 1.3;
  color: #2c3e50;
}

.blog-card__excerpt {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.blog-card__read-more {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card__read-more {
  transform: translateX(5px);
}

/* Blog Post Detail */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
}

.blog-post__header {
  margin-bottom: 40px;
  text-align: center;
}

.blog-post__back {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.blog-post__back:hover {
  transform: translateX(-5px);
}

.blog-post__date {
  display: block;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-post__author {
  margin-bottom: 20px;
  color: #666;
}

.blog-post__title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .blog-post__title {
    font-size: 2rem;
  }
}

.blog-post__featured-image {
  width: 100%;
  margin-bottom: 40px;
  border-radius: 8px;
  overflow: hidden;
}

.blog-post__featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-post__content {
  line-height: 1.8;
  color: #333;
  font-size: 1.125rem;
}

.blog-post__content h1,
.blog-post__content h2,
.blog-post__content h3,
.blog-post__content h4 {
  margin-top: 2em;
  margin-bottom: 0.75em;
  color: #2c3e50;
}

.blog-post__content h1 {
  font-size: 2rem;
}

.blog-post__content h2 {
  font-size: 1.75rem;
}

.blog-post__content h3 {
  font-size: 1.5rem;
}

.blog-post__content p {
  margin-bottom: 1.5em;
}

.blog-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2em 0;
}

.blog-post__content ul,
.blog-post__content ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.blog-post__content li {
  margin-bottom: 0.5em;
}

.blog-post__content blockquote {
  border-left: 4px solid #ddd;
  padding-left: 1.5em;
  margin: 2em 0;
  font-style: italic;
  color: #666;
}

.blog-post__content a {
  color: inherit;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.blog-post__content a:hover {
  opacity: 0.7;
}

.blog-post__footer {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.blog-post__back-bottom {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.blog-post__back-bottom:hover {
  transform: translateX(-5px);
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding: 20px 0;
}

.blog-pagination__btn {
  padding: 12px 24px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-pagination__btn:hover {
  border-color: #999;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-pagination__info {
  color: #666;
  font-weight: 500;
}

/* Loading State */
.blog-loading {
  padding: 100px 20px;
}

.blog-loading__spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #666;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Empty State */
.blog-empty {
  padding: 100px 20px;
}

/* Error State */
.blog-error {
  padding: 100px 20px;
}

.blog-error__retry {
  margin-top: 20px;
  padding: 12px 30px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-error__retry:hover {
  border-color: #999;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
