/* Blog single post page */

.main.blog-post-page {
  width: 100%;
  min-height: 100vh;
  background-color: var(--white);
  padding-top: 0rem;
}

@media (max-width: 768px) {
  .main.blog-post-page {
    padding-top: 0rem;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  background-color: var(--light-gray);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color);
  width: min(1200px, 90%);
  margin: 0 auto;
}

.breadcrumb-nav a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
  color: var(--secondary-color);
}

.breadcrumb-nav .current {
  color: var(--secondary-color);
  font-weight: 500;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Layout */
.blog-content {
  padding: 3rem 0 5rem;
}

.blog-post-container {
  width: min(1100px, 90%);
  margin: 0 auto;
  padding: 0;
}

.post-hero {
  width: 100%;
  margin-bottom: 3rem;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background-color: var(--light-gray);
}

.post-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 7rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--secondary-color) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: var(--secondary-color);
  border-radius: 4px;
}

.sidebar-section__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111;
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
  text-transform: none;
  border: 0;
  padding: 0;
}

.category-list,
.links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-list li,
.links-list li {
  margin: 0;
}

.category-list a,
.links-list a {
  display: block;
  padding: 0.65rem 0 0.65rem 1rem;
  color: #666;
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.45;
  border-left: 3px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.category-list a:hover,
.links-list a:hover,
.category-list a.active,
.links-list a.active,
.links-list .current-menu-item > a {
  color: #111;
  border-left-color: var(--secondary-color);
}

.category-list a.active,
.links-list a.active,
.links-list .current-menu-item > a {
  font-weight: 500;
}

/* Sidebar share */
.sidebar-section--share {
  padding-top: 0.5rem;
}

.sidebar-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sidebar-share__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.sidebar-share__link:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.sidebar-share__link--facebook {
  background: #1877f2;
}

.sidebar-share__link--linkedin {
  background: #0a66c2;
}

.sidebar-share__link--twitter {
  background: #111;
}

.sidebar-share__link--whatsapp {
  background: #25d366;
}

.sidebar-share__link--pinterest {
  background: #e60023;
}

.sidebar-share__link--email {
  background: var(--secondary-color);
}

/* Main content */
.main-content {
  min-width: 0;
}

.post-header {
  margin-bottom: 1rem;
}

.post-header__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #111;
  line-height: 1.25;
  margin: 0 0 1rem;
  text-transform: none;
  letter-spacing: 0;
}

.post-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  color: #777;
  font-size: 0.92rem;
}

.post-header__meta i {
  margin-right: 0.35rem;
  color: var(--primary-color);
}

.post-content {
  color: #444;
  line-height: 1.85;
  font-size: 1.05rem;
}

.post-content > *:first-child {
  margin-top: 0;
}

.post-content p {
  margin-bottom: 1.35rem;
  text-align: left;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: #111;
  font-weight: 700;
  line-height: 1.35 !important;
  margin: 2.25rem 0 1rem;
}

.post-content h2 {
  font-size: 1.65rem !important;
}

.post-content h3 {
  font-size: 1.35rem !important;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.35rem 1.25rem;
  padding: 0;
}

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6 !important;
}

.post-content a {
  color: var(--secondary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Recommended posts */
.recommended {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.recommended-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 2rem;
  color: #111;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.rec-card {
  display: flex;
  flex-direction: column;
}

.rec-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.rec-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--light-gray);
}

.rec-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rec-card:hover .rec-image img {
  transform: scale(1.05);
}

.rec-image .sticky-label {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: rgba(17, 17, 17, 0.78);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px;
}

.rec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  color: #777;
  font-size: 0.85rem;
  padding: 0.35rem 0 0.25rem 0;
}

.rec-meta span {
  font-size: 1rem;
}

.rec-meta i {
  margin-right: 0.3rem;
  color: var(--primary-color);
}

.rec-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.rec-card:hover .rec-title {
  color: var(--secondary-color);
}

.rec-excerpt {
  margin: 0;
  color: #666;
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hide plugin share blocks */
.blog-post-page .sharedaddy,
.blog-post-page .sharedaddy * {
  display: none !important;
}

/* Legacy hidden elements */
.download-buttons {
  display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .recommended-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-hero {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 968px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .sidebar {
    position: static;
    max-height: none;
    order: 2;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
  }

  .main-content {
    order: 1;
  }
}

@media (max-width: 768px) {
  .blog-content {
    padding: 2rem 0 3rem;
  }

  .blog-post-container {
    width: 92%;
  }

  .post-hero {
    margin-bottom: 2rem;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
  }

  .post-header__title {
    font-size: 1.65rem;
  }

  .post-content {
    font-size: 1rem;
  }

  .post-content h2 {
    font-size: 1.35rem !important;
  }

  .post-content h3 {
    font-size: 1.15rem !important;
  }

  .recommended {
    margin-top: 3rem;
    padding-top: 2rem;
  }

  .recommended-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .breadcrumb-nav {
    font-size: 0.8rem;
  }

  .sidebar-share {
    justify-content: flex-start;
  }
}

/* Print */
@media print {
  .sidebar,
  .breadcrumbs {
    display: none;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    color: black;
  }
}
