/* ═══════════════════════════════════════════════
   WordPress-specific styling.

   Everything here covers markup the static build never had: core block
   output, the admin bar, comment threads, the inner templates, and
   Contact Form 7's own elements.
═══════════════════════════════════════════════ */

/* ── Admin bar vs the fixed nav ───────────────────────────── */
.admin-bar .nav { top: 32px; }

@media screen and (max-width: 782px) {
  .admin-bar .nav { top: 46px; }
}

/* ── Skip link ────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem 1.5rem;
  background: var(--gold);
  color: var(--black);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.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;
}
.screen-reader-text:focus {
  position: static !important;
  width: auto;
  height: auto;
  clip: auto;
  white-space: normal;
}

/* ── Inner page heads ─────────────────────────────────────── */
.page-head {
  padding-top: calc(var(--nav-h) + 5rem);
  padding-bottom: 4rem;
}
.page-head .areas__title { max-width: 20ch; }
.page-head .icon-box { margin-bottom: 1.5rem; }
.icon-box--lg { width: 4rem; height: 4rem; }
.areas__note--wide { max-width: 60ch; text-align: left; }

.entry__hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* ── Long-form content ────────────────────────────────────── */
.entry {
  max-width: 68ch;
  margin-inline: auto;
  color: rgba(11, 11, 11, 0.72);
  font-size: 16px;
  line-height: 1.9;
}
.entry > * + * { margin-top: 1.5rem; }

.entry h1, .entry h2, .entry h3, .entry h4, .entry h5, .entry h6 {
  font-family: var(--serif);
  color: var(--black);
  font-weight: 500;
  line-height: 1.25;
  margin-top: 2.5rem;
}
.entry h2 { font-size: 2rem; }
.entry h3 { font-size: 1.5rem; }
.entry h4 { font-size: 1.25rem; }

.entry a { color: #8a6d2f; text-decoration: underline; text-underline-offset: 3px; }
.entry a:hover { color: var(--black); }

.entry ul, .entry ol { padding-left: 1.5rem; }
.entry li + li { margin-top: 0.5rem; }
.entry ul { list-style: disc; }
.entry ol { list-style: decimal; }

.entry blockquote {
  border-left: 2px solid var(--gold);
  padding-left: 1.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(11, 11, 11, 0.8);
}

.entry code, .entry kbd {
  background: rgba(11, 11, 11, 0.06);
  padding: 0.15em 0.4em;
  font-size: 0.9em;
}
.entry pre {
  background: var(--black);
  color: var(--ivory);
  padding: 1.5rem;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}
.entry pre code { background: none; padding: 0; }

.entry table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.entry th, .entry td {
  border-bottom: 1px solid rgba(11, 11, 11, 0.1);
  padding: 0.75rem 0.5rem;
  text-align: left;
}
.entry th { font-weight: 600; color: var(--black); }

.entry hr {
  border: 0;
  height: 1px;
  background: rgba(11, 11, 11, 0.12);
  margin-block: 2.5rem;
}

.entry--empty { color: rgba(248, 246, 241, 0.55); }
.entry--empty h2 { color: var(--ivory); }

.entry__meta {
  color: rgba(248, 246, 241, 0.4);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 1rem;
}
.section--light .entry__meta { color: rgba(11, 11, 11, 0.45); }

.entry__nav,
.entry__pages {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 68ch;
  margin: 3.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(11, 11, 11, 0.1);
  font-size: 13px;
}
.entry__nav a { color: rgba(11, 11, 11, 0.7); }
.entry__nav a:hover { color: var(--gold); }

/* ── Blocks, media and captions ───────────────────────────── */
.entry .alignwide { max-width: min(1100px, 92vw); margin-inline: auto; }
.entry .alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.entry .alignleft { float: left; margin: 0.5rem 2rem 1.5rem 0; max-width: 45%; }
.entry .alignright { float: right; margin: 0.5rem 0 1.5rem 2rem; max-width: 45%; }
.entry .aligncenter { margin-inline: auto; }

.wp-caption { max-width: 100%; }
.wp-caption-text,
.wp-element-caption {
  font-size: 12px;
  color: rgba(11, 11, 11, 0.5);
  text-align: center;
  margin-top: 0.5rem;
}

.wp-block-image img { height: auto; }

.wp-block-button__link {
  background: var(--gold);
  color: var(--black);
  border-radius: 0;
  padding: 1rem 2.25rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.wp-block-button__link:hover { background: var(--gold-hover); color: var(--black); }

/* ── Post cards in listing grids ──────────────────────────── */

/*
 * The blog, archive and search listings hold however many posts the query
 * returns, so they cannot use .areas__grid — that grid draws its hairlines with
 * a tinted background showing through a 1px gap, which leaves any unfilled
 * track glowing as an empty panel. Here the gap is real and each card carries
 * its own border, so a short last row simply renders as nothing.
 */
.posts-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px)  { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }

/* .area already declares a transparent 1px border, and :hover brightens it. */
.area--post { border-color: rgba(212, 177, 106, 0.14); }

.area--post .area__thumb {
  display: block;
  margin: -2.5rem -2rem 1.5rem;
  overflow: hidden;
}
.area--post .area__thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-soft);
}
.area--post:hover .area__thumb img { transform: scale(1.05); }
.area--post h3 a { color: inherit; }
.area--post:hover h3 a { color: var(--gold); }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 3.5rem;
}
.pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  min-width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0.75rem;
  border: 1px solid rgba(212, 177, 106, 0.28);
  color: rgba(248, 246, 241, 0.65);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  border-color: var(--gold);
  color: var(--gold);
}
.pagination .page-numbers.current { background: rgba(212, 177, 106, 0.08); }

