/*
Theme Name: Pocket Trainer Blog
Theme URI: https://pocket-trainer.co/blog
Author: Pocket Trainer
Description: Blog theme for pocket-trainer.co, matching the design language of the main
             Next.js marketing site (Inter, --clr-primary #160fdf, #236fed footer, soft radii).
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pocket-trainer-blog
*/

/* ==========================================================================
   Design tokens — lifted verbatim from the live site's compiled :root block
   (https://pocket-trainer.co/_next/static/css/41158bd137995845.css)
   ========================================================================== */

:root {
  --font-primary: "Inter", Arial, Verdana, sans-serif, system-ui, -apple-system;

  /* Brand */
  --clr-primary: #160fdf;
  --color-blue-night: #030069;
  --color-blue-light: #0f0b9c;
  --color-blue-light-100: #160fdf;
  --clr-light-blue: #236fed;
  --clr-dark-purple: #060443;
  --clr-green: #34c759;
  --color-error: #f1122f;

  /* Neutrals */
  --clr-black: #000;
  --clr-black-100: #252525;
  --clr-white: #fff;
  --card-text-black: #202020;
  --border-black: #1e1e1e;
  --color-dark-gray-100: #111;
  --color-dark-gray-600: #6b6b6b;
  --color-gray-100: #b5b5b5;
  --color-gray-200: #d9d9d9;
  --color-gray-300: #dfdeeb;
  --color-gray-400: #e6e6e6;
  --color-gray-500: #e9e9e9;
  --color-gray-600: #ececec;
  --color-gray-700: #f6f6f6;
  --color-gray-medium: #8c8c8c;
  --clr-white-smoke: #f4f4f4;

  /* Type scale */
  --font-size-heading1: 55px;
  --font-size-heading2: 45px;
  --font-size-heading3: 35px;
  --font-size-heading4: 32px;
  --font-size-heading5: 22px;
  --font-size-heading6: 18px;
  --font-weight-headings: 500;
  --font-xs: 10px;
  --font-ms: 12px;
  --font-sm: 14px;
  --font-md: 16px;
  --font-rg: 18px;
  --font-sl: 22px;
  --font-lg: 24px;

  /* Radii + spacing */
  --radius-xl: 100px;
  --radius-lg: 64px;
  --radius-md: 40px;
  --radius-sm: 24px;
  --radius-xs: 18px;
  --space-xl: 100px;
  --space-lg: 65px;
  --space-md: 56px;
  --space-sm: 40px;
  --space-xs: 34px;

  --container-size: 1180px;
  --header-height: 92px;

  --link-default-color: var(--color-blue-light);
  --link-hovered-color: var(--color-blue-night);
}

@media (min-width: 1400px) {
  :root { --container-size: 1240px; }
}

/* The live site drops its heading scale one step below 1200px. Mirrored here. */
@media (max-width: 1199.98px) {
  :root {
    --font-size-heading1: 45px;
    --font-size-heading2: 36px;
    --font-size-heading3: 30px;
    --font-size-heading4: 28px;
  }
}

@media (max-width: 767.98px) {
  :root {
    --font-size-heading1: 34px;
    --font-size-heading2: 28px;
    --font-size-heading3: 24px;
    --font-size-heading4: 22px;
    --space-lg: 44px;
    --space-xl: 60px;
  }
}

/* ==========================================================================
   Reset / base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  /* The marketing site uses body weight 600 for UI chrome. Long-form reading
     needs 400/1.75 — see README.md "Deliberate deviations". */
  font-size: var(--font-md);
  font-weight: 400;
  line-height: 1.75;
  color: var(--card-text-black);
  background-color: var(--clr-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

a {
  color: var(--link-default-color);
  text-decoration: none;
  transition: color .35s;
}
a:hover, a:focus-visible { color: var(--link-hovered-color); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-headings);
  line-height: 1.15;
  color: var(--clr-black-100);
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--font-size-heading1); }
h2 { font-size: var(--font-size-heading2); }
h3 { font-size: var(--font-size-heading3); }
h4 { font-size: var(--font-size-heading4); }
h5 { font-size: var(--font-size-heading5); }
h6 { font-size: var(--font-size-heading6); }

