/*
 * Blog + Portfolio archive and single pages.
 * Loaded only on those pages (see inc/blog-portfolio.php) and scoped to .bp-page.
 */

.bp-page {
  --bp-heading: #0a2240;
  --bp-text: #607080;
  --bp-border: #e4e9f0;
  --bp-soft: #f3f6fa;
  --bp-radius: 14px;
  --bp-shadow: 0 6px 24px rgba(10, 34, 64, .07);
  --bp-shadow-hover: 0 14px 34px rgba(10, 34, 64, .13);
  --bp-font-body: "Poppins", Arial, sans-serif;
  --bp-font-link: "Jost", Arial, sans-serif;

  padding: 64px 0 80px;
  font-family: var(--bp-font-body);
  color: var(--bp-text);
}

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

.bp-page .bp-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.bp-page .bp-container--narrow { max-width: 860px; }

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

/* Archive header */
.bp-page .bp-archive__header { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.bp-page .bp-archive__title { font-family: var(--bp-font-body); font-weight: 600; font-size: clamp(28px, 2.2vw + 18px, 40px); line-height: 1.25; color: var(--bp-heading); margin: 0 0 12px; }
.bp-page .bp-archive__desc,
.bp-page .bp-archive__desc p { font-size: 16px; line-height: 1.7; color: var(--bp-text); margin: 0; }

/* Grid */
.bp-page .bp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
@media (max-width: 991px) { .bp-page .bp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 600px) { .bp-page .bp-grid { grid-template-columns: 1fr; } }

/* Card */
.bp-page .bp-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--bp-border); border-radius: var(--bp-radius);
  overflow: hidden; box-shadow: var(--bp-shadow); transition: transform .25s ease, box-shadow .25s ease; }
.bp-page .bp-card:hover { transform: translateY(-4px); box-shadow: var(--bp-shadow-hover); }
.bp-page .bp-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bp-soft); }
.bp-page .bp-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.bp-page .bp-card:hover .bp-card__media img { transform: scale(1.05); }
.bp-page .bp-card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #e9eef6, #d7e0ec); }
.bp-page .bp-card__body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.bp-page .bp-card__meta { font-size: 14px; color: var(--bp-text); margin: 0 0 8px; }

/* Title: Poppins 20px #0a2240 */
.bp-page .bp-card__title { font-family: var(--bp-font-body); font-size: 20px; font-weight: 600; line-height: 1.4; color: var(--bp-heading); margin: 0 0 10px; }
.bp-page .bp-card__title a { color: var(--bp-heading); text-decoration: none; }
.bp-page .bp-card__title a:hover,
.bp-page .bp-card__title a:focus { text-decoration: underline; text-underline-offset: 3px; }

/* Text: Poppins 16px #607080 */
.bp-page .bp-card__text { font-family: var(--bp-font-body); font-size: 16px; font-weight: 400; line-height: 1.65; color: var(--bp-text); margin: 0 0 18px; }

/* Read more: Jost 16px #0a2240 */
.bp-page .bp-card__more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--bp-font-link); font-size: 16px; font-weight: 500; color: var(--bp-heading); text-decoration: none; }
.bp-page .bp-card__arrow { transition: transform .2s ease; }
.bp-page .bp-card__more:hover .bp-card__arrow,
.bp-page .bp-card__more:focus .bp-card__arrow { transform: translateX(4px); }
.bp-page .bp-card__more:hover,
.bp-page .bp-card__more:focus { text-decoration: underline; text-underline-offset: 3px; }

/* Focus */
.bp-page a:focus-visible { outline: 2px solid var(--bp-heading); outline-offset: 3px; border-radius: 4px; }

/* Pagination */
.bp-page .bp-pagination { margin-top: 56px; }
.bp-page .bp-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bp-page .bp-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid var(--bp-border); border-radius: 10px; background: #fff; font-family: var(--bp-font-link); font-size: 16px; color: var(--bp-heading);
  text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.bp-page .bp-pagination a.page-numbers:hover,