/* ── Search form ──────────────────────────────────────────── */
.search-form { max-width: 34rem; margin-top: 2rem; }
.search-form__row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}
.search-form__row .field__input { flex: 1; }
.section--light .search-form .field__label { color: rgba(11, 11, 11, 0.45); }
.section--light .search-form .field__input {
  color: var(--black);
  border-bottom-color: rgba(11, 11, 11, 0.2);
}

.error-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.practice-cta { text-align: center; }
.practice-cta .gold-rule { margin-inline: auto; }
/* Standalone heading for inner templates. v1 borrowed .firm__title from the
   homepage; that section no longer exists in v2, so it lives here instead. */
.section-heading {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1.1;
  color: var(--black);
  font-weight: 500;
}
.section-heading--light { color: var(--ivory); }

/* ── Comments ─────────────────────────────────────────────── */
.comments {
  max-width: 68ch;
  margin: 4rem auto 0;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(11, 11, 11, 0.1);
}
.comments__title {
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--black);
  margin-bottom: 2rem;
}
.comments__list { list-style: none; padding: 0; }
.comments__list .children { list-style: none; padding-left: 1.5rem; }
.comments__list li { margin-bottom: 2rem; }
.comment-author { display: flex; align-items: center; gap: 0.75rem; }
.comment-author img { border-radius: 9999px; }
.comment-meta { font-size: 12px; color: rgba(11, 11, 11, 0.45); }
.comment-content { color: rgba(11, 11, 11, 0.72); font-size: 15px; line-height: 1.8; }

