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

/* Banner Section - Using portfolio banner structure */
.single-post-banner.page-banner {
  position: relative;
  width: 100%;
  min-height: 400px;
  height: 674px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #171717;
}

.single-post-banner .page-banner-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

.single-post-banner .page-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 2;
}

.single-post-banner .page-banner-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 60px 0;
}

.single-post-banner .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  overflow: hidden;
}

.single-post-banner .intro-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Back Link / Breadcrumb */
.single-post-banner .portfolio-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c7ab6c;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--font-primary);
  transition: opacity 0.3s ease;
  align-self: flex-start;
}

.single-post-banner .portfolio-back-link:hover {
  opacity: 0.7;
}

/* Post Title */
.single-post-banner .page-banner-title.single-post-title {
  font-size: 64px;
  font-weight: 700;
  font-family: var(--font-primary);
  color: #fff;
  margin: 0;
  line-height: 1.2;
  width: 80%;
}

/* Post Content Section */
.single-post-content-section {
  padding: 80px 0;
  background: #171717;
  color: #fff !important;
}

.single-post-content-section .intro-content {
  position: relative;
}

/* Author Sidebar - Positioned absolutely on the left */
.post-author-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  width: 120px;
}

.author-card-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.author-card-sidebar .author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
}

.author-card-sidebar .author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-card-sidebar .author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-card-sidebar .author-name {
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-primary);
  color: #fff;
}

.author-card-sidebar .post-date {
  font-size: 14px;
  font-weight: 400;
  font-family: var(--font-primary);
  color: #999;
}

/* Main Content */
.post-main-content {
  max-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  overflow-x: hidden;
}

/* Content Part Wrapper - allows padding/margin without affecting inner text alignment */
.content-part-wrapper {
  max-width: 900px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.post-main-content h1,
.post-main-content h2,
.post-main-content h3,
.post-main-content h4,
.post-main-content h5,
.post-main-content h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
  margin: 0 0 24px;
  line-height: 1.3;
  width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.post-main-content h1,
.post-main-content h2,
.post-main-content h3,
.post-main-content h4,
.post-main-content h5,
.post-main-content h6,
.post-main-content p:not(:has(img)) {
  max-width: 900px;
  box-sizing: border-box;
  width: 100%;
}

.post-main-content p:has(img) {
  max-width: 100%;
  width: 100%;
}

.post-main-content h2 {
  font-size: 40px;
}

.post-main-content h3 {
  font-size: 40px;
}

.post-main-content h4 {
  font-size: 40px;
}

.post-main-content p {
  font-size: 20px;
  font-weight: 400;
  font-family: var(--font-primary);
  color: #fff;
  line-height: 30px;
  margin: 0 0 24px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.post-main-content ul,
.post-main-content ol {
  margin: 24px 0;
  padding-left: 32px;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}

.post-main-content img {
  width: 100%;
  max-width: 1200px;
  height: 625px;
  object-fit: cover;
  border-radius: 12px;
  margin: 32px 0;
}

.post-main-content p img {
  width: 100%;
  margin: 0;
}

.post-main-content li {
  font-size: 20px;
  font-family: var(--font-primary);
  color: #fff;
  line-height: 30px;
  margin-bottom: 12px;
  font-weight: 400;
}

.post-main-content blockquote {
  margin: 32px 0;
  font-size: 28px;
  color: #fff;
  font-weight: 400;
  line-height: 30px;
}

/* Author Card Inline (before 3rd H3) */
.author-card-inline {
  margin: 48px 0;
}

.author-card-content {
  display: flex;
  gap: 32px;
  align-items: center;
}

.author-card-avatar {
  width: 300px;
  height: 300px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
}

.author-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  padding: 0;
}

.author-card-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.author-quote {
  font-size: 20px;
  font-weight: 500;
  font-family: var(--font-primary);
  color: #fff;
  line-height: 30px;
  margin: 0;
  font-style: normal;
  border: none;
  padding: 0;
}

.author-card-name {
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-primary);
  color: #999;
  padding-top: 16px;
  border-top: 1px solid #fff;
}

/* Slideshow Section */
.single-post-slideshow {
  background: #171717;
  padding: 80px 0;
}

/* Slideshow Inline (before H3) */
.single-post-slideshow-inline {
  margin: 5rem 0;
  background: transparent;
  width: 100%;
}

.single-post-slideshow-inline .swiper {
  overflow: visible;
  background: transparent;
}

.single-post-slideshow .container {
  max-width: 1248px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Swiper Container */
.single-post-swiper {
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  border-radius: 16px;
  background: transparent;
}

.single-post-swiper .swiper-wrapper {
  align-items: center;
}

.single-post-swiper .swiper-slide {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.single-post-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  max-width: 1248px;
  object-fit: contain;
  display: block;
  border-radius: 16px;
  margin: 0;
  transition: transform 0.5s ease;
}

.single-post-swiper .swiper-slide-active img {
  transform: scale(1.05);
}

/* Swiper Navigation Buttons */
.single-post-swiper .swiper-button-prev,
.single-post-swiper .swiper-button-next {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  transition: all 0.3s ease;
}

.single-post-swiper .swiper-button-prev:after,
.single-post-swiper .swiper-button-next:after {
  font-size: 20px;
  font-weight: bold;
}

.single-post-swiper .swiper-button-prev:hover,
.single-post-swiper .swiper-button-next:hover {
  background: rgba(255, 255, 255, 0.1);
}

.single-post-swiper .swiper-button-prev.swiper-button-disabled,
.single-post-swiper .swiper-button-next.swiper-button-disabled {
  opacity: 0.3;
}

/* Swiper Pagination */
.single-post-swiper .swiper-pagination {
  bottom: 20px;
}

.single-post-swiper .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: #d0d0d0;
  opacity: 1;
  transition: all 0.3s ease;
}

