/* ==========================================================================
   GenTe Blog Page & Post Detail Styles
   ========================================================================== */

/* Blog Hero */
.blog-hero {
  position: relative;
  padding: 80px 0 100px;
  min-height: 85vh;
  text-align: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .blog-hero { padding: 100px 0 120px; }
}

.blog-hero-inner {
  max-width: 800px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Category Filter & Search Bar */
.blog-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .blog-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--purple-accent);
  color: var(--fg);
}

.filter-btn.active {
  background: var(--purple-accent);
  color: #0c0816;
  border-color: var(--purple-accent);
  box-shadow: 0 0 15px rgba(200, 182, 255, 0.3);
}

.blog-search {
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .blog-search {
    max-width: 300px;
  }
}

.blog-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--fg);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.blog-search input:focus {
  outline: none;
  border-color: var(--purple-accent);
}

.blog-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: var(--muted);
  pointer-events: none;
}

/* Featured Post */
.featured-post {
  display: grid;
  gap: 2rem;
  border-radius: 1.5rem;
  overflow: hidden;
  margin-bottom: 4rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.featured-post:hover {
  border-color: var(--border-bright);
}

@media (min-width: 992px) {
  .featured-post {
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
  }
}

.featured-img-wrap {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 300px;
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-post:hover .featured-img-wrap img {
  transform: scale(1.03);
}

.featured-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.meta-item i {
  width: 1rem;
  height: 1rem;
  color: var(--purple-mid);
}

.featured-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.featured-excerpt {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

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

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Standard Blog Card */
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  overflow: hidden;
  height: 100%;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-bright);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.card-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(10, 7, 20, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--purple-accent);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.25rem;
  margin: 0.75rem 0;
  line-height: 1.3;
}

.card-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(180, 156, 255, 0.1);
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.author-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.page-num {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--muted);
  transition: all 0.2s ease;
}

.page-num:hover, .page-num.active {
  background: var(--purple-soft);
  color: var(--purple-accent);
}

/* Newsletter Block */
.newsletter-card {
  padding: 3rem 2rem;
  border-radius: 1.5rem;
  text-align: center;
  margin-top: 4rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 460px;
  margin: 2rem auto 0;
}

@media (min-width: 640px) {
  .newsletter-form {
    flex-direction: row;
  }
}

.newsletter-form input {
  flex-grow: 1;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--purple-accent);
}

/* ==========================================================================
   Post Detail Styles
   ========================================================================== */

/* Post Hero */
.post-hero {
  padding: 60px 0 0;
  position: relative;
}

.post-header-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 3rem;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--purple-accent);
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.post-hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.post-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-banner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 1.5rem;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.post-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article Body Wrapper */
.article-wrapper {
  padding: 4rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .article-wrapper {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(240, 236, 255, 0.85);
}

/* Rich Text Styling */
.article-content p {
  margin-bottom: 1.5rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--fg);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-content h2 { font-size: 2rem; }
.article-content h3 { font-size: 1.5rem; }

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

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

.article-content blockquote {
  border-left: 4px solid var(--purple-accent);
  padding: 1.5rem;
  margin: 2rem 0;
  background: var(--purple-soft);
  border-radius: 0 1rem 1rem 0;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--fg);
}

.article-content img {
  border-radius: 1rem;
  margin: 2.5rem 0;
  border: 1px solid var(--border);
}

.article-content a {
  color: var(--purple-accent);
  text-decoration: underline;
}

/* Tags & Share */
.post-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(180, 156, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .post-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

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

.post-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
}

.post-tag:hover {
  background: var(--purple-soft);
  color: var(--purple-accent);
}

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

.social-share span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

/* Sidebar for Desktop */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  padding: 1.5rem;
  border-radius: 1.25rem;
}

.widget-title {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(180, 156, 255, 0.15);
}

.author-bio-widget {
  text-align: center;
}

.author-bio-widget img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  object-fit: cover;
  border: 2px solid var(--purple-soft);
}

.author-bio-widget h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.author-bio-widget p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Comments Section */
.comments-section {
  margin-top: 5rem;
}

.comments-header {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.comment-form {
  display: grid;
  gap: 1rem;
  margin-bottom: 3rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--fg);
  font-size: 0.95rem;
}

.comment-form textarea {
  resize: vertical;
  min-height: 120px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--purple-accent);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(180, 156, 255, 0.1);
}

.comment-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex-grow: 1;
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 600;
  font-size: 1rem;
}

.comment-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.comment-text {
  font-size: 0.95rem;
  color: rgba(240, 236, 255, 0.8);
  line-height: 1.5;
}

/* Related Posts */
.related-posts {
  margin-top: 5rem;
}

.related-posts-header {
  text-align: center;
  margin-bottom: 3rem;
}
