/* =========================================================
   QUILLS DIGITAL — WordPress-specific styles
   (admin bar, post content, pagination, comments)
   ========================================================= */

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

/* ---------- Accessibility ---------- */
.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 !important;
  width: 1px;
  word-wrap: normal !important;
}

/* ---------- Placeholder art (posts without a featured image) ---------- */
.img-ph {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.img-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.20), transparent 58%);
}
.img-ph--mix { background: linear-gradient(135deg, #0D7B72 0%, #1A9E94 48%, #C2923B 100%); }
.img-ph--ink { background: linear-gradient(160deg, #073B36 0%, #0D7B72 50%, #9A7530 100%); }

/* ---------- Author initials ---------- */
span.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ink-accent) 0%, var(--ink-light) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.blog-card .author span.avatar { width: 32px; height: 32px; font-size: 11px; }

/* ---------- Cards & links ---------- */
a.featured-media { display: block; }
.featured-body h2 a,
.blog-card h3 a { color: inherit; }
a.filter-pill { display: inline-block; }

/* ---------- Single post / page ---------- */
.entry-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border-color); }
.entry-header .author .name { font-size: 14px; }
.entry-header .author .role { font-size: 12px; }

.entry-content {
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.8;
}
.entry-content > * + * { margin-top: 1.4em; }
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--text-heading);
  line-height: 1.25;
  margin-top: 2em;
}
.entry-content h2 { font-size: 2.2rem; }
.entry-content h3 { font-size: 1.7rem; }
.entry-content h4 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 600; }
.entry-content a { color: var(--ink-accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--ink-light); }
.entry-content ul,
.entry-content ol { padding-left: 1.4em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li + li { margin-top: 0.4em; }
.entry-content blockquote {
  border-left: 3px solid var(--gold-accent);
  padding: 4px 0 4px 24px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--text-heading);
}
.entry-content img,
.entry-content video,
.entry-content iframe { max-width: 100%; height: auto; border-radius: var(--radius-card); }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption,
.entry-content .wp-caption-text { font-size: 13px; color: var(--text-dim); text-align: center; margin-top: 8px; }
.entry-content code {
  font-family: Consolas, Monaco, monospace;
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-surface);
}
.entry-content pre {
  overflow-x: auto;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}
.entry-content pre code { padding: 0; background: none; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content th,
.entry-content td { padding: 10px 12px; border: 1px solid var(--border-color); text-align: left; }
.entry-content hr { border: 0; border-top: 1px solid var(--border-color); }

.alignleft { float: left; margin: 0.4em 1.6em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.6em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: table; clear: both; }

.page-links { margin-top: 32px; font-size: 14px; color: var(--text-muted); }
.page-links a { margin-left: 8px; color: var(--ink-accent); }

.entry-tags { margin-top: 40px; margin-bottom: 0; }

/* ---------- Previous / next post ---------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 56px;
}
@media (min-width: 768px) {
  .post-nav { grid-template-columns: 1fr 1fr; }
}
.post-nav__link { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px; }
.post-nav__link--next { text-align: right; grid-column: -2; }
.post-nav__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.post-nav__title { font-family: var(--font-display); font-size: 20px; line-height: 1.3; color: var(--text-heading); }
.post-nav__link:hover .post-nav__title { color: var(--ink-accent); }

/* ---------- Pagination ---------- */
.quills-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
}
.quills-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}
.quills-pagination a.page-numbers:hover { color: var(--text-primary); border-color: var(--border-hover); }
.quills-pagination .page-numbers.current { background: var(--ink-accent); border-color: var(--ink-accent); color: #fff; }
.quills-pagination .page-numbers.dots { border-color: transparent; }

/* ---------- Contact Form 7 ---------- */
.wpcf7-form-control-wrap { display: block; }
.wpcf7 .field-hint { margin-top: 6px; }

.wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
}
.wpcf7-form .wpcf7-not-valid { border-color: rgba(220, 38, 38, 0.45); }

.wpcf7-form input.btn { justify-content: center; border: none; }
.wpcf7-form .wpcf7-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.wpcf7-spinner { display: block; margin: 12px auto 0; background-color: var(--ink-accent); }
.wpcf7-form.submitting .wpcf7-spinner { visibility: visible; }

.wpcf7 form .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 15px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.wpcf7 form.sent .wpcf7-response-output {
  background: rgba(13, 123, 114, 0.08);
  border-color: rgba(13, 123, 114, 0.22);
  color: var(--ink-accent);
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.22);
  color: #dc2626;
}

.wpcf7-form input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-btn);
  cursor: pointer;
}
.wpcf7-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--ink-accent);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wpcf7-form input[readonly] { opacity: 0.75; cursor: default; }

/* ---------- Job application popup ---------- */
.apply-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.apply-modal[hidden] { display: none; }
.apply-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 17, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.apply-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 40rem;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  animation: apply-modal-in 0.25s ease;
}
.apply-modal__dialog h3 { padding-right: 40px; }
.apply-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-muted);
  background: var(--bg-surface);
  transition: color 0.2s ease;
}
.apply-modal__close:hover { color: var(--text-primary); }
body.apply-modal-open { overflow: hidden; }
@keyframes apply-modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Comments ---------- */
.comments-area { margin-top: 64px; }
.comments-title { font-size: 2rem; margin-bottom: 24px; color: var(--text-heading); }
.comment-list { list-style: none; margin-bottom: 40px; }
.comment-list .children { list-style: none; margin-left: 24px; padding-left: 24px; border-left: 1px solid var(--border-color); }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--border-color); font-size: 15px; }
.comment-author { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--text-heading); }
.comment-author .avatar { width: 40px; height: 40px; border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 12px; color: var(--text-dim); margin: 4px 0 10px 52px; }
.comment-content { margin-left: 52px; color: var(--text-primary); line-height: 1.7; }
.comment-content p + p { margin-top: 0.8em; }
.reply { margin: 8px 0 0 52px; font-size: 13px; }
.reply a, .comment-reply-title small a { color: var(--ink-accent); }
.comments-closed { color: var(--text-muted); font-size: 14px; }

.comment-respond .comment-reply-title { font-size: 24px; margin-bottom: 8px; }
.comment-respond .comment-notes,
.comment-respond .logged-in-as { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.comment-form p { margin-bottom: 16px; }
.comment-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.comment-form .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.comment-form .comment-form-cookies-consent label { margin: 0; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  transition: border-color 0.3s ease;
}
.comment-form textarea { resize: vertical; min-height: 140px; }
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: rgba(13, 123, 114, 0.5); }
.comment-form .form-submit { margin: 8px 0 0; }