.single-post-swiper .swiper-pagination-bullet-active {
  background: #10301c;
  width: 32px;
  border-radius: 6px;
}

/* Responsive - Tablet */
@media (max-width: 1580px) {
  .post-author-sidebar {
    left: 0;
  }
}

@media (max-width: 1024px) {
  .single-post-title {
    font-size: 40px;
  }

  .post-author-sidebar {
    position: static;
    left: auto;
    width: 100%;
    border-top: 1px solid #e0e0e0;
    padding: 24px 0;
    margin-bottom: 0;
  }

  .author-card-sidebar .author-avatar {
    width: 60px;
    height: 60px;
  }

  .author-card-sidebar .author-name {
    font-size: 14px;
  }

  .author-card-sidebar .post-date {
    font-size: 12px;
  }

  .author-card-content {
    flex-direction: column;
    gap: 24px;
  }

  .slideshow-wrapper {
    padding: 0 50px;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .single-post-banner {
    min-height: 300px;
  }

  .single-post-banner .banner-content {
    padding: 40px 0;
  }

  .single-post-banner .container {
    padding: 0 24px;
  }

  .post-main-content p img {
    height: auto;
  }

  .single-post-title {
    font-size: 32px;
  }

  .single-post-content-section {
    padding: 60px 0;
  }

  .single-post-content-section .container {
    padding: 0 24px;
  }

  .single-post-banner .page-banner-title.single-post-title {
    font-size: 56px;
  }

  .post-author-sidebar {
    position: static;
    left: auto;
    width: 100%;
    border-top: 1px solid #e0e0e0;
    padding-bottom: 24px;
    margin-bottom: 32px;
  }

  .author-card-sidebar {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding-top: 2rem;
  }

  .author-card-sidebar .author-avatar {
    width: 60px;
    height: 60px;
  }

  .post-main-content blockquote {
    font-size: 24px;
  }

  .post-main-content h2 {
    font-size: 28px;
  }

  .post-main-content h3 {
    font-size: 24px;
  }

  .post-main-content p,
  .post-main-content li {
    font-size: 16px;
  }

  .author-card-inline {
    padding: 24px;
    margin: 32px 0;
  }

  .author-card-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .author-quote {
    font-size: 18px;
  }

  .single-post-slideshow {
    padding: 60px 0;
  }

  .single-post-slideshow .container {
    padding: 0 16px;
  }

  .slideshow-wrapper {
    padding: 0 40px;
  }

  .slideshow-nav {
    width: 40px;
    height: 40px;
  }

  .slideshow-nav svg {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   Up Next / Related Posts Section
   ============================================ */
.post-navigation-section {
  background: #fff;
  padding: 80px 0;
}

.post-navigation-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.post-navigation-section .intro-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.up-next-title {
  font-size: 24px;
  font-weight: 500;
  font-family: var(--font-primary);
  color: #10301c;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.related-post-item {
  display: flex;
  flex-direction: column;
}

.related-post-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  height: 100%;
  justify-content: space-between;
  color: #1f1f1f;
  transition: opacity 0.3s ease;
}

.related-post-link:hover {
  opacity: 0.8;
}

.related-post-title {
  font-size: 32px;
  font-weight: 500;
  font-family: var(--font-primary);
  color: #1f1f1f;
  margin: 0 0 16px 0;
  line-height: 1.4;
  order: 1;
  height: auto;
}

.related-post-item-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  order: 2;
}

.related-post-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 16px;
  order: 2;
}

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

.related-post-link:hover .related-post-image img {
  transform: scale(1.05);
}

.related-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #999;
  order: 3;
}

.related-post-meta svg {
  flex-shrink: 0;
}

.related-post-type,
.related-post-date {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 20px;
  color: #1e1e1e;
  opacity: 0.7;
}

/* Responsive - Up Next Section */
@media (max-width: 768px) {
  .post-navigation-section {
    padding: 60px 0;
  }

  .post-navigation-section .container {
    padding: 0 24px;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .related-post-title {
    height: auto;
  }
}

@media (max-width: 480px) {
  .single-post-banner .page-banner-title.single-post-title {
    font-size: 48px;
    width: 100%;
  }
  .single-post-title {
    font-size: 28px;
  }

  .slideshow-wrapper {
    padding: 0 32px;
  }

  .post-main-content blockquote {
    font-size: 20px;
  }

  .slideshow-nav {
    width: 36px;
    height: 36px;
  }
}