p { margin: 0 0 1.25em; }

:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.pt-container {
  padding: 0 15px;
  max-width: var(--container-size);
  margin: auto;
  width: 100%;
}

.pt-narrow { max-width: 760px; }

.section-lg-py { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--clr-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-xs) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   Header — mirrors TFILandingPageHeader (sticky, 92px, logo left, nav right)
   ========================================================================== */

.pt-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-gray-600);
  transition: all .3s;
}

.pt-header__inner {
  min-height: calc(var(--header-height) + 12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.pt-header__brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.pt-header__brand img { width: 230px; height: auto; }

.pt-nav { display: flex; align-items: center; gap: 28px; }

.pt-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Scoped to `ul a` on purpose: the CTA .pt-btn is a sibling of the list and must
   keep its own display/colour/padding. A bare `.pt-nav a` would outrank it. */
.pt-nav ul a {
  display: inline-block;
  color: var(--clr-black);
  font-family: var(--font-primary);
  font-size: var(--font-md);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 1.122px;
  border-bottom: 2px solid transparent;
  padding: 4px 0;
  transition: all .35s;
}
.pt-nav ul a:hover,
.pt-nav ul a:focus-visible,
.pt-nav .current-menu-item > a,
.pt-nav .current_page_item > a,
.pt-nav .is-active > a {
  color: var(--color-blue-light);
  border-bottom-color: var(--color-blue-light);
}
.pt-nav .current-menu-item > a,
.pt-nav .current_page_item > a,
.pt-nav .is-active > a { font-weight: 700; }

.pt-header__badges { display: flex; align-items: center; gap: 10px; }
.pt-header__badges img { height: 38px; width: auto; }

.pt-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.pt-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--clr-black);
  border-radius: 2px;
  transition: transform .35s, opacity .35s;
}
.pt-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pt-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pt-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991.98px) {
  .pt-burger { display: flex; }
  .pt-header__inner { min-height: 72px; }
  .pt-header__brand img { width: 190px; }

  /* Full-screen slide-in panel, same behaviour as the marketing header */
  .pt-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 22px;
    background: var(--clr-white);
    z-index: 8;
    transform: translateX(-110%);
    transition: transform .5s ease 0s;
  }
  .pt-nav.is-open { transform: translateX(0); }
  .pt-nav ul { flex-direction: column; gap: 22px; }
  .pt-nav ul a { font-size: 20px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.pt-hero {
  background: linear-gradient(160deg, var(--clr-dark-purple) 0%, var(--color-blue-night) 45%, var(--clr-primary) 100%);
  color: var(--clr-white);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: var(--space-lg) 0;
  position: relative;
  overflow: hidden;
}

.pt-hero::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -160px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 111, 237, .55) 0%, rgba(35, 111, 237, 0) 68%);
  pointer-events: none;
}

.pt-hero > .pt-container { position: relative; z-index: 1; }

.pt-hero h1, .pt-hero h2 { color: var(--clr-white); margin-bottom: 16px; }
.pt-hero p { color: rgba(255, 255, 255, .82); font-size: var(--font-rg); max-width: 640px; margin-bottom: 0; }

.pt-eyebrow {
  display: inline-block;
  font-size: var(--font-sm);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 14px;
}

.pt-hero--compact { padding: var(--space-sm) 0; }

/* ==========================================================================
   Buttons + pills
   ========================================================================== */

.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;          /* never shrink below the label inside a flex nav */
  white-space: nowrap;
  gap: 8px;
  min-height: 48px;
  padding: 12px 30px;
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
  font-size: var(--font-md);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .3px;
  cursor: pointer;
  transition: all .35s;
}

.pt-btn--primary { background: var(--clr-primary); color: var(--clr-white); }
.pt-btn--primary:hover, .pt-btn--primary:focus-visible { background: var(--color-blue-night); color: var(--clr-white); }

