/* ==========================================================
   WordPress-specific additions for the Medcule theme
   ========================================================== */

/* Admin bar offset for the sticky header */
.admin-bar .header { top: 32px; }
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .header { top: 0; } }

/* Accessibility helper */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Featured images inside blog covers */
.post-cover img.post-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.post-cover:has(img.post-cover-img)::after { display: none; }
.art-cover .post-cover { border-radius: var(--radius-lg); }
.recent .ri.ri-img { overflow: hidden; padding: 0; }
.recent .ri.ri-img img { width: 100%; height: 100%; object-fit: cover; }

/* Contact form extras */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert {
  margin: 14px 0 6px; padding: 12px 16px; border-radius: 12px;
  background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; font-size: .93rem;
}
.form-card button[disabled] { opacity: .7; cursor: progress; }
.newsletter button[disabled] { opacity: .7; }

/* Blog list: filter line, empty state, pagination */
.blog-filter {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: -10px 0 26px; padding: 12px 18px; border-radius: 14px; background: var(--bg-soft); color: var(--muted); font-size: .95rem;
}
.blog-filter a { color: var(--blue); font-weight: 600; }
.blog-empty { padding: 40px 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.blog-empty a { color: var(--blue); font-weight: 600; }
.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 44px; }
.pagination:empty { display: none; }
.pagination .page-numbers {
  min-width: 44px; height: 44px; padding: 0 14px; border-radius: 12px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: #fff; color: var(--navy); font-weight: 600; transition: all .3s;
}
.pagination a.page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination .page-numbers.dots { border: 0; background: none; }

/* Article content written in the block editor */
.art-main .prose .art-h2 { border-left: 0; padding-left: 0; }
.wp-content img { max-width: 100%; height: auto; border-radius: 14px; }
.wp-content figure { margin: 26px 0; }
.wp-content figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); text-align: center; }
.wp-content .alignleft { float: left; margin: 6px 24px 16px 0; }
.wp-content .alignright { float: right; margin: 6px 0 16px 24px; }
.wp-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.wp-content .wp-block-embed iframe, .wp-content iframe { max-width: 100%; }
.wp-content .wp-block-quote, .wp-content blockquote {
  margin: 26px 0; padding: 18px 22px; border-left: 4px solid var(--green); background: var(--bg-mint); border-radius: 0 14px 14px 0;
}
.wp-content .wp-block-table table { width: 100%; border-collapse: collapse; }
.wp-content .wp-block-table td, .wp-content .wp-block-table th { padding: 10px 12px; border: 1px solid var(--line); }
.wp-content .wp-block-button__link { border-radius: 999px; background: var(--grad); color: #fff; padding: 12px 26px; font-weight: 600; }
.wp-content::after { content: ""; display: table; clear: both; }
@media (max-width: 640px) {
  .wp-content .alignleft, .wp-content .alignright { float: none; margin: 18px 0; }
}

/* Generic pages created in WordPress (page.php) */
.lg-sec.wp-content > *:first-child { margin-top: 0; }
.lg-sec.wp-content h2 { margin: 34px 0 12px; }
.lg-sec.wp-content p, .lg-sec.wp-content li { color: var(--text); line-height: 1.75; }
.lg-sec.wp-content ul, .lg-sec.wp-content ol { padding-left: 22px; margin: 12px 0; }
.post-cover .pc-cat { z-index: 2; }
