/* ==========================================================================
   WordPress-only additions. main.css is the untouched original stylesheet.
   ========================================================================== */

/* Admin toolbar: keep the sticky header and mobile menu below it. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 1024px) {
  .admin-bar .main-nav { inset: calc(var(--header-h) + 32px) 0 0 0; }
}
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .main-nav { inset: calc(var(--header-h) + 46px) 0 0 0; }
}
@media (max-width: 600px) {
  /* WP un-fixes the toolbar on small screens. */
  .admin-bar .site-header { top: 0; }
  .admin-bar .main-nav { inset: var(--header-h) 0 0 0; }
}

/* Mega menu: deeper levels created in Appearance → Menus. */
.mega__col ul ul { margin: 6px 0 0 12px; }
.mega__title a { color: inherit; }

/* Accessibility helper used by WordPress core markup. */
.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;
}

/* Editor content on new pages and posts (template-parts/content-simple.php). */
.prose img, .prose video, .prose iframe { max-width: 100%; height: auto; }
.prose figure { margin: 28px 0; }
.prose figcaption { font-size: 14px; color: var(--muted, #5b6474); margin-top: 8px; }
.prose .alignleft { float: left; margin: 0 24px 16px 0; }
.prose .alignright { float: right; margin: 0 0 16px 24px; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 18px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

/* Post listings (blog index, archives, search). */
.post-list { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post-list__item { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.post-list__item h2 { font-size: 21px; margin: 6px 0 10px; }
.post-list__meta { font-size: 14px; color: var(--muted, #5b6474); }
.pagination { margin-top: 40px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; }
.pagination .current { background: var(--ink, #0b1426); color: #fff; }

/* Form submission states added by the WordPress integration. */
.form-error-msg { color: #c0392b; font-size: 14px; margin-top: 10px; }
form.is-submitting [type="submit"] { opacity: .6; pointer-events: none; }

/* Contact Form 7 lead form (inc/forms-cf7.php): make CF7's wrapper elements
   transparent so the original form layout and styles apply unchanged. */
.lead-form .wpcf7-form-control-wrap,
.consent .wpcf7-form-control,
.consent .wpcf7-list-item { display: contents; }
.consent .wpcf7-list-item { margin: 0; }
.lead-form .wpcf7-not-valid-tip,
.lead-form .wpcf7-spinner,
.lead-form .wpcf7-response-output { display: none !important; }
.lead-form .field select.wpcf7-not-valid,
.lead-form .field input.wpcf7-not-valid,
.lead-form .field textarea.wpcf7-not-valid { border-color: #c53030; }
/* Without JavaScript both steps are shown and CF7 prints its messages. */
.no-js .lead-form .form-step[hidden] { display: block; }
.no-js .lead-form [data-next],
.no-js .lead-form [data-back] { display: none; }
.no-js .lead-form .wpcf7-response-output { display: block !important; margin: 16px 0 0; }