.pt-btn--ghost { background: transparent; color: var(--clr-primary); border-color: var(--clr-primary); }
.pt-btn--ghost:hover, .pt-btn--ghost:focus-visible { background: var(--clr-primary); color: var(--clr-white); }

.pt-btn--onblue { background: var(--clr-white); color: var(--clr-primary); }
.pt-btn--onblue:hover, .pt-btn--onblue:focus-visible { background: var(--clr-dark-purple); color: var(--clr-white); }

.pt-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--radius-xl);
  background: var(--color-gray-700);
  color: var(--color-blue-light);
  font-size: var(--font-ms);
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  transition: all .35s;
}
a.pt-pill:hover, a.pt-pill:focus-visible { background: var(--clr-primary); color: var(--clr-white); }

/* Category filter row */
.pt-termbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: var(--space-sm); }
.pt-termbar .pt-pill.is-active { background: var(--clr-primary); color: var(--clr-white); }

/* ==========================================================================
   Post grid + cards
   ========================================================================== */

.pt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
@media (max-width: 991.98px) { .pt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 575.98px) { .pt-grid { grid-template-columns: 1fr; } }

.pt-card {
  display: flex;
  flex-direction: column;
  background: var(--clr-white);
  border: 1px solid var(--color-gray-600);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 100%;
  transition: transform .35s, box-shadow .35s, border-color .35s;
}
.pt-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(3, 0, 105, .12);
  border-color: var(--color-gray-300);
}

.pt-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--color-gray-700);
  overflow: hidden;
}
.pt-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pt-card:hover .pt-card__media img { transform: scale(1.04); }

.pt-card__body { padding: 24px; display: flex; flex-direction: column; flex: 1 1 auto; gap: 12px; }

/* Pills are flex children of a column container — keep them content-width */
.pt-card__body > .pt-pill,
.pt-feature__body > .pt-pill { align-self: flex-start; }

.pt-card__title { font-size: var(--font-sl); margin: 0; line-height: 1.25; }
.pt-card__title a { color: var(--clr-black-100); }
.pt-card__title a:hover, .pt-card__title a:focus-visible { color: var(--clr-primary); }

.pt-card__excerpt { margin: 0; color: var(--color-dark-gray-600); font-size: var(--font-sm); line-height: 1.65; }

.pt-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--font-ms);
  font-weight: 500;
  color: var(--color-gray-medium);
  letter-spacing: .4px;
}
.pt-meta a { color: var(--color-gray-medium); }
.pt-meta a:hover { color: var(--clr-primary); }
.pt-meta__sep { width: 4px; height: 4px; border-radius: 50%; background: var(--color-gray-200); }

.pt-card__foot { margin-top: auto; padding-top: 4px; }

.pt-readmore {
  font-size: var(--font-sm);
  font-weight: 600;
  letter-spacing: .4px;
  color: var(--clr-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pt-readmore::after { content: "→"; transition: transform .35s; }
.pt-readmore:hover::after { transform: translateX(4px); }

/* Featured (first) post on the index */
.pt-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  border: 1px solid var(--color-gray-600);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-sm);
  transition: box-shadow .35s;
}
.pt-feature:hover { box-shadow: 0 22px 50px rgba(3, 0, 105, .12); }
.pt-feature__media { min-height: 340px; background: var(--color-gray-700); }
.pt-feature__media img { width: 100%; height: 100%; object-fit: cover; }
.pt-feature__body { padding: var(--space-xs); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.pt-feature__body h2 { font-size: var(--font-size-heading3); margin: 0; }
.pt-feature__body h2 a { color: var(--clr-black-100); }
.pt-feature__body h2 a:hover { color: var(--clr-primary); }
@media (max-width: 767.98px) {
  .pt-feature { grid-template-columns: 1fr; border-radius: var(--radius-sm); }
  .pt-feature__media { min-height: 220px; }
  .pt-feature__body { padding: 24px; }
}

/* Fallback tile when a post has no featured image (cards and features alike).
   Declared after .pt-card__media img / .pt-feature__media img so that, at equal
   specificity, this wins and the logo mark is not stretched to cover. */
.pt-media--empty {
  background: linear-gradient(160deg, var(--clr-dark-purple), var(--clr-primary));
  display: flex;
  align-items: center;
  justify-content: center;
}
.pt-media--empty img {
  width: 56px;
  height: auto;
  object-fit: contain;
  opacity: .95;
}
.pt-card:hover .pt-media--empty img { transform: none; }

/* ==========================================================================
   Single post
   ========================================================================== */

.pt-article { padding-top: var(--space-sm); padding-bottom: var(--space-lg); }

.pt-article__header { margin-bottom: var(--space-sm); }
.pt-article__header h1 { font-size: var(--font-size-heading2); margin-bottom: 18px; }

.pt-article__thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}
.pt-article__thumb img { width: 100%; height: auto; }