.bp-page .bp-pagination a.page-numbers:focus { border-color: var(--bp-heading); }
.bp-page .bp-pagination .page-numbers.current { background: var(--bp-heading); border-color: var(--bp-heading); color: #fff; }
.bp-page .bp-pagination .page-numbers.dots { border: 0; background: none; min-width: auto; }

.bp-page .bp-empty { text-align: center; font-size: 16px; }

/* Single */
.bp-page .bp-entry__header { text-align: center; margin-bottom: 32px; }
.bp-page .bp-entry__meta { font-size: 14px; color: var(--bp-text); margin: 0 0 10px; }
.bp-page .bp-entry__meta a { color: var(--bp-heading); font-family: var(--bp-font-link); text-decoration: none; }
.bp-page .bp-entry__title { font-family: var(--bp-font-body); font-weight: 600; font-size: clamp(28px, 2.4vw + 16px, 42px); line-height: 1.25; color: var(--bp-heading); margin: 0; }
.bp-page .bp-entry__visit { margin: 20px 0 0; }
.bp-page .bp-button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 10px; background: var(--bp-heading);
  color: #fff; font-family: var(--bp-font-link); font-size: 16px; font-weight: 500; text-decoration: none; transition: opacity .2s; }
.bp-page .bp-button:hover,
.bp-page .bp-button:focus { opacity: .88; color: #fff; }
.bp-page .bp-entry__media { margin: 0 0 36px; border-radius: var(--bp-radius); overflow: hidden; box-shadow: var(--bp-shadow); }
.bp-page .bp-entry__media img { display: block; width: 100%; height: auto; }

.bp-page .bp-entry__content { font-size: 16px; line-height: 1.8; color: var(--bp-text); }
.bp-page .bp-entry__content h2,
.bp-page .bp-entry__content h3,
.bp-page .bp-entry__content h4 { font-family: var(--bp-font-body); color: var(--bp-heading); line-height: 1.35; margin: 1.6em 0 .6em; }
.bp-page .bp-entry__content h2 { font-size: 26px; }
.bp-page .bp-entry__content h3 { font-size: 22px; }
.bp-page .bp-entry__content h4 { font-size: 20px; }
.bp-page .bp-entry__content a { color: var(--bp-heading); text-underline-offset: 3px; }
.bp-page .bp-entry__content img { max-width: 100%; height: auto; border-radius: 10px; }
.bp-page .bp-entry__content blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--bp-heading); color: var(--bp-heading); font-style: italic; }

.bp-page .bp-entry__tags { margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bp-page .bp-entry__tags a { padding: 6px 14px; border-radius: 999px; background: var(--bp-soft); color: var(--bp-heading); font-family: var(--bp-font-link); font-size: 14px; text-decoration: none; }

/* Previous / next */
.bp-page .bp-post-nav { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--bp-border); }
.bp-page .bp-post-nav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bp-page .bp-post-nav .nav-next { text-align: right; grid-column: 2; }
.bp-page .bp-post-nav a { display: block; text-decoration: none; }
.bp-page .bp-post-nav__label { display: block; font-family: var(--bp-font-link); font-size: 14px; color: var(--bp-text); margin-bottom: 4px; }
.bp-page .bp-post-nav__title { display: block; font-family: var(--bp-font-body); font-size: 18px; font-weight: 600; color: var(--bp-heading); line-height: 1.4; }
@media (max-width: 600px) {
  .bp-page { padding: 40px 0 56px; }
  .bp-page .bp-post-nav .nav-links { grid-template-columns: 1fr; }
  .bp-page .bp-post-nav .nav-next { grid-column: 1; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .bp-page *, .bp-page *::before, .bp-page *::after { transition: none !important; }
}

/* ---------- Portfolio archive: gallery layout ---------- */
.bp-page .bp-grid--gallery { gap: 28px; }
.bp-page .bp-work { margin: 0; }
.bp-page .bp-work__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--bp-radius);
  background: var(--bp-soft); border: 1px solid var(--bp-border); box-shadow: var(--bp-shadow); cursor: zoom-in; transition: box-shadow .3s ease; }
/* Full-page screenshot: show the top of the page, scroll to the bottom on hover */
.bp-page .bp-work__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0;
  transition: object-position 6s ease-in-out; }
