/* ==========================================================================
   Reading templates: single articles, pages, legal, contact.
   Same tokens and type pairing as the Home Page design (Georgia + Arial).
   ========================================================================== */

/* ---------- Article header ---------- */

.article-hero {
  padding: 40px 0 30px;
}

.article-title {
  margin: 12px 0 20px;
  font: 700 clamp(34px, 4.6vw, 54px)/1.1 var(--serif);
  letter-spacing: -1.4px;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-meta);
  font-size: 13px;
}

.article-byline__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--black);
}

.article-byline__author a { color: var(--red); }
.article-byline__author a:hover { text-decoration: underline; }

.article-byline__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.article-byline__dates {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.article-byline__dates > span + span::before {
  content: "·";
  margin-right: 16px;
  color: #bbb;
}

.article-byline__method {
  font-weight: 700;
  color: var(--red);
}

.article-byline__method:hover { text-decoration: underline; }

.article-figure {
  margin: 0 auto 40px;
}

.article-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eee;
}

.article-figure figcaption {
  margin-top: 8px;
  color: var(--text-meta);
  font-size: 12px;
}

.article-layout { display: block; }

.article-layout.has-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  justify-content: center;
  gap: 60px;
}

.article-main {
  max-width: 760px;
  margin-inline: auto;
}

.article-sidebar .widget {
  margin-bottom: 30px;
  font-size: 14px;
}

.article-sidebar .widget-title {
  margin: 0 0 12px;
  font: 700 18px var(--serif);
}

/* ---------- Entry content typography ---------- */

.entry-content {
  color: var(--text);
  font-size: 17px;
  line-height: 1.85;
}

.entry-content > * { margin-block: 0 1.25em; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--black);
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.25;
  scroll-margin-top: calc(100px + var(--admin-bar));
}

.entry-content h2 {
  margin: 1.9em 0 .7em;
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -.5px;
}

.entry-content h3 {
  margin: 1.6em 0 .6em;
  font-size: clamp(21px, 2.3vw, 24px);
}

.entry-content h4 { margin: 1.4em 0 .5em; font-size: 19px; }

.entry-content a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.entry-content a:hover { color: var(--dark-red); }

.entry-content ul,
.entry-content ol { padding-left: 1.3em; }

.entry-content li { margin-bottom: .45em; }
.entry-content li::marker { color: var(--red); }

.entry-content blockquote {
  margin: 1.8em 0;
  padding: 6px 0 6px 24px;
  border-left: 3px solid var(--red);
  color: var(--black);
  font: italic 21px/1.6 var(--serif);
}

.entry-content blockquote cite {
  display: block;
  margin-top: 8px;
  color: var(--text-meta);
  font: normal 12px var(--sans);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.entry-content img { height: auto; }

.entry-content figure { margin: 1.8em 0; }

.entry-content figcaption,
.entry-content .wp-element-caption {
  margin-top: 8px;
  color: var(--text-meta);
  font-size: 13px;
}

.entry-content hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.entry-content code {
  padding: 2px 6px;
  background: var(--light);
  font-size: .9em;
}

.entry-content pre {
  overflow-x: auto;
  padding: 18px;
  background: #1b1b1b;
  color: #f2f2f2;
  font-size: 14px;
}

.entry-content pre code { padding: 0; background: none; }

.entry-content iframe,
.entry-content video { max-width: 100%; }

/* Leftover page-builder icons inside legal page text stay inline and small. */
.entry-content svg:not([width]) {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: .4em;
  vertical-align: -.12em;
  fill: var(--red);
}

/* Tables (wrapped in .infoz-table-scroll by the theme) */

.infoz-table-scroll,
.entry-content .wp-block-table {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.8em 0;
  -webkit-overflow-scrolling: touch;
}

.infoz-table-scroll:focus-visible { outline-offset: 2px; }

.entry-content table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}

.entry-content .wp-block-table table { margin: 0; }

.entry-content th,
.entry-content td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.entry-content thead th {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  font-weight: 700;
}

.entry-content tbody tr:nth-child(even) { background: #fafafa; }

/* Easy Table of Contents */

.entry-content #ez-toc-container,
.entry-content .ez-toc-v2_0 {
  width: 100% !important;
  margin: 1.6em 0 2em;
  padding: 20px 22px;
  background: var(--light) !important;
  border: 1px solid var(--border) !important;
  border-left: 3px solid var(--red) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.entry-content #ez-toc-container .ez-toc-title {
  font: 700 18px var(--serif) !important;
  color: var(--black) !important;
}

.entry-content #ez-toc-container ul { margin: 10px 0 0; padding-left: 0; }
.entry-content #ez-toc-container li { margin: 0; font-size: 15px; line-height: 1.7; }
.entry-content #ez-toc-container li::marker { content: none; }
.entry-content #ez-toc-container a { color: var(--black); text-decoration: none; }
.entry-content #ez-toc-container a:hover { color: var(--red); text-decoration: underline; }

/* ---------- Article footer ---------- */

.article-footer {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.article-footer__label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-meta);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.article-tags ul { margin-bottom: 26px; }

.share-links { margin-bottom: 34px; }

.share-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-links a,
.share-links button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--black);
  background: #fff;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: .2s ease;
}