.pt-prose { font-size: var(--font-rg); line-height: 1.8; color: var(--clr-black-100); }
.pt-prose > *:first-child { margin-top: 0; }
.pt-prose h2 { font-size: var(--font-size-heading4); margin-top: 1.6em; }
.pt-prose h3 { font-size: var(--font-size-heading5); margin-top: 1.5em; }
.pt-prose h4 { font-size: var(--font-rg); margin-top: 1.4em; }
.pt-prose ul, .pt-prose ol { padding-left: 1.35em; margin: 0 0 1.25em; }
.pt-prose li { margin-bottom: .5em; }
.pt-prose img, .pt-prose figure img { border-radius: var(--radius-xs); }
.pt-prose figure { margin: 2em 0; }
.pt-prose figcaption { font-size: var(--font-sm); color: var(--color-gray-medium); text-align: center; margin-top: 10px; }

.pt-prose blockquote {
  margin: 2em 0;
  padding: 24px 28px;
  border-left: 4px solid var(--clr-primary);
  background: var(--color-gray-700);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: var(--font-sl);
  font-weight: 500;
  line-height: 1.5;
  color: var(--clr-black-100);
}
.pt-prose blockquote p:last-child { margin-bottom: 0; }
.pt-prose blockquote cite { display: block; margin-top: 12px; font-size: var(--font-sm); font-weight: 400; font-style: normal; color: var(--color-gray-medium); }

.pt-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--color-gray-700);
  padding: 2px 6px;
  border-radius: 6px;
}
.pt-prose pre {
  background: var(--clr-dark-purple);
  color: #e4e4e4;
  padding: 22px;
  border-radius: var(--radius-xs);
  overflow-x: auto;
  font-size: var(--font-sm);
  line-height: 1.6;
}
.pt-prose pre code { background: transparent; padding: 0; color: inherit; }

.pt-prose table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: var(--font-sm); }
.pt-prose th, .pt-prose td { border: 1px solid var(--color-gray-400); padding: 12px 14px; text-align: left; }
.pt-prose th { background: var(--color-gray-700); font-weight: 600; }

.pt-prose hr { border: 0; border-top: 1px solid var(--color-gray-400); margin: 2.5em 0; }

/* WordPress core alignment + caption classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { width: 100%; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--font-sm); color: var(--color-gray-medium); text-align: center; }
.sticky .pt-card { border-color: var(--clr-primary); }
.gallery-caption {}
.bypostauthor {}
.wp-block-image figcaption { font-size: var(--font-sm); color: var(--color-gray-medium); }

/* Tags + share */
.pt-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-sm); }

.pt-postnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: var(--space-sm);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--color-gray-400);
}
@media (max-width: 575.98px) { .pt-postnav { grid-template-columns: 1fr; } }
.pt-postnav__item { display: flex; flex-direction: column; gap: 6px; }
.pt-postnav__item--next { text-align: right; }
.pt-postnav__label { font-size: var(--font-ms); text-transform: uppercase; letter-spacing: 1px; color: var(--color-gray-medium); }
.pt-postnav__item a { font-size: var(--font-md); font-weight: 500; color: var(--clr-black-100); }
.pt-postnav__item a:hover { color: var(--clr-primary); }

