/* ==========================================
   WORDPRESS COMPATIBILITY & GUTENBERG BLOCKS
   Dark Theme Design System Extension
   ========================================== */

/* 1. Admin Bar Adjustments */
body.admin-bar .navbar {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .navbar {
    top: 46px;
  }
}

/* 2. Inner Page Hero */
.page-hero,
.single-post-hero {
  position: relative;
  padding: calc(var(--nav-height) + 4rem) 0 3.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3.5rem;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(46, 75, 242, 0.15), transparent 70%);
  pointer-events: none;
}

.page-hero-title,
.single-post-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.single-post-lead {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-top: 1rem;
}

/* 3. Gutenberg Blocks & Typography */
.entry-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #cfd2dc;
}

.entry-content > * {
  margin-bottom: 1.8rem;
}

.entry-content h2 {
  font-size: 2rem;
  margin-top: 2.8rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.entry-content h3 {
  font-size: 1.6rem;
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.entry-content h4 {
  font-size: 1.3rem;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.entry-content strong,
.entry-content b {
  color: #ffffff;
  font-weight: 700;
}

.entry-content p {
  color: #c7cbd6;
  font-size: 1.1rem;
  line-height: 1.9;
}

.entry-content ul,
.entry-content ol {
  margin-left: 2rem;
  margin-bottom: 1.8rem;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: 0.6rem;
  color: #c7cbd6;
}

.entry-content blockquote,
.wp-block-quote {
  border-left: 4px solid var(--accent-primary);
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: 2.5rem 0;
  font-style: italic;
  color: var(--text-primary);
}

html[dir="rtl"] .entry-content blockquote,
html[dir="rtl"] .wp-block-quote {
  border-left: none;
  border-right: 4px solid var(--accent-primary);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.entry-content pre,
.wp-block-code {
  background: #0d0f14;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.95rem;
  color: #a5b4fc;
}

.entry-content img,
.wp-block-image img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

/* Alignments */
.alignwide {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* 4. Pagination */
.aa-pagination {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 4rem;
}

.aa-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.aa-pagination .page-numbers:hover,
.aa-pagination .page-numbers.current {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px var(--glow-primary);
}

/* 5. Comments Area */
.comments-area {
  margin-top: 4rem;
}

.comment-list .comment {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-author img {
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
}

.comment-metadata {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.comment-content p {
  font-size: 1rem;
  line-height: 1.7;
}

.comment-reply-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.comment-respond {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 3rem;
}

.comment-respond label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.comment-respond input:focus,
.comment-respond textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--glow-primary);
}

/* 6. Screen Reader */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