.share-links a:hover,
.share-links button:hover,
.share-links button.is-done {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.share-links svg { width: 17px; height: 17px; fill: currentColor; }

.author-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 34px;
  padding: 26px;
  background: var(--light);
  border: 1px solid var(--border);
}

.author-card__avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

.author-card__name {
  margin: 4px 0 8px;
  font: 700 24px/1.2 var(--serif);
}

.author-card__name a:hover { color: var(--red); }

.author-card p {
  margin: 0;
  color: var(--grey);
  font-size: 15px;
  line-height: 1.8;
}

.post-nav .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.post-nav .nav-next { text-align: right; grid-column: 2; }

.post-nav a {
  display: block;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease;
}

.post-nav a:hover { border-color: var(--red); transform: translateY(-2px); }

.post-nav__label {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.post-nav__title {
  font: 700 16px/1.4 var(--serif);
}

.related {
  margin-top: 70px;
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
}

/* ---------- Page layout (pages, legal) ---------- */

.page-layout {
  padding-block: 50px 90px;
}

.page-layout.has-index {
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  justify-content: center;
  gap: 60px;
}

.page-article { max-width: 760px; margin-inline: auto; min-width: 0; }

.page-layout.has-index .page-article { margin-inline: 0; }

.page-figure { margin: 0 0 32px; }

.page-content > h2:first-child,
.page-content > h3:first-child { margin-top: 0; }

.page-index { position: relative; }

.page-index__box {
  position: sticky;
  top: calc(var(--header-height) + var(--admin-bar) + 24px);
  padding: 20px;
  background: var(--light);
  border-left: 3px solid var(--red);
}

.page-index summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  list-style: none;
}

.page-index summary::-webkit-details-marker { display: none; }

.page-index ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: idx;
}

.page-index li { margin: 0; }

.page-index li.level-3 { padding-left: 14px; }

.page-index a {
  display: block;
  padding: 6px 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.page-index a:hover { color: var(--red); }

/* ---------- Contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 50px;
  align-items: start;
  padding-block: 50px 90px;
}

.contact-info .page-content { font-size: 16px; }

.contact-social {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.contact-social .eyebrow { margin: 0 0 12px; }

.socials--pills a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  color: #333;
  background: #fff;
  border: 1px solid #e2e2e2;
  font-size: 13px;
  transition: .2s ease;
}

.socials--pills a:hover {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.contact-form-card {
  padding: clamp(22px, 3.5vw, 38px);
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  box-shadow: 0 25px 60px #0000000d;
}

.contact-form-card h2 {
  margin: 0 0 20px;
  font: 700 28px/1.2 var(--serif);
}

/* Contact Form 7 */

.wpcf7 form p { margin: 0 0 16px; }

.wpcf7 label {
  display: block;
  width: 100%;
  color: var(--black);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .5px;
}

.wpcf7 .wpcf7-form-control-wrap { display: block; margin-top: 6px; }

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--black);
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 0;
  font-size: 15px;
  font-weight: 400;
  -webkit-appearance: none;
  appearance: none;
}

.wpcf7 textarea { min-height: 150px; resize: vertical; }

.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: var(--red); }

.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
  min-height: 48px;
  padding: 13px 24px;
  color: #fff;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease;
}

.wpcf7 input[type="submit"]:hover { background: var(--dark-red); }

.wpcf7 .wpcf7-not-valid-tip { margin-top: 6px; color: #b00020; font-size: 12px; }
.wpcf7 form .wpcf7-response-output { margin: 16px 0 0; padding: 12px 14px; font-size: 13px; }

/* ---------- Comments (off by default) ---------- */

.comments-area { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border); }
.comments-title { font: 700 24px var(--serif); }
.comment-list { padding-left: 0; list-style: none; }
.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea { width: 100%; padding: 12px; border: 1px solid #d5d5d5; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .article-layout.has-sidebar { grid-template-columns: minmax(0, 1fr); }
  .article-sidebar { max-width: 760px; margin-inline: auto; width: 100%; }
}

@media (max-width: 960px) {
  .page-layout.has-index { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .page-index__box { position: static; }
  .page-layout.has-index .page-article { margin-inline: auto; }
  .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 34px; }
}

@media (max-width: 600px) {
  .article-hero { padding: 26px 0 22px; }
  .article-title { font-size: clamp(30px, 8.4vw, 38px); letter-spacing: -1px; }
  .article-byline { gap: 10px 16px; font-size: 12px; }
  .article-byline__dates > span + span::before { margin-right: 10px; }
  .article-byline__dates { gap: 4px 10px; }
  .article-figure { width: 100%; margin-bottom: 28px; }
  .entry-content { font-size: 17px; line-height: 1.8; }
  .entry-content blockquote { font-size: 19px; padding-left: 18px; }
  .author-card { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .post-nav .nav-links { grid-template-columns: minmax(0, 1fr); }
  .post-nav .nav-next { grid-column: auto; text-align: left; }
  .related { margin-top: 50px; padding: 44px 0 60px; }
  .page-layout { padding-block: 30px 60px; }
  .contact-layout { padding-block: 30px 60px; }
}