/* App CTA strip reused from the marketing site's tone */
.pt-appcta {
  background: linear-gradient(160deg, var(--clr-dark-purple), var(--clr-primary));
  color: var(--clr-white);
  border-radius: var(--radius-md);
  padding: var(--space-xs) var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: var(--space-lg);
}
.pt-appcta h3 { color: var(--clr-white); margin: 0 0 6px; font-size: var(--font-size-heading4); }
.pt-appcta p { color: rgba(255, 255, 255, .8); margin: 0; }
.pt-appcta__badges { display: flex; gap: 12px; flex-wrap: wrap; }
.pt-appcta__badges img { height: 46px; width: auto; }
.pt-appcta__badges .pt-appcta__badge {
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  transition: transform .35s;
}
.pt-appcta__badges .pt-appcta__badge:hover { transform: translateY(-3px); }

/* ==========================================================================
   Comments
   ========================================================================== */

.pt-comments { margin-top: var(--space-lg); padding-top: var(--space-sm); border-top: 1px solid var(--color-gray-400); }
.pt-comments h2 { font-size: var(--font-size-heading4); }
.pt-comments ol { list-style: none; margin: 0; padding: 0; }
.pt-comments .children { list-style: none; margin: 0; padding-left: 28px; }
.pt-comments .comment-body {
  padding: 20px 24px;
  border: 1px solid var(--color-gray-600);
  border-radius: var(--radius-xs);
  margin-bottom: 18px;
}
.pt-comments .comment-meta { font-size: var(--font-ms); color: var(--color-gray-medium); margin-bottom: 10px; }
.pt-comments .avatar { border-radius: 50%; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.pt-search__field {
  width: 100%;
  padding: 12px 18px;
  font-family: var(--font-primary);
  font-size: var(--font-md);
  color: var(--clr-black-100);
  background: var(--clr-white);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-xs);
  transition: border-color .35s, box-shadow .35s;
}
.comment-form input:focus,
.comment-form textarea:focus,
.pt-search__field:focus {
  outline: 0;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(22, 15, 223, .12);
}
.comment-form textarea { min-height: 150px; border-radius: var(--radius-xs); }
.comment-form p { margin-bottom: 16px; }
.comment-form label { display: block; font-size: var(--font-sm); font-weight: 600; margin-bottom: 6px; }
.comment-form .submit {
  min-height: 48px;
  padding: 12px 30px;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--clr-primary);
  color: #fff;
  font-family: var(--font-primary);
  font-size: var(--font-md);
  font-weight: 600;
  cursor: pointer;
  transition: background .35s;
}
.comment-form .submit:hover { background: var(--color-blue-night); }

/* ==========================================================================
   Search form
   ========================================================================== */

.pt-search { display: flex; gap: 10px; }
.pt-search__field { flex: 1 1 auto; }

/* ==========================================================================
   Sidebar
   ========================================================================== */

.pt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
@media (max-width: 991.98px) { .pt-layout { grid-template-columns: 1fr; gap: 40px; } }

/* No widgets configured -> single full-width column, no dead 320px gutter */
body.ptb-no-sidebar .pt-layout { grid-template-columns: minmax(0, 1fr); }

