/* Keystone Pro theme: layout base for theme-rendered sections + article styling.
   The brand design itself is in keystone.css (loaded by the plugin, or by the theme as a fallback). */

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
body.kpt { margin: 0; background: var(--kp-ink, #000b1f); }
body.kpt *, body.kpt *::before, body.kpt *::after { box-sizing: border-box; }
body.kpt img { max-width: 100%; height: auto; }

.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;
}
.kpt-skip:focus {
  clip: auto; clip-path: none; height: auto; width: auto; margin: 0; z-index: 100000; left: 12px; top: 12px;
  padding: 12px 18px; border-radius: 999px; background: #fff; color: #000b1f; font-weight: 700; text-decoration: none;
}

/* ---------- container base (what Elementor normally provides) ---------- */
.kpt-chrome .e-con, .e-con.kpt-chrome {
  --display: flex; --flex-direction: column; --flex-wrap: nowrap; --justify-content: normal; --align-items: normal;
  --row-gap: 20px; --column-gap: 20px; --width: 100%;
  display: var(--display); flex-direction: var(--flex-direction); flex-wrap: var(--flex-wrap);
  justify-content: var(--justify-content); align-items: var(--align-items);
  gap: var(--row-gap) var(--column-gap); width: var(--width); min-width: 0; position: relative;
}
.kpt-chrome .elementor-element { position: relative; }
.kpt-chrome .e-con > .elementor-element { max-width: 100%; }
.kpt-chrome .elementor-heading-title { margin: 0; padding: 0; line-height: 1; }
.kpt-chrome .elementor-button {
  display: inline-block; line-height: 1; text-align: center; text-decoration: none; cursor: pointer;
  font-family: var(--kp-ui); transition: all .3s;
}
.kpt-chrome p { margin: 0 0 .85em; }
.kpt-chrome p:last-child { margin-bottom: 0; }
.kpt-chrome .kp-burger .elementor-button { display: block; }

/* ---------- article content ---------- */
body .kp-content {
  width: 100%; max-width: 760px; margin: 0 auto; color: var(--kp-text);
  font-family: var(--kp-ui); font-size: 18px; line-height: 1.75;
}
body.elementor-page .kp-content { max-width: none; font-size: inherit; line-height: inherit; }
body .kp-content > * { margin-top: 0; margin-bottom: 0; }
body .kp-content > * + * { margin-top: 1.15em; }
body .kp-content p { margin: 0; }
body .kp-content > * + p { margin-top: 1.15em; }
body .kp-content h2, body .kp-content h3, body .kp-content h4 {
  font-family: var(--kp-display); font-weight: 600; color: var(--kp-text); letter-spacing: -.02em; line-height: 1.12;
}
body .kp-content h2 { font-size: clamp(28px, 3vw, 40px); margin-top: 1.7em; }
body .kp-content h3 { font-size: clamp(22px, 2.2vw, 28px); margin-top: 1.5em; }
body .kp-content h4 { font-size: 20px; margin-top: 1.4em; }
body .kp-content a { color: var(--kp-green-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body .kp-content a:hover { color: var(--kp-navy); }
body .kp-content ul, body .kp-content ol { padding-left: 1.3em; }
body .kp-content li + li { margin-top: .45em; }
body .kp-content li::marker { color: var(--kp-green-deep); }
body .kp-content strong { color: var(--kp-text); font-weight: 700; }
body .kp-content blockquote {
  margin-left: 0; margin-right: 0; padding: 6px 0 6px 24px; border-left: 3px solid var(--kp-green);
  font-family: var(--kp-display); font-size: 1.25em; line-height: 1.45; color: var(--kp-text);
}
body .kp-content img, body .kp-content .wp-block-image img { border-radius: 20px; }
body .kp-content figure { margin-left: 0; margin-right: 0; }
body .kp-content figcaption { font-size: 14px; color: var(--kp-muted); margin-top: 10px; text-align: center; }
body .kp-content hr { border: 0; height: 1px; background: var(--kp-line); margin: 2.4em 0; }
body .kp-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
body .kp-content th, body .kp-content td { padding: 12px 14px; border-bottom: 1px solid var(--kp-line); text-align: left; }
body .kp-content code { background: var(--kp-paper); border-radius: 6px; padding: 2px 6px; font-size: .9em; }
body .kp-content .alignwide { width: min(1100px, 100vw - 40px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
body .kp-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); border-radius: 0; }
body .kp-content__img { display: block; width: 100%; border-radius: 28px; margin: 0 0 40px; box-shadow: var(--kp-shadow); }
body .kp-content .wp-block-button__link, body .kp-content .button {
  display: inline-block; padding: 16px 26px; border-radius: 999px; background: var(--kp-grad-btn); color: #021204; font-weight: 700; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 12px 30px -12px rgba(61, 220, 31, .75);
}

/* search form */
body .kp-content .search-form { display: flex; gap: 10px; margin-top: 24px; }
body .kp-content .search-field {
  flex: 1; font: inherit; font-size: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid #d6dfea; background: var(--kp-paper);
}
body .kp-content .search-submit {
  font: inherit; font-weight: 700; padding: 14px 22px; border-radius: 999px; border: 0; background: var(--kp-ink); color: #fff; cursor: pointer;
}

/* ---------- blog cards ---------- */
body .e-con.kpt-postcard { min-height: 0; }
body .kpt-postcard__img { display: block; margin: calc(-1 * clamp(26px, 2.6vw, 36px)) calc(-1 * clamp(26px, 2.6vw, 36px)) 8px; aspect-ratio: 16 / 10; overflow: hidden; }
body .kpt-postcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--kp-ease); }
body .kpt-postcard:hover .kpt-postcard__img img { transform: scale(1.04); }
body .kpt-postcard .kp-h3 a { text-decoration: none; color: var(--kp-text); }
body .kpt-postcard .kp-body p { margin: 0; }

/* ---------- pagination + post nav ---------- */
body .kpt-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
body .kpt-pagination .page-numbers {
  min-width: 48px; height: 48px; padding: 0 16px; display: inline-grid; place-items: center; border-radius: 999px;
  background: var(--kp-white); border: 1px solid var(--kp-line); color: var(--kp-text); font-weight: 700; text-decoration: none;
}
body .kpt-pagination .page-numbers.current { background: var(--kp-ink); color: #fff; border-color: var(--kp-ink); }
body .kpt-postnav { max-width: 760px; width: 100%; margin: 56px auto 0; padding-top: 28px; border-top: 1px solid var(--kp-line); display: flex; justify-content: space-between; gap: 24px; }
body .kpt-postnav a { color: var(--kp-text); font-weight: 700; text-decoration: none; }
body .kpt-postnav a:hover { color: var(--kp-green-deep); }

/* WordPress admin bar */
body.admin-bar .e-con.kp-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .e-con.kp-header { top: 46px; } }