.bp-page a.bp-work__media:hover img,
.bp-page a.bp-work__media:focus-visible img { object-position: 50% 100%; transition-duration: 8s; }
.bp-page a.bp-work__media:hover,
.bp-page a.bp-work__media:focus-visible { box-shadow: var(--bp-shadow-hover); }
/* Small "open full screen" badge, top right */
.bp-page .bp-work__overlay { position: absolute; top: 14px; right: 14px; opacity: 0; transition: opacity .3s ease; }
.bp-page .bp-work__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff;
  color: var(--bp-heading); box-shadow: 0 4px 14px rgba(10, 34, 64, .25); }
.bp-page a.bp-work__media:hover .bp-work__overlay,
.bp-page a.bp-work__media:focus-visible .bp-work__overlay { opacity: 1; }

/* Website URL: Jost 16px #0a2240 */
.bp-page .bp-work__caption { margin: 14px 4px 0; }
.bp-page .bp-work__url { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-family: var(--bp-font-link); font-size: 16px;
  font-weight: 500; color: var(--bp-heading); text-decoration: none; overflow-wrap: anywhere; }
.bp-page .bp-work__url:hover,
.bp-page .bp-work__url:focus { text-decoration: underline; text-underline-offset: 3px; }

@media (hover: none) {
  .bp-page .bp-work__overlay { display: none; }
}

/* ---------- Lightbox (full screen) ---------- */
html.bp-lb-open { overflow: hidden; }
.bp-lb { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(6, 16, 32, .96); color: #fff; font-family: "Poppins", Arial, sans-serif; overflow: hidden; }
.bp-lb::backdrop { background: rgba(6, 16, 32, .96); }
.bp-lb[open] { display: flex; flex-direction: column; animation: bp-lb-in .25s ease; }
@keyframes bp-lb-in { from { opacity: 0; } to { opacity: 1; } }
/* Scrollable stage: full-page screenshots are shown at readable width; scroll to see the whole page */
.bp-lb__stage { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex;
  align-items: flex-start; justify-content: center; padding: 64px 72px 12px; }
.bp-lb__img { display: block; width: auto; max-width: min(100%, 1280px); height: auto; margin: auto; border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5); transition: opacity .2s ease; }
.bp-lb.is-loading .bp-lb__img { opacity: .25; }
.bp-lb__spinner { position: fixed; top: 50%; left: 50%; margin: -22px 0 0 -22px; width: 44px; height: 44px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff;
  border-radius: 50%; animation: bp-lb-spin .8s linear infinite; display: none; }
.bp-lb.is-loading .bp-lb__spinner { display: block; }
@keyframes bp-lb-spin { to { transform: rotate(360deg); } }
.bp-lb__bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; padding: 12px 20px 22px; text-align: center; }
.bp-lb__caption { margin: 0; font-size: 18px; font-weight: 600; color: #fff; }
.bp-lb__visit { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 999px; background: #fff; color: #0a2240;
  font-family: "Jost", Arial, sans-serif; font-size: 16px; font-weight: 500; text-decoration: none; }
.bp-lb__visit:hover, .bp-lb__visit:focus { background: #e8eef7; color: #0a2240; }
.bp-lb__visit[hidden] { display: none; }
.bp-lb__count { font-size: 14px; color: rgba(255, 255, 255, .7); }
.bp-lb__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.bp-lb__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 32px; line-height: 1; cursor: pointer; transition: background .2s ease; }
.bp-lb__btn:hover, .bp-lb__btn:focus-visible { background: rgba(255, 255, 255, .28); }
.bp-lb__btn:focus-visible, .bp-lb__visit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.bp-lb__btn[hidden] { display: none; }
.bp-lb__close { top: 14px; right: 14px; }
.bp-lb__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.bp-lb__next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .bp-lb__stage { padding: 60px 8px 8px; }
  .bp-lb__prev, .bp-lb__next { top: auto; bottom: 18px; transform: none; width: 44px; height: 44px; }
  .bp-lb__bar { padding-bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-lb[open], .bp-lb__spinner { animation: none; }
}
