/* ==========================================================================
   Blog Styles - Aetherbloom Theme
   ========================================================================== */

/* Page wrapper */
.blog-page {
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.blog-page .site-main,
.single-post .site-main {
  scroll-snap-type: none !important;
  overflow-y: auto;
}

.blog-page .content-wrapper,
.single-post .content-wrapper {
  background: 0 0;
  backdrop-filter: none;
  position: relative;
  z-index: 3;
  scroll-snap-align: none !important;
  height: auto;
  overflow-y: visible;
}

/* ==========================================================================
   Blog Hero (page header)
   ========================================================================== */

.blog-page-header {
  padding: 160px 0 40px;
  text-align: center;
}

.blog-page-header-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem;
}

.blog-page-title {
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.blog-page-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.6;
}

/* ==========================================================================
   Blog Listing
   ========================================================================== */

.blog-listing-section {
  padding: 80px 0 120px;
}

.blog-listing-section .container,
.archive-header-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

/* Post Card */
.post-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}

.post-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(57, 86, 79, 0.3), rgba(57, 86, 79, 0.2));
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.04);
}

.post-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(57, 86, 79, 0.2), rgba(57, 86, 79, 0.1));
}

.post-card-image-placeholder svg {
  opacity: 0.3;
  width: 48px;
  height: 48px;
}

.post-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.post-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #fff;
  color: #39564f;
  border: 1.5px solid #39564f;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.post-category:hover {
  background: linear-gradient(135deg, #39564f, #39564f);
  color: #fff;
  border-color: transparent;
}

.post-date {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.post-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-card-title a:hover {
  color: #fff;
}

.post-card-excerpt {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

.post-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.post-read-more:hover {
  gap: 0.7rem;
  color: #39564f;
}

.post-read-more svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* No posts message */
.no-posts-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}

/* ==========================================================================
   Archive Header
   ========================================================================== */

.archive-header-section {
  padding: 80px 0 20px;
  text-align: center;
}

.archive-header-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: linear-gradient(135deg, #39564f, #39564f);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
}

.archive-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.archive-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
}

.blog-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
  background: linear-gradient(135deg, #39564f, #39564f);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(57, 86, 79, 0.35);
}

.blog-pagination .page-numbers.dots {
  background: none;
  border: none;
  cursor: default;
}

/* ==========================================================================
   Single Post
   ========================================================================== */

/* Post hero */
.single-post-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.single-post-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.single-post-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.single-post-hero-bg-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(57, 86, 79, 0.15), rgba(57, 86, 79, 0.1));
}

.single-post-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.5) 60%,
    rgba(0, 0, 0, 0.75) 100%
  );
  z-index: 2;
}

.single-post-hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 3.5rem;
  text-align: center;
}

.single-post-categories {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.single-post-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.single-post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.single-post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.single-post-meta-item svg {
  width: 15px;
  height: 15px;
  opacity: 0.75;
}

/* Post content */
.single-post-content-section {
  padding: 80px 0 60px;
  background: #d84e28;
  position: relative;
  z-index: 4;
}

.single-post-content-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

.post-content {
  font-size: 1.2rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

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

.post-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 2.5rem 0 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 1.5rem 0 0.5rem;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

.post-content blockquote {
  border-left: 4px solid #39564f;
  padding: 1rem 0 1rem 1.5rem;
  margin: 2rem 0;
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(57, 86, 79, 0.08);
  border-radius: 0 8px 8px 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.post-content pre,
.post-content code {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.post-content code {
  padding: 0.15rem 0.4rem;
}

.post-content pre {
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
}

/* Post tags */
.single-post-tags {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.single-post-tags-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.single-post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  font-size: 0.8rem;
  color: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.post-tag:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: #fff;
  color: #fff;
}

/* Back to blog */
.single-post-back {
  padding: 0 0 80px;
  background: #d84e28;
  position: relative;
  z-index: 4;
}

.back-to-blog-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s ease, gap 0.2s ease;
}

.back-to-blog-link:hover {
  color: #fff;
  gap: 0.8rem;
}

.back-to-blog-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-page-title {
    font-size: 3.5rem;
  }

  .single-post-title {
    font-size: 2.8rem;
  }

  .archive-title {
    font-size: 2.8rem;
  }
}

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

  .blog-page-title {
    font-size: 2.8rem;
  }

  .blog-page-header {
    padding: 100px 0 40px;
  }

  .blog-listing-section {
    padding: 60px 0 80px;
  }

  .single-post-hero {
    height: 60vh;
    min-height: 400px;
  }

  .single-post-title {
    font-size: 2.2rem;
  }

  .single-post-hero-content {
    padding: 0 1.5rem 2.5rem;
  }

  .archive-title {
    font-size: 2.2rem;
  }

  .archive-header-section {
    padding: 60px 0 20px;
  }
}

@media (max-width: 480px) {
  .blog-page-title {
    font-size: 2rem;
  }

  .single-post-title {
    font-size: 1.8rem;
  }

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

  .post-content {
    font-size: 1rem;
  }

  .archive-title {
    font-size: 1.8rem;
  }
}
