/* ==========================================================================
   Projects — listing (/projects) and detail (/projects/<slug>)

   Reproduces the original .case-* / .tags-list design with a structured,
   readable ruleset. Everything is namespaced `pjt-` so it never collides
   with the legacy classes still used by studies.php / detail-products.php.

   Palette is driven by the site tokens declared on :root in style.css
   (--secondary-blue, --brand-color, --main-yellow, --main-text).
   ========================================================================== */

:root {
  --pjt-radius: 14px;
  --pjt-card-shadow: 0 6px 20px rgba(0, 0, 0, .06);
  --pjt-line: #31ffcb;                 /* the teal accent bar from .vr-line  */
  --pjt-ink: #0f4d47;
  --pjt-muted: #6b6b6b;
}

/* --------------------------------------------------------------------------
   Layout shell
   -------------------------------------------------------------------------- */
.pjt-page       { padding: 48px 0; }
.pjt-page h1.pjt-title { font-size: clamp(1.7rem, 3.6vw, 2.3rem); color: var(--pjt-ink); font-weight: 300; text-align: center; margin-bottom: 40px; }

.pjt-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 44px; align-items: start; }
.pjt-list-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px 48px; }

@media (max-width: 900px) {
  .pjt-detail-grid { grid-template-columns: 1fr; gap: 34px; }
}

/* --------------------------------------------------------------------------
   Listing card
   -------------------------------------------------------------------------- */
.pjt-card        { display: flex; flex-direction: column; }
.pjt-card-media  { position: relative; width: 100%; height: 250px; border-radius: 4px; overflow: hidden; }
.pjt-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pjt-card:hover .pjt-card-media img { transform: scale(1.05); }

/* date tag with the vertical accent line, hanging off the image */
.pjt-datemark    { position: absolute; bottom: -22px; left: 12px; display: flex; flex-direction: column; align-items: center; }
.pjt-datemark .bar  { width: 2px; height: 50px; background: var(--pjt-line); margin-bottom: 5px; }
.pjt-datemark .when { margin: 0; font-size: 14px; text-align: center; color: #333; }

.pjt-card-body   { padding-top: 34px; }
.pjt-card-body h2 { font-size: 1.25rem; color: #000; margin: 0 0 8px; }
.pjt-card-body h2 a { color: inherit; text-decoration: none; }
.pjt-card-body h2 a:hover { color: var(--secondary-blue); }
.pjt-card-body p { color: var(--pjt-muted); margin: 0 0 14px; line-height: 1.6; }

.pjt-more        { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 300; letter-spacing: 2px; text-transform: uppercase; color: #000; text-decoration: none; }
.pjt-more i      { transition: transform .3s ease-in-out; }
.pjt-more:hover  { color: var(--secondary-blue); }
.pjt-more:hover i { transform: translateX(10px); }

/* --------------------------------------------------------------------------
   Tags
   -------------------------------------------------------------------------- */
.pjt-tags        { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.pjt-tags a,
.pjt-tags li     { display: inline-block; background: var(--brand-color, var(--secondary-blue)); color: #fff; padding: 5px 12px; border-radius: 50px; font: 400 12px/1.4 Arial, sans-serif; text-decoration: none; transition: background-color .3s; }
.pjt-tags a:hover { background: var(--secondary-blue); }

/* --------------------------------------------------------------------------
   Detail — article
   -------------------------------------------------------------------------- */
.pjt-article     { min-width: 0; }
.pjt-crumbs      { font-size: .8rem; color: #9a9a9a; margin-bottom: 14px; }
.pjt-crumbs a    { color: var(--secondary-blue); text-decoration: none; }

.pjt-head        { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.pjt-head h1     { font-size: clamp(1.6rem, 3.6vw, 2.2rem); color: #1a1a1a; font-weight: 400; margin: 0; }
.pjt-head .date  { font-size: 14px; color: #8a8a8a; white-space: nowrap; }

.pjt-hero        { width: 100%; height: 350px; object-fit: cover; border-radius: var(--pjt-radius); margin-bottom: 24px; box-shadow: 0 14px 34px rgba(0, 0, 0, .12); }

.pjt-body        { color: #3f3f3f; font-size: 1.02rem; line-height: 1.75; }
.pjt-body p      { margin: 0 0 18px; }
.pjt-body h2     { color: var(--pjt-ink); font-weight: 400; font-size: 1.4rem; margin: 30px 0 12px; }
.pjt-body h3     { color: var(--pjt-ink); font-weight: 500; font-size: 1.15rem; margin: 24px 0 10px; }
.pjt-body ul, .pjt-body ol { margin: 0 0 18px; padding-left: 22px; }
.pjt-body li     { margin-bottom: 8px; }
.pjt-body img    { max-width: 100%; height: auto; border-radius: 10px; margin: 16px 0; }
.pjt-body a      { color: var(--secondary-blue); }

/* two-up image row, as on the current detail page */
.pjt-gallery     { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 22px 0 26px; }
.pjt-gallery a,
.pjt-gallery img { display: block; }
.pjt-gallery img { width: 100%; height: 250px; object-fit: cover; border-radius: 10px; }

/* prev / next / credit bar */
.pjt-nav         { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #f5f4f2; border-radius: var(--pjt-radius); padding: 22px 26px; margin-top: 30px; }
.pjt-nav a       { font-size: 12px; font-weight: 300; letter-spacing: 2px; text-transform: uppercase; color: #000; text-decoration: none; }
.pjt-nav a:hover { color: var(--secondary-blue); }
.pjt-nav a[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.pjt-nav .credit { color: #8a8a8a; font-size: .85rem; }

/* --------------------------------------------------------------------------
   Detail — sidebar (shared with the blog sidebar visual language)
   -------------------------------------------------------------------------- */
.pjt-sidebar         { position: sticky; top: 90px; }
.pjt-sidebar-block   { background: #fff; border: 1px solid #ececec; border-radius: var(--pjt-radius); padding: 20px; margin-bottom: 22px; box-shadow: var(--pjt-card-shadow); }
.pjt-sidebar-block h2 { font-size: 1.05rem; color: var(--main-text, var(--pjt-ink)); margin: 0 0 14px; }

.pjt-side-item       { display: flex; gap: 12px; align-items: center; text-decoration: none; color: #333; padding: 9px 0; border-top: 1px solid #f0f0f0; }
.pjt-side-item:first-of-type { border-top: none; }
.pjt-side-item img   { width: 50px; height: 50px; object-fit: cover; border-radius: 50%; flex: 0 0 50px; }
.pjt-side-item span  { font-size: .88rem; line-height: 1.3; }
.pjt-side-item small { display: block; font-size: 12px; color: #9a9a9a; }
.pjt-side-item:hover span { color: var(--secondary-blue); }

@media (max-width: 900px) {
  .pjt-sidebar { position: static; }
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.pjt-empty { padding: 60px 0; text-align: center; color: #8a8078; }
