/* ---------------------------------------------------------
   HIDE NAVBAR SEARCH BAR ON POST DETAIL PAGE
---------------------------------------------------------- */
.nav-center .search-box {
  display: none !important;
}

/* ---------------------------------------------------------
   GLOBAL FONT + BACKGROUND (same as home)
---------------------------------------------------------- */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding-top: 72px; /* navbar spacing */
}

/* ---------------------------------------------------------
   MAIN WRAPPER (same width as home feed)
---------------------------------------------------------- */
.feed-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px;
}

/* ---------------------------------------------------------
   POST CARD — EXACT HOME STYLE
---------------------------------------------------------- */
.post-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 22px;
  border: 1px solid #e2e2e2;
  box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.04);
}

/* ---------------------------------------------------------
   POST HEADER
---------------------------------------------------------- */
.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.post-meta {
  display: flex;
  flex-direction: column;
}

.post-author {
  font-weight: 600;
  font-size: 15px;
}

.post-time {
  color: #666;
  font-size: 12px;
}

.post-category {
  background: #eaf3ff;
  color: #1a73e8;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 100px;
  margin-top: 2px;
  width: fit-content;
}

/* ---------------------------------------------------------
   TITLE + CONTENT
---------------------------------------------------------- */
.post-title {
  font-size: 20px;
  font-weight: 600;
  margin: 15px 0 8px 0;
}

.post-content {
  font-size: 14px;
  color: #333;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   SINGLE MEDIA (Image / Video)
---------------------------------------------------------- */
.media-single {
  margin-top: 12px;
}

.media-single-img,
.media-single-video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  display: block;
  max-height: 600px;
  object-fit: contain;
}

/* ---------------------------------------------------------
   MULTI-MEDIA SLIDER (Home Page Style)
---------------------------------------------------------- */
.media-gallery {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #000;
  border-radius: 12px;
  margin-top: 12px;
}

.gallery-track {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
}

.gallery-item {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  max-height: 600px;
  border-radius: 12px;
  object-fit: contain;
}

/* ---------------------------------------------------------
   SLIDER NAV BUTTONS
---------------------------------------------------------- */
.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.gallery-prev:hover,
.gallery-next:hover {
  background: #fff;
}

/* ---------------------------------------------------------
   SLIDER DOTS
---------------------------------------------------------- */
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.gallery-dots span {
  width: 8px;
  height: 8px;
  background: #bbb;
  border-radius: 50%;
  cursor: pointer;
}

.gallery-dots .active {
  background: #333;
}

/* ---------------------------------------------------------
   ACTION BAR
---------------------------------------------------------- */
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.vote-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vote-btn {
  background: #eee;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.vote-btn:hover {
  background: #ccc;
}

.vote-count {
  font-size: 14px;
  font-weight: 600;
}

.action-btn {
  font-size: 14px;
  cursor: pointer;
  color: #333;
}

.action-btn:hover {
  text-decoration: underline;
}

/* Vote UI state (same as home) */
.vote-btn.active {
  color: #fff;
}

.vote-btn.upvote.active {
  background: #2ecc71;
}

.vote-btn.downvote.active {
  background: #e74c3c;
}

/* Share pointer (UX) */
.share-btn {
  cursor: pointer;
}
/* ---------------------------------------------------------
   COMMENTS SECTION
---------------------------------------------------------- */
.comments-section {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 18px;
}

.comment-box {
  width: 100%;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  background: #fafafa;
  box-sizing: border-box;
}

.comment-submit {
  padding: 10px 20px;
  border: none;
  background: #000;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

/* ---------------------------------------------------------
   COMMENT CARD
---------------------------------------------------------- */
.comment-card {
  padding: 18px 0;
  border-bottom: 1px solid #eee;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.comment-text {
  margin: 10px 0 6px;
}

.comment-actions {
  display: flex;
  gap: 12px;
  font-size: 14px;
}

/* ---------------------------------------------------------
   REPLIES
---------------------------------------------------------- */
.reply-card {
  margin-left: 45px;
  padding-left: 14px;
  border-left: 2px solid #ddd;
  margin-top: 12px;
}

.reply-form {
  margin-left: 45px;
  margin-top: 16px; /* more height */
  padding: 0 14px; /* small horizontal space */
  border-left: 2px solid #eee;
}

/* Reply textarea */
.reply-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fafafa;
  box-sizing: border-box;
  margin-bottom: 6px;
}

.reply-submit {
  margin-left: 0;
  padding: 8px 16px;
  border: none;
  background: #000;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

/* ---------------------------------------------------------
   Reply Toggle Styling
---------------------------------------------------------- */
.reply-toggle {
  cursor: pointer;
  color: #1a73e8;
  font-size: 14px;
  user-select: none;
}

.reply-toggle:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
    Reply Structure
---------------------------------------------------------- */
.reply-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reply-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.reply-text {
  margin: 8px 0;
}

/* ---------------------------------------------------------
   Hide/Show Reply Form
---------------------------------------------------------- */
.hidden {
  display: none !important;
}

/* ---------------------------------------------------------
   DOCUMENT CARD (Single File)
---------------------------------------------------------- */
.doc-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f3f3f3;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  border: 1px solid #ddd;
  margin-top: 12px;
}

.doc-icon {
  font-size: 28px;
}

.doc-info {
  display: flex;
  flex-direction: column;
}

.doc-name {
  font-size: 14px;
  font-weight: 600;
}

.doc-meta {
  font-size: 12px;
  color: #666;
}

/* ---------------------------------------------------------
   DOCUMENT INSIDE SLIDER
---------------------------------------------------------- */
.doc-slide {
  width: 80%;
  height: 70%;
  background: #f2f2f2;
  border-radius: 12px;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #333;
}

.doc-big-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.doc-slide .doc-name {
  font-size: 14px;
  text-align: center;
  padding: 0 10px;
}

/* ---------------------------------------------------------
   FULLSCREEN LIGHTBOX
--------------------------------------------------------- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.lightbox.hidden {
  display: none;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox-img,
#lightbox-video {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}

/* Navigation */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  font-size: 40px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
}

#lightbox-prev {
  left: 20px;
}

#lightbox-next {
  right: 20px;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* ---------------------------------------------------------
   TOAST NOTIFICATION
--------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 99999;
}

.toast.show {
  opacity: 1;
}
