/* ==========================================================================
   GO MARKETING — WordPress layer
   Admin bar, Contact Form 7 markup compatibility, editor content and WP UI bits.
   Loaded after style.css + heroes.css; the original design files are untouched.
   ========================================================================== */

/* ---------- Admin bar ---------- */
.admin-bar .nav { top: calc(14px + 32px); }
.admin-bar .menu { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .nav { top: calc(14px + 46px); }
  .admin-bar .menu { top: 46px; }
}

/* ---------- Accessibility helpers ---------- */
.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; }
.screen-reader-text:focus { clip: auto !important; clip-path: none; height: auto; width: auto; z-index: 100000; background: var(--ignite); color: #fff; padding: 10px 16px; border-radius: 999px; left: 16px; top: 16px; }

/* ---------- Contact Form 7 → original form markup ---------- */
.go-form { min-width: 0; }
.go-form .wpcf7 { margin: 0; }
.go-form .screen-reader-response { position: absolute; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; padding: 0; border: 0; word-wrap: normal !important; }
.go-form .hidden-fields-container, .go-form fieldset.hidden-fields-container { display: none; }

/* CF7 wraps each control in spans: let them disappear from layout so the original selectors keep working. */
.go-form .wpcf7-form-control-wrap { display: contents; }
.go-form .wpcf7-checkbox, .go-form .wpcf7-radio, .go-form .wpcf7-list-item { display: contents; margin: 0; }
.go-form .wpcf7-list-item-label::before, .go-form .wpcf7-list-item-label::after { content: none; }

/* Floating labels: the input now sits inside the wrap span, so mirror "input + label" with :has(). */
.field .wpcf7-form-control-wrap:has(input:focus) + label,
.field .wpcf7-form-control-wrap:has(input:not(:placeholder-shown)) + label,
.field .wpcf7-form-control-wrap:has(textarea:focus) + label,
.field .wpcf7-form-control-wrap:has(textarea:not(:placeholder-shown)) + label { transform: translateY(-24px) scale(0.78); color: #ff8a3d; }

/* Validation: use the design's own error lines; hide CF7's default tips. */
.go-form .wpcf7-not-valid-tip { display: none; }
.go-form .field.is-invalid .field__error { display: block; }

/* Response box doubles as the original status line. */
.go-form .wpcf7-response-output { margin: 14px 0 0; padding: 0; border: 0; color: #ff8a7a; font-size: 0.9rem; }
.go-form .wpcf7-form.init .wpcf7-response-output,
.go-form .wpcf7-form.sent .wpcf7-response-output,
.go-form .wpcf7-form.resetting .wpcf7-response-output,
.go-form .wpcf7-form.submitting .wpcf7-response-output,
.go-form .form.is-sent .wpcf7-response-output { display: none; }
.go-form .wpcf7-spinner { display: none; }
.go-form .wpcf7-form.submitting button[type="submit"] { opacity: 0.6; pointer-events: none; }

/* Honeypot */
.go-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Fallback when Contact Form 7 is not installed */
.form--fallback .form__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Editor content (articles, plain pages) ---------- */
.go-page-body { max-width: 46rem; }
.prose .wp-block-image, .prose figure:not(.prose__stat) { margin: 2em 0; }
.prose .wp-block-image img, .prose figure img { border-radius: var(--radius); height: auto; }
.prose figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--text-dim); }
.prose a:not(.btn) { color: var(--ignite); text-decoration: underline; text-underline-offset: 3px; }
.prose .wp-block-quote { margin: 2em 0; }
.prose .wp-block-quote p + p { margin-top: 0.6em; }
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.prose .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.post-tags a { display: inline-flex; }
.post-tags a:hover span { border-color: var(--ignite); color: var(--ignite); }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol { padding-left: 0; padding-right: 1.3em; }
[dir="rtl"] .prose blockquote { padding: 4px 28px 4px 0; border-left: 0; border-right: 3px solid var(--ignite); }
[dir="rtl"] .prose__stat div { padding: 24px 0 24px 18px; }
[dir="rtl"] .prose__stat div + div { padding-left: 0; padding-right: 18px; border-left: 0; border-right: 1px solid var(--line); }

/* ---------- Pagination / search / comments ---------- */
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 600; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--ignite); border-color: var(--ignite); color: var(--midnight); }
.search-form { display: flex; gap: 10px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; padding: 14px 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: inherit; font: inherit; }
.search-form .search-submit { padding: 14px 22px; border-radius: 999px; border: 0; background: var(--ignite); color: var(--midnight); font: inherit; font-weight: 600; cursor: pointer; }
.comment-list { list-style: none; display: grid; gap: 24px; margin-bottom: 40px; }
.comment-respond input:not([type="submit"]):not([type="checkbox"]), .comment-respond textarea { width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: transparent; color: inherit; font: inherit; }
.comment-respond .submit { padding: 14px 24px; border-radius: 999px; border: 0; background: var(--ignite); color: var(--midnight); font-weight: 600; cursor: pointer; }

/* 404 */
.go-404 { min-height: 70vh; display: flex; align-items: center; }