.pt-sidebar .widget {
  padding: 24px;
  border: 1px solid var(--color-gray-600);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
/* Block widgets (WP 5.8+) ignore register_sidebar's before_title/after_title and
   emit a bare <h2 class="wp-block-heading">, which would otherwise inherit the
   45px global h2. Style every heading level inside the sidebar, not just
   .widget-title, so classic and block widgets look identical. */
.pt-sidebar .widget-title,
.pt-sidebar h1, .pt-sidebar h2, .pt-sidebar h3,
.pt-sidebar .wp-block-heading {
  font-size: var(--font-rg);
  line-height: 1.3;
  margin: 0 0 14px;
}

.pt-sidebar ul { list-style: none; margin: 0; padding: 0; }
.pt-sidebar li { padding: 7px 0; border-bottom: 1px solid var(--color-gray-700); font-size: var(--font-sm); }
.pt-sidebar li:last-child { border-bottom: 0; }
.pt-sidebar a { color: var(--clr-black-100); }
.pt-sidebar a:hover { color: var(--clr-primary); }

/* The core search block ships its own markup; bring it onto the brand so it
   matches searchform.php. */
.wp-block-search__inside-wrapper { gap: 8px; }
.wp-block-search .wp-block-search__input {
  padding: 10px 16px;
  font-family: var(--font-primary);
  font-size: var(--font-sm);
  color: var(--clr-black-100);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-xs);
}
.wp-block-search .wp-block-search__input:focus {
  outline: 0;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(22, 15, 223, .12);
}
.wp-block-search .wp-block-search__button {
  margin-left: 8px;
  padding: 10px 22px;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--clr-primary);
  color: var(--clr-white);
  font-family: var(--font-primary);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .35s;
}
.wp-block-search .wp-block-search__button:hover { background: var(--color-blue-night); }

/* Core list/archive blocks inside widgets */
.pt-sidebar .wp-block-latest-posts,
.pt-sidebar .wp-block-archives,
.pt-sidebar .wp-block-categories,
.pt-sidebar .wp-block-latest-comments {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pt-sidebar .wp-block-latest-comments__comment { font-size: var(--font-sm); line-height: 1.6; }

/* ==========================================================================
   Pagination
   ========================================================================== */

.pt-pagination { margin-top: var(--space-lg); }
.pt-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pt-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-xl);
  color: var(--clr-black-100);
  font-size: var(--font-sm);
  font-weight: 500;
  transition: all .35s;
}
.pt-pagination .page-numbers:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.pt-pagination .page-numbers.current { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }
.pt-pagination .page-numbers.dots { border-color: transparent; }

/* ==========================================================================
   Empty state / 404
   ========================================================================== */

.pt-empty { text-align: center; padding: var(--space-lg) 0; }
.pt-empty h1 { font-size: var(--font-size-heading2); }
.pt-empty p { color: var(--color-dark-gray-600); max-width: 520px; margin-left: auto; margin-right: auto; }
.pt-empty .pt-search { max-width: 460px; margin: var(--space-xs) auto 0; }

/* ==========================================================================
   Footer — background #236fed, white 300-weight links with 1px dividers
   (matches PTPrimaryFooter on the live site)
   ========================================================================== */

.pt-footer {
  background-color: var(--clr-light-blue);
  color: var(--clr-white);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  margin-top: var(--space-xl);
  --vertical-divider-spacing: 20px;
}

.pt-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.pt-footer__brand img { width: 300px; height: auto; }

.pt-footer__links { display: flex; flex-wrap: wrap; gap: var(--vertical-divider-spacing); list-style: none; margin: 18px 0 0; padding: 0; }
.pt-footer__links li { position: relative; display: inline-flex; }
.pt-footer__links li::before {
  content: "";
  width: 1px;
  height: 20px;
  background-color: var(--clr-white);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: calc((var(--vertical-divider-spacing) / 2) * -1);
  opacity: .55;
}
.pt-footer__links li:last-child::before { display: none; }
.pt-footer__links a { font-size: var(--font-md); color: var(--clr-white); font-weight: 300; }
.pt-footer__links a:hover, .pt-footer__links a:focus-visible { color: var(--clr-white); text-decoration: underline; }

.pt-footer__badges { display: flex; gap: 12px; flex-wrap: wrap; }
.pt-footer__badge {
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  transition: transform .35s;
}
.pt-footer__badge:hover { transform: translateY(-3px); }
.pt-footer__badge img { height: 42px; width: auto; }

.pt-footer__bottom {
  margin-top: var(--space-xs);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: var(--font-sm);
  font-weight: 300;
  color: rgba(255, 255, 255, .9);
}
.pt-footer__bottom a { color: var(--clr-white); }

@media (max-width: 767.98px) {
  .pt-footer__brand img { width: 240px; }
  .pt-footer__top { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