.comment-form { margin-top: 2.5rem; }
.comment-form p { margin-bottom: 1.25rem; }
.comment-form .field__label,
.comment-form label {
  display: block;
  color: rgba(11, 11, 11, 0.45);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(11, 11, 11, 0.2);
  color: var(--black);
  font-size: 14px;
  padding-bottom: 0.75rem;
  border-radius: 0;
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

/* ── Widgets ──────────────────────────────────────────────── */
.widget { margin-bottom: 2.5rem; }
.widget__title {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════
   Contact Form 7

   CF7 emits its own wrappers and messages; these rules make its output
   read as part of the designed consultation card. The form itself should
   use the theme's .field / .field__label / .field__input classes — see
   readme.txt for the form template to paste into CF7.
═══════════════════════════════════════════════ */
.contact__form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__form .wpcf7-form p { margin: 0; }

/* Bare CF7 controls, in case the default form template is used. */
.contact__form .wpcf7-form-control:not(.wpcf7-submit) {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(212, 177, 106, 0.18);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 14px;
  padding: 0 0 0.75rem;
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s ease;
}
.contact__form .wpcf7-form-control:not(.wpcf7-submit):focus {
  border-bottom-color: var(--gold);
}
.contact__form .wpcf7-form-control::placeholder { color: rgba(248, 246, 241, 0.18); }

.contact__form select.wpcf7-form-control {
  color: rgba(248, 246, 241, 0.7);
  appearance: none;
  cursor: pointer;
}
.contact__form select.wpcf7-form-control option { background: var(--black-card); color: var(--ivory); }

.contact__form textarea.wpcf7-form-control { resize: none; }

.contact__form .wpcf7-submit {
  margin-top: 0.5rem;
  width: 100%;
  background: var(--gold);
  color: var(--black);
  border: 0;
  padding-block: 1rem;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}
.contact__form .wpcf7-submit:hover {
  background: var(--gold-hover);
  box-shadow: 0 6px 28px rgba(212, 177, 106, 0.42);
  transform: translateY(-1px);
}

/* Validation messages, matched to .field__error */
.contact__form .wpcf7-not-valid-tip {
  color: #d98b7a;
  font-size: 11px;
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}
.contact__form .wpcf7-not-valid { border-bottom-color: #d98b7a !important; }

/* Response output, matched to .form__status */
.contact__form .wpcf7-response-output {
  margin: 0.5rem 0 0;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(212, 177, 106, 0.4);
  color: var(--gold);
  font-size: 13px;
  line-height: 1.6;
}
.contact__form .wpcf7 form.invalid .wpcf7-response-output,
.contact__form .wpcf7 form.unaccepted .wpcf7-response-output,
.contact__form .wpcf7 form.failed .wpcf7-response-output {
  border-color: rgba(217, 139, 122, 0.6);
  color: #d98b7a;
}

.contact__form .wpcf7-spinner { background-color: var(--gold); }

/* Fallback shown when CF7 is unavailable. */
.contact__fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.contact__fallback .btn { flex: 1 1 auto; justify-content: center; }
.contact__admin-note {
  flex: 1 1 100%;
  color: rgba(248, 246, 241, 0.35);
  font-size: 12px;
  line-height: 1.7;
  border-left: 2px solid rgba(212, 177, 106, 0.4);
  padding-left: 1rem;
  margin-top: 0.5rem;
}

.contact__map--embed { padding: 0; overflow: hidden; }
.contact__map--embed iframe { display: block; filter: grayscale(1) invert(0.92) contrast(0.85); }

/* ── Practice-area single: overview + services ─────────────── */
.entry__lede {
  font-size: 17px;
  line-height: 1.85;
  color: rgba(11, 11, 11, 0.78);
}

.practice-services {
  max-width: 68ch;
  margin: 3.5rem auto 0;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(11, 11, 11, 0.1);
}

.panel__label--dark { color: #8a6d2f; }

.practice-services__grid {
  display: grid;
  gap: 0 3rem;
}

.practice-services__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid rgba(11, 11, 11, 0.08);
}
.practice-services__item .icon {
  color: var(--gold);
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.practice-services__item span {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(11, 11, 11, 0.72);
}

@media (min-width: 768px) {
  .practice-services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Custom logo (Customize → Site Identity) ───────────────
   The bundled logo is a square PNG with a wide black margin, so `.brand`
   crops it back to the wordmark. An uploaded logo is already trimmed and
   normally proportioned, so it must opt out of that crop entirely —
   otherwise it is scaled to 461% and pushed off its own frame. */
.brand--custom {
  display: inline-flex;
  align-items: center;
  aspect-ratio: auto;
  overflow: visible;
  width: auto;
}
.brand--custom img,
.brand img.brand__custom {
  position: static;
  inset: auto;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: normal;
}

/* The bundled logo is pre-cropped, so 2.5rem suits it. An uploaded PNG usually
   carries transparent padding around the artwork, so the same box renders the
   wordmark far smaller — these give it more room, and both are adjustable in
   Customize → Site Identity without touching CSS. */
.nav__logo.brand--custom {
  height: var(--emini-logo-nav, 3.5rem);
  max-height: calc(var(--nav-h) - 1rem);
}

.footer__logo.brand--custom {
  height: var(--emini-logo-footer, 3rem);
}

@media (max-width: 640px) {
  .nav__logo.brand--custom { max-height: calc(var(--nav-h) - 1.5rem); }
}

/* ── Footer social row ─────────────────────────────────────
   The static build has a single LinkedIn icon; the theme can show
   LinkedIn, Facebook and Instagram, so they need a row with spacing. */
.footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
