/* =============================================================
   BLOG DETAIL — blog-detail.css
   Prefix: bld-
   ============================================================= */

/* ---- Page Banner ---- */
.tan-page-banner {
  position: relative;
  height: 420px;
  background: center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: -120px;
  padding-top: 120px;
}

.tan-page-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.5) 0%, rgba(0,0,0,.62) 100%);
}

.tan-page-banner__content {
  position: relative;
  z-index: 1;
  padding: 0 20px;
  max-width: 860px;
}

.tan-page-banner__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  letter-spacing: .3px;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* Breadcrumb inside banner */
.tan-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  font-size: .84rem;
}

.tan-breadcrumb a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  transition: color .2s;
}

.tan-breadcrumb a:hover { color: var(--primary-color, #e79520); }

.tan-breadcrumb__sep {
  color: rgba(255,255,255,.45);
  font-size: .65rem;
  display: flex;
  align-items: center;
}

.tan-breadcrumb__current {
  color: var(--primary-color, #e79520);
  font-weight: 600;
}

@media (max-width: 768px) {
  .tan-page-banner { height: 320px; margin-top: -80px; padding-top: 80px; }
  .tan-page-banner__title { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .tan-page-banner { height: 280px; }
  .tan-page-banner__title { font-size: 1.2rem; }
  .tan-breadcrumb__current { display: none; }
}

/* ---- Layout ---- */
.bld-section {
  padding: 60px 0 80px;
  background: #f9fafb;
}

.bld-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.bld-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* ---- Article ---- */
.bld-main {
  min-width: 0;
}

.bld-article {
  background: #fff;
  border-radius: 12px;
  padding: 40px 44px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  margin-bottom: 32px;
}

.bld-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: .82rem;
  color: #6b7280;
  margin-bottom: 24px;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-article__meta a {
  color: #6b7280;
  text-decoration: none;
  transition: color .2s;
}

.bld-article__meta a:hover { color: var(--primary-color, #e79520); }

.bld-article__sep { color: #d1d5db; }

.bld-article__category {
  background: var(--primary-color, #e79520);
  color: #fff !important;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .3px;
}

.bld-article__comments-count { font-weight: 500; }
.bld-article__comments-count i { margin-right: 3px; }

/* Body typography */
.bld-article__body {
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  font-size: 1rem;
  line-height: 1.8;
  color: #374151;
}

.bld-article__body p { margin-bottom: 1.25em; }

.bld-article__body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 2em 0 .75em;
  padding-bottom: .4em;
  border-bottom: 2px solid #f3f4f6;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-article__blockquote {
  border-left: 4px solid var(--primary-color, #e79520);
  background: #fffbf2;
  margin: 1.8em 0;
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
}

.bld-article__blockquote p {
  font-style: italic;
  color: #4b5563;
  margin-bottom: .5em;
  font-size: 1.05rem;
}

.bld-article__blockquote cite {
  font-style: normal;
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary-color, #e79520);
}

.bld-article__body figure {
  margin: 1.5em 0;
}

.bld-article__body figcaption {
  text-align: center;
  font-size: .85rem;
  color: #6b7280;
  margin-top: 8px;
  font-style: italic;
}

.bld-article__img-wrap {
  margin: 1.5em 0;
  border-radius: 10px;
  overflow: hidden;
}

.bld-article__img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.bld-article__img-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 1.5em 0;
}

.bld-article__img-row img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Tags + Share footer */
.bld-article__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid #f3f4f6;
}

.bld-article__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bld-article__tags-label {
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
  margin-right: 4px;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: .78rem;
  color: #4b5563;
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-tag:hover {
  border-color: var(--primary-color, #e79520);
  color: var(--primary-color, #e79520);
}

/* Social Share */
.bld-share {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bld-share__label {
  font-size: .82rem;
  font-weight: 600;
  color: #374151;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-share__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  position: relative;
}

.bld-share__btn:hover { opacity: .85; transform: translateY(-2px); }

.bld-share__btn--facebook  { background: #1877f2; }
.bld-share__btn--twitter   { background: #000; }
.bld-share__btn--whatsapp  { background: #25d366; }
.bld-share__btn--copy      { background: #6b7280; }

.bld-share__copy-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  font-size: .72rem;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-share__btn--copy.copied .bld-share__copy-tooltip { opacity: 1; }

/* ---- Author Bio ---- */
.bld-author {
  display: flex;
  gap: 24px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.bld-author__avatar {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color, #e79520);
}

.bld-author__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bld-author__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 6px;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-author__bio {
  font-size: .9rem;
  color: #6b7280;
  line-height: 1.65;
  margin: 0 0 12px;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-author__socials {
  display: flex;
  gap: 10px;
}

.bld-author__socials a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: #4b5563;
  text-decoration: none;
  transition: background .2s, color .2s;
}

.bld-author__socials a:hover {
  background: var(--primary-color, #e79520);
  color: #fff;
}

/* ---- Prev / Next Navigation ---- */
.bld-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.bld-post-nav__prev,
.bld-post-nav__next {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .2s, box-shadow .2s;
}

.bld-post-nav__prev:hover,
.bld-post-nav__next:hover {
  border-color: var(--primary-color, #e79520);
  box-shadow: 0 4px 12px rgba(231,149,32,.12);
}

.bld-post-nav__next { text-align: right; }

.bld-post-nav__dir {
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary-color, #e79520);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-post-nav__title {
  font-size: .9rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

/* ---- Related Posts ---- */
.bld-related {
  margin-bottom: 40px;
}

.bld-related__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color, #e79520);
  display: inline-block;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

/* ---- Related Posts Carousel ---- */
.bld-related__carousel {
  position: relative;
}

.bld-related__track-wrap {
  overflow: hidden;
  border-radius: 12px;
}

.bld-related__track {
  display: flex;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
}

.bld-related__slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
}

.bld-related__slide-img {
  flex: 0 0 40%;
  display: block;
  overflow: hidden;
}

.bld-related__slide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}

.bld-related__slide:hover .bld-related__slide-img img { transform: scale(1.05); }

.bld-related__slide-body {
  flex: 1;
  min-width: 0;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.bld-related__slide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: .78rem;
  color: #9ca3af;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-related__slide-meta i { margin-right: 4px; }

.bld-related__slide-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-related__slide-title a {
  color: #111827;
  text-decoration: none;
  transition: color .2s;
}

.bld-related__slide-title a:hover { color: var(--primary-color, #e79520); }

.bld-related__slide-excerpt {
  font-size: .88rem;
  color: #6b7280;
  line-height: 1.65;
  margin: 0;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bld-related__slide-link {
  font-size: .84rem;
  font-weight: 600;
  color: var(--primary-color, #e79520);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap .2s;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  align-self: flex-start;
}

.bld-related__slide-link:hover { gap: 8px; }

/* Prev / Next buttons */
.bld-related__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.14);
  color: #374151;
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s, box-shadow .2s;
  z-index: 2;
}

.bld-related__btn:hover {
  background: var(--primary-color, #e79520);
  color: #fff;
  box-shadow: 0 4px 14px rgba(231,149,32,.35);
}

.bld-related__btn--prev { left: -18px; }
.bld-related__btn--next { right: -18px; }

/* Dots */
.bld-related__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
}

.bld-related__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}

.bld-related__dot--active {
  background: var(--primary-color, #e79520);
  transform: scale(1.3);
}

/* ---- Sidebar ---- */
.bld-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bld-widget {
  background: #fff;
  border-radius: 12px;
  padding: 24px 24px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.bld-widget__title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color, #e79520);
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  display: inline-block;
  width: 100%;
}

/* Search */
.bld-widget__search {
  display: flex;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.bld-widget__search input {
  flex: 1;
  padding: 11px 14px;
  border: none;
  outline: none;
  font-size: .9rem;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  color: #111827;
  background: transparent;
}

.bld-widget__search button {
  background: var(--primary-color, #e79520);
  border: none;
  color: #fff;
  padding: 11px 16px;
  cursor: pointer;
  font-size: .95rem;
  transition: background .2s;
  flex-shrink: 0;
}

.bld-widget__search button:hover { background: #c97d15; }

/* Categories */
.bld-widget__categories {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.bld-widget__categories li {
  border-bottom: 1px solid #f3f4f6;
}

.bld-widget__categories li:last-child { border-bottom: none; }

.bld-widget__categories a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: .88rem;
  color: #374151;
  text-decoration: none;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  transition: color .2s, padding-left .2s;
}

.bld-widget__categories a:hover {
  color: var(--primary-color, #e79520);
  padding-left: 4px;
}

.bld-widget__cat-count {
  background: #f3f4f6;
  color: #6b7280;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  transition: background .2s, color .2s;
}

.bld-widget__categories a:hover .bld-widget__cat-count {
  background: var(--primary-color, #e79520);
  color: #fff;
}

/* Recent Posts */
.bld-widget__recent-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bld-widget__recent-post {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.bld-widget__recent-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

.bld-widget__recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.bld-widget__recent-thumb:hover img { transform: scale(1.05); }

.bld-widget__recent-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bld-widget__recent-date {
  font-size: .75rem;
  color: #9ca3af;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
}

.bld-widget__recent-date i { margin-right: 3px; }

.bld-widget__recent-title {
  font-size: .84rem;
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  transition: color .2s;
}

.bld-widget__recent-title:hover { color: var(--primary-color, #e79520); }

/* Tags Cloud */
.bld-widget__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bld-widget__tag {
  display: inline-block;
  padding: 5px 13px;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  font-family: var(--font-family-primary, 'Jost', sans-serif);
  transition: border-color .2s, color .2s, background .2s;
}

.bld-widget__tag:hover {
  border-color: var(--primary-color, #e79520);
  background: var(--primary-color, #e79520);
  color: #fff;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .bld-layout {
    grid-template-columns: 1fr 300px;
    gap: 28px;
  }

  .bld-article { padding: 32px 28px; }
  .bld-related__btn--prev { left: -12px; }
  .bld-related__btn--next { right: -12px; }
}

@media (max-width: 900px) {
  .bld-layout {
    grid-template-columns: 1fr;
  }

  .bld-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .bld-section { padding: 32px 0 56px; }

  .bld-article {
    padding: 24px 18px;
  }

  .bld-article__img-row {
    grid-template-columns: 1fr;
  }

  .bld-article__img-row img { height: 200px; }

  .bld-post-nav {
    grid-template-columns: 1fr;
  }

  .bld-post-nav__next { text-align: left; }

  .bld-related__slide {
    flex-direction: column;
  }

  .bld-related__slide-img {
    flex: 0 0 200px;
    height: 200px;
  }

  .bld-related__slide-body {
    padding: 20px 18px;
  }

  .bld-related__btn--prev { left: 6px; }
  .bld-related__btn--next { right: 6px; }

  .bld-author {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 18px;
  }

  .bld-author__socials { justify-content: center; }

  .bld-article__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .bld-sidebar {
    grid-template-columns: 1fr;
  }
}
