/* Post Page Specific Styles */

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-separator {
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--text-secondary);
}

/* Post Layout */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
}

/* Post Content */
.post-content {
  /* background: #0000007b; */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 30px;
}

/* Post Header */
.post-header {
  margin-bottom: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.post-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 15px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}

.post-date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.post-date svg {
  width: 16px;
  height: 16px;
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tag {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.category-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Page Body (WordPress Content) */
.page-body {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.page-body p {
  margin-bottom: 15px;
}

.page-body a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.page-body a:hover {
  color: #a78bfa;
  text-decoration: underline;
}

.page-body img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin: 10px auto;
  display: block;
}

.page-body h3,
.page-body h4,
.page-body h5 {
  color: #fff;
  margin: 25px 0 15px;
}

.page-body h2 {
  line-height: 1.4;
  font-size: 1.2rem;
}

.page-body h3 {
  font-size: 1.2rem;
  line-height: 1.3;
}

.page-body h4 {
  font-size: 1.2rem;
}

.page-body h5 {
  font-size: 1.2rem;
}

.page-body h5 a {
  display: inline-block;
  background: linear-gradient(
    135deg,
    #5f7cff 0%,
    #7a5cff 45%,
    #d46bff 75%,
    #ff6ec7 100%
  );
  color: #fff !important;
  padding: 12px 30px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(122, 92, 255, 0.3);
}

.page-body h5 a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(122, 92, 255, 0.5);
}

.page-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  margin: 25px 0;
}

.page-body strong {
  color: #fff;
}

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tags-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Telegram CTA */
.telegram-cta {
  display: flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(
    135deg,
    rgba(0, 136, 204, 0.15),
    rgba(0, 136, 204, 0.05)
  );
  border: 1px solid rgba(0, 136, 204, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin: 25px 0;
}

.telegram-icon {
  width: 40px;
  height: 40px;
  color: #0088cc;
  flex-shrink: 0;
}

.telegram-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.telegram-title {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.telegram-subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.telegram-btn {
  background: #0088cc;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.telegram-btn:hover {
  background: #006699;
  transform: translateY(-1px);
}

/* Comments Section */
.comments-section {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comments-title {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

/* Sidebar */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-widget {
  /* background: #0000007b; */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.widget-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Search Widget */
.search-widget {
  display: flex;
  gap: 8px;
}

.widget-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.85rem;
}

.widget-search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.widget-search-btn {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.widget-search-btn:hover {
  background: #6d28d9;
}

.widget-search-btn svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

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

.recent-post-item a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
  display: block;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.recent-post-item a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--accent);
}

/* Category List */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-list li a {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 6px 9px;
  border-radius: 20px;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s;
}

.category-list li a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Footer */
.footer {
  margin-top: 50px;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-content {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.footer-content a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .post-layout {
    padding-top:18px;
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .post-content {
    padding: 20px;
  }

  .post-title {
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 5px;
  }

  .post-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .telegram-cta {
    flex-direction: column;
    text-align: center;
  }

  .telegram-content {
    align-items: center;
  }

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

  .page-body h5 a {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Mobile View */
@media (max-width: 480px) {
  /* Prevent overflow */
  .post-content {
    padding: 15px;
    border-radius: 12px;
    overflow-x: hidden;
    word-wrap: break-word; /* Legacy */
    overflow-wrap: break-word;
  }

  .post-title {
    font-size: 1.25rem;
    word-break: break-word;
  }

  /* Handle dynamic content overflow */
  .page-body img,
  .page-body iframe,
  .page-body video,
  .page-body table {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Ensure text doesn't push width */
  .page-body,
  .page-body p,
  .page-body a {
    max-width: 100%;
    word-break: break-word;
  }

  /* Keep legacy hides */
  .post-categories {
    display: none;
  }

  .breadcrumb {
    display: none;
  }

  .category-tag {
    font-size: 0.7rem;
    padding: 3px 10px;
  }
}