/* Reusable single blog template styles (Blogs/*.php) */

.blog-detail-page {
  background: #f5f7fa;
  padding-bottom: 2rem;
  max-width: 85vw;
  margin: 0 auto;
}

.blog-layout {
  padding-top: 2rem;
}

.blog-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.25rem;
  align-items: start;
}

.blog-article {
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 4px;
  overflow: hidden;
}

.post-featured {
  position: relative;
}

.post-featured img {
  width: 100%;
  height: auto;
  display: block;
}

.post-meta-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.6rem;
  background: #eef4fa;
  border-top: 1px solid #c8d7e8;
  border-bottom: 1px solid #c8d7e8;
  font-size: 0.74rem;
  color: #31506f;
}

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

.post-body h2 {
  margin: 1.25rem 0 0.75rem;
  color: #0f2740;
  font-size: 1.66rem;
  line-height: 1.2;
}

.post-body h3 {
  margin: 1rem 0 0.55rem;
  color: #13355b;
  font-size: 1.2rem;
}

.post-body p {
  margin-bottom: 0.8rem;
  color: #334155;
  line-height: 1.62;
  font-size: 0.97rem;
}

.post-body ul {
  margin: 0.2rem 0 0.85rem;
  padding-left: 1.1rem;
}

.post-body li {
  margin-bottom: 0.45rem;
  color: #334155;
}

.post-toc {
  border: 1px solid #b9d1e8;
  background: #f0f7ff;
  padding: 0.65rem;
  margin-bottom: 1rem;
}

.post-toc-toggle {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0e3c68;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.post-toc-toggle:hover {
  color: #0b3153;
}

.post-toc-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.post-toc-content {
  margin-top: 0.55rem;
}

.post-toc-content[hidden] {
  display: none;
}

.post-toc-content a {
  display: block;
  margin-bottom: 0.25rem;
}

.post-toc-content a:last-child {
  margin-bottom: 0;
}

.post-toc strong {
  color: #0e3c68;
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.post-toc a {
  color: #0d5f96;
  text-decoration: none;
  font-size: 0.88rem;
}

.post-toc a:hover {
  color: #0a4770;
  text-decoration: underline;
}

.sidebar-card {
  background: #fff;
  border: 1px solid #dfe6ef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.sidebar-card-title {
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #dfe6ef;
  color: #0f2740;
  font-size: 0.95rem;
  font-weight: 700;
  background: #f8fbff;
}

/* ── About Card (Pro) ── */
.about-card-pro {
  padding: 0.9rem;
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.about-card-brand strong {
  display: block;
  color: #0b253f;
  font-size: 0.92rem;
  line-height: 1.2;
}

.about-card-brand span {
  color: #64748b;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.about-card-divider {
  height: 2px;
  background: linear-gradient(90deg, #c8982e, transparent);
  margin: 0.65rem 0;
  border-radius: 1px;
}

.about-card-desc {
  margin: 0 0 0.6rem;
  color: #334155;
  font-size: 0.8rem;
  line-height: 1.55;
  text-align: justify;
}

.about-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #eef7f1;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  font-size: 0.71rem;
  font-weight: 600;
  color: #0f6f42;
}

.sidebar-form {
  padding: 0.75rem;
}

.sidebar-form input,
.sidebar-form textarea {
  width: 100%;
  border: 1px solid #bccbdd;
  border-radius: 2px;
  padding: 0.45rem 0.52rem;
  margin-bottom: 0.48rem;
  font-size: 0.82rem;
}

.sidebar-form textarea {
  min-height: 68px;
  resize: vertical;
}

.sidebar-form button {
  width: 100%;
  border: none;
  border-radius: 3px;
  background: linear-gradient(135deg, #1e7a4b, #0f5f37);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem;
}

.sidebar-form button:hover {
  filter: brightness(1.05);
}

/* ── Project Slider ── */
.project-slider-card {
  border: none;
  overflow: hidden;
  border-radius: 6px;
}

.project-slider {
  position: relative;
  overflow: hidden;
}

.project-slider-track {
  display: flex;
  transition: transform 0.45s ease;
}

.project-slide {
  min-width: 100%;
  position: relative;
}

.project-slide img {
  width: 100%;
  height: 195px;
  object-fit: cover;
  display: block;
}

.project-slide-label {
  display: block;
  background: #0f6f42;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  text-align: center;
}

/* Navigation Arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  background: rgba(255, 255, 255, 0.45);
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
  line-height: 1;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.7);
}

.slider-prev {
  left: 6px;
}

.slider-next {
  right: 6px;
}

.news-list,
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0.65rem 0.75rem;
}

.news-list li {
  border-bottom: 1px dashed #e2e8f0;
  padding: 0.45rem 0;
}

.news-list li:last-child {
  border-bottom: none;
}

.news-list a {
  color: #0f3f69;
  text-decoration: none;
  font-size: 0.81rem;
  line-height: 1.45;
}

.news-list small {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.72rem;
}

.recent-list li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.recent-list img {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 2px;
}

.recent-list a {
  color: #0f3f69;
  text-decoration: none;
  font-size: 0.77rem;
  line-height: 1.35;
}

/* ── Sidebar Video Embed ── */
.sidebar-video-wrap {
  position: relative;
}

.sidebar-video-wrap .youtube-facade {
  position: relative;
  width: 100%;
  height: auto;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.sidebar-video-wrap .youtube-facade img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.sidebar-video-wrap .youtube-facade::before,
.sidebar-video-wrap .youtube-facade::after {
  display: none;
}

.sidebar-video-wrap .yt-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  transition: transform 0.2s;
}

.sidebar-video-wrap .youtube-facade:hover .yt-play-btn {
  transform: scale(1.1);
}

.sidebar-video-wrap .youtube-facade.playing {
  aspect-ratio: 16/9;
}

.sidebar-video-wrap .youtube-facade.playing iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.share-box {
  padding: 0.7rem;
}

.share-label {
  margin: 0 0 0.45rem;
  color: #0f2740;
  font-size: 0.82rem;
  font-weight: 600;
}

.share-links {
  display: flex;
  gap: 0.45rem;
}

.share-links a {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
}

.share-links .x {
  background: #1d9bf0;
}

.share-links .fb {
  background: #1877f2;
}

.share-links .ln {
  background: #0a66c2;
}

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

  .blog-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .sidebar-card {
    margin-bottom: 0;
  }
}

@media (max-width: 640px) {
  .blog-detail-hero {
    min-height: 190px;
  }

  .blog-layout {
    padding-top: 1.2rem;
  }

  .post-body h2 {
    font-size: 1.42rem;
  }

  .post-body h3 {
    font-size: 1.1rem;
  }

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