/* body ul {
  margin: 0;
  padding: 0;
}
body ul li {
  list-style: none;
} */
body a {
  text-decoration: none;
  color: var(--color-ink);
}
body p {
  margin: 0;
}
.container {
  max-width: 1464px !important;
  margin: 0 auto;
}
.relative {
  position: relative;
}
.overflow-hiden {
  overflow: hidden;
}

/* ── Post Builder search form ─────────────── */
/* Make the input fill its wrapper consistently across browsers.
   Without an explicit width the browser uses the intrinsic text-input
   size (~20 chars), which renders at different widths per browser/font. */
.pb-search-wrap {
  position: relative;
  width: 100%;
}
.pb-search-input {
  width: 100%;
  box-sizing: border-box;
}
/* Match the height of .pb-gc-select-trigger (40px content + 2px top/bottom
   border = 44px). Extra classes here outrank the base
   `form .field input[type="text"]` rule, and border-box makes the total
   box equal 44px. */
.field .pb-search-wrap .pb-search-input {
  height: 44px;
  line-height: normal;
}
.pb-search-clear {
  position: absolute;
  right: 24px;
  bottom: 5px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  color: var(--color-primary);
  cursor: pointer;
  padding: 0;
  display: none;
  transition: color 0.2s ease;
}
.pb-search-clear--visible {
  display: block;
}
.pb-search-clear--visible::after {
  display: none !important;
}
.pb-search-clear:hover {
  color: var(--color-ink);
}

/* ── Loading spinner ──────────────────────── */
.pb-loading {
  display: none;
  justify-content: center;
  align-items: center;
  height: 64px;
  margin-bottom: 16px;
}
.pb-loading--active {
  display: flex;
}
.pb-loading--active::after {
  content: "";
  width: 44px;
  height: 44px;
  border: 3px solid #e4e4e4;
  border-top-color: var(--color-0095DA);
  border-radius: 50%;
  animation: pb-spin 0.75s linear infinite;
}
@keyframes pb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Posts grid ───────────────────────────── */
.pb-posts-grid .list .card h4.text {
  max-height: 56px;
  text-wrap: nowrap;
  white-space: normal;
}
.postbuilder-page .card .front div {
  padding: 0;
}
.postbuilder-page .card .back p {
  font-size: 14px;
  height: 122px;
}
.postbuilder-page .card .front .card-text {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.pb-posts-grid .list .card .card-imgContainer {
  aspect-ratio: 308 / 190;
  overflow: hidden;
}
.pb-posts-grid .list .card .card-imgContainer img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
@media (max-width: 1024px) {
  .pb-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}
@media (max-width: 560px) {
  .pb-posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── Post card ────────────────────────────── */
/* No posts message */
.pb-no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 0;
  color: #888;
  font-size: 16px;
}

/* ── Pagination ───────────────────────────── */
.pb-pagination {
  margin-top: 52px;
}
.pb-pagination-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px;
}
.pb-page-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: none;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  height: 44px;
  min-width: 34px;
  padding: 0;
  margin: 0;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
  border: none;
  cursor: pointer;
}
/* Current page is marked by the rule under it, not by a filled shape. */
.pb-page-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 3px;
  background-color: var(--color-primary);
}
.pb-page-btn:hover {
  color: var(--color-teal-deep);
}
.pb-page-btn.disabled,
.pb-page-btn.disabled:hover {
  color: var(--color-primary);
  opacity: 0.3;
  cursor: unset;
}
/* Prev / next chevrons, drawn from two borders so they take the text colour. */
.pb-prev::before,
.pb-next::before {
  content: "";
  width: 13px;
  height: 13px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
}
.pb-prev::before {
  transform: rotate(45deg);
  margin-left: 4px;
}
.pb-next::before {
  transform: rotate(-135deg);
  margin-right: 4px;
}
.pb-page-ellipsis {
  color: var(--color-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 44px;
  user-select: none;
}
@media (max-width: 480px) {
  .pb-pagination-inner {
    gap: 14px;
  }
  .pb-page-btn {
    min-width: 26px;
    height: 38px;
    font-size: 20px;
  }
  .pb-page-ellipsis {
    font-size: 20px;
    line-height: 38px;
  }
  .pb-prev::before,
  .pb-next::before {
    width: 11px;
    height: 11px;
  }
  .pb-filter-tabs {
    gap: 8px;
  }
  .pb-tab {
    font-size: 13px;
    padding: 8px 16px;
  }
  footer ul {
    margin-bottom: 15px;
  }
}

/* ---- Inline video player ---- */
.gallery-holder .container-img.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-black);
  cursor: pointer;
}
.gallery-holder .container-img.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-holder .container-img.playing iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Card video play icon (posts loop) ---- */
.image-container {
  position: relative;
}
.card-video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 50%;
  pointer-events: none;
  transition: background 0.2s;
}
.card-video-play-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 17px;
  border-color: transparent transparent transparent var(--color-white);
}
.card:hover .card-video-play-icon {
  background: rgba(0, 0, 0, 0.8);
}

/* ── Global category custom selects ── */
.pb-gc-filter {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}
.timeline-page .pb-gc-filter {
  min-width: 220px;
  margin-top: 0;
}
.pb-gc-holder {
  position: relative;
}

/* Trigger — pill button matching existing theme style */
.pb-gc-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-primary);
  text-transform: uppercase;
  font-size: 14px;
  border: 2px solid var(--color-primary);
  /* border-radius: 21px; */
  background-color: transparent;
  padding: 0 20px;
  height: 40px;
  line-height: 30px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  min-width: 90px;
}
.pb-gc-select-trigger.is-open {
  /* border-radius: 20px 20px 0 0; */
  border-bottom: none;
}
.timeline-page .pb-gc-select-trigger {
  border: 2px solid transparent;
}
.timeline-page .pb-gc-select-trigger.is-open {
  border: 2px solid var(--color-primary);
  border-bottom: none;
  background: var(--color-white);
}
.pb-gc-select-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.pb-gc-select-arrow {
  content: "";
  -webkit-mask-image: url(../images/chew-down.svg);
  mask-image: url(../images/chew-down.svg);
  mask-size: contain;
  mask-repeat: no-repeat;
  height: 18px;
  width: 18px;
  background: var(--color-primary);
  top: 0;
  position: relative;
  -webkit-transition: -webkit-transform 0.2s ease-in-out;
  -moz-transition: -moz-transform 0.2s ease-in-out;
  -ms-transition: -ms-transform 0.2s ease-in-out;
  -o-transition: -o-transform 0.2s ease-in-out;
  transition: transform 0.2s ease-in-out;
}
.pb-gc-select-trigger.is-open .pb-gc-select-arrow {
  -webkit-transform: rotatex(1800deg);
  -moz-transform: rotatex(180deg);
  -ms-transform: rotatex(180deg);
  -o-transform: rotatex(180deg);
  transform: rotatex(180deg);
}

/* Dropdown panel */
.pb-gc-children-row {
  position: absolute;
  top: 95%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 2px solid var(--color-primary);
  border-top: none;
  /* border-radius: 0 0 20px 20px; */
  z-index: 60;
  overflow: hidden;
}
.pb-gc-children-row-inner {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 20px;
}
.pb-gc-children-row-inner:last-child {
  max-height: 230px;
}
.pb-gc-children-row[hidden] {
  display: none;
}

/* Flip above the trigger when that is where the room is. .drop-up is put on the
   holder by custom.js, which also caps the scrolling list so the panel stops at
   the footer's top edge instead of disappearing behind it — the sidebar is
   position:fixed and the footer (position:absolute, z-index 1) rises over it at
   the bottom of a listing. The joined edge swaps ends with the panel. */
.pb-gc-holder.drop-up .pb-gc-children-row {
  top: auto;
  bottom: 95%;
  border-top: 2px solid var(--color-primary);
  border-bottom: none;
}
.pb-gc-holder.drop-up .pb-gc-select-trigger.is-open {
  border-top: none;
  border-bottom: 2px solid var(--color-primary);
}

/* Options inside dropdown */
.pb-gc-child-tab {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--color-gray-darker);
  color: #292929;
  text-transform: uppercase;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s;
}
.pb-gc-child-tab:last-child {
  border-bottom: none;
}
.pb-gc-child-tab:hover {
  color: var(--color-primary);
}
.pb-gc-child-tab.active {
  color: var(--color-primary);
}

/* Reset option (parent name at top) */
.pb-gc-reset-opt {
  color: var(--color-primary);
  border-top: 1px solid var(--color-gray-darker);
}
.pb-gc-reset-opt:hover {
  color: var(--color-black);
}

/* "Išvalyti" — puts every dropdown back to its default (see
   parts/common/gc-filter.php). Deliberately a plain text button rather than a
   fourth pill: it acts on the whole filter row, so it must not read as one more
   option to pick. Hidden by the pb_gc_hide_reset / lk_gc_hide_reset toggle. */
.pb-gc-clear-all {
  align-self: flex-start;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s;
}
.pb-gc-clear-all:hover,
.pb-gc-clear-all:focus-visible {
  color: var(--color-black);
}
/* Spelled out rather than left to the UA sheet, the same way
   .pb-gc-children-row[hidden] is: the button is toggled on and off constantly
   as filters change, and a display rule elsewhere winning would strand it. */
.pb-gc-clear-all[hidden] {
  display: none;
}
/* ---- Gallery lightbox zoom icon ---- */
.gallery-holder .container-img {
  position: relative;
  cursor: pointer;
}
.gallery-holder .lightbox-zoom-icon,
.route-point .image-gallery a .container-img .lightbox-zoom-icon {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.52);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  pointer-events: none;
  opacity: 1;
  transition:
    background 0.2s,
    transform 0.2s;
}
.gallery-holder .lightbox-zoom-icon {
  display: none;
}
.gallery-holder a:hover .lightbox-zoom-icon {
  background: rgba(0, 0, 0, 0.75);
  transform: scale(1.1);
}
/* Zoom icon on video slide is an interactive button, not passive */
.gallery-holder .js-video-lightbox {
  pointer-events: auto;
  cursor: pointer;
}
.gallery-holder .container-img.video .js-video-lightbox {
  display: flex;
}
/* ============================================================
   LAIKOTARPIS PAGE — light redesign (matches mockup 4.png)
   Overrides the legacy dark .timeline styling from old-site.css.
   ============================================================ */

/* White page, hide the dark hero background overlay */
.wp-theme-atmintiesvietos.timeline {
  background: var(--color-white);
  /* The footer is pinned to the bottom of the document, so anything over 100vh
     here is pure dead space under the slider on a screen taller than the page. */
  min-height: 100vh;
}
body.timeline .bg {
  display: none;
}
.timeline-page {
  padding-bottom: 200px;
}
.timeline-page .container {
  position: relative;
  /* Wide enough gutters to hold what hangs outside the content: the slider's
     side arrows (-40px) and the first/last year labels, which are centred on
     ticks at the very ends of the track. At the theme's 20px both spilled past
     the viewport and gave the page a sideways scroll. */
  padding-left: 44px;
  padding-right: 44px;
}
@media all and (max-width: 640px) {
  .timeline-page .time-line-texts {
    align-items: flex-start !important;
  }
  .timeline-page .pb-gc-filter {
    width: 100%;
  }
  .timeline-page .pb-gc-select-trigger {
    min-width: unset !important;
  }
  .time-line-texts,
  .lk-featured {
    padding: 0 40px;
  }
  .timeline-page .container {
    padding-left: 0;
    padding-right: 0;
  }
  .timeline-page form#Form_MemosSearchForm {
    margin: 38px 34px !important;
  }
}

/* ---- Heading row: title left, period dropdown right ---- */
.timeline-page .time-line-texts {
  margin: 44px 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.timeline-page .lk-heading h1 {
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  /* Scales down instead of running off both edges on a phone — this rule sits
     in the later stylesheet, so main-site.css's mobile step never applied. */
  font-size: clamp(30px, 7.5vw, 58px);
  line-height: 1;
  margin: 0;
}
.timeline-page .lk-heading .lk-count {
  margin: 14px 0 0;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 21px;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.timeline-page .lk-heading .lk-count b.counter {
  color: var(--color-primary);
  font-weight: 700;
}
.timeline-page .lk-heading .lk-count i {
  font-style: normal;
  font-weight: 700;
}

/* period dropdown — always-visible bordered box (mockup) */
.timeline-page .pb-gc-select-trigger {
  border: 2px solid var(--color-primary);
  background: var(--color-white);
  height: 48px;
  min-width: 215px;
  font-size: 14px;
}
.timeline-page .pb-gc-select-trigger.is-open {
  border-bottom: none;
}

/* This page is short, and the footer is pinned to the bottom of the document,
   so on a tall screen the cards and the year slider used to sit halfway up with
   a void beneath them. Give the container whatever height the viewport leaves
   (header above, footer reserve below) and let the gap open above the cards
   instead — the slider then settles just over the footer. On short viewports
   the content already exceeds this height, so nothing moves. */
.timeline-page > .container {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 410px);
}

/* ---- Featured card slider ---- */
.timeline-page .lk-featured {
  position: relative;
  /* auto top margin: takes up the slack left by the min-height above. */
  margin: auto 0 4px;
}
.timeline-page .lk-featured .list {
  position: relative;
  margin: 0;
}
.timeline-page .lk-featured .list .slick-list {
  overflow: hidden;
  margin: 0 -8px;
}

/* Card: light teal flip card (kill the dark legacy theme) */
.timeline-page .lk-featured .card {
  box-sizing: border-box;
  padding: 0 8px;
  margin: 0;
  opacity: 1;
}
.timeline-page .lk-featured .card .front {
  background-color: var(--color-primary);
}
.timeline-page .lk-featured .card .front:after {
  display: none;
}
.timeline-page .lk-featured .card .front i,
.timeline-page .lk-featured .card .front h4 {
  color: var(--color-white);
}
.timeline-page .lk-featured .card .front div {
  padding: 20px 14px;
}
.timeline-page .lk-featured .card .front h4 {
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 22px;
  -webkit-line-clamp: 2;
}
/* back face */
.timeline-page .lk-featured .card .back {
  background-color: var(--color-primary);
  left: 8px;
  right: 8px;
}
.timeline-page .lk-featured .card .back > div {
  margin: 28px 24px 0;
  text-align: center;
}
.timeline-page .lk-featured .card .back > div i {
  color: var(--color-white);
  font-style: normal;
  font-size: 15px;
  display: block;
}
.timeline-page .lk-featured .card .back > div h4 {
  color: var(--color-white);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
  line-height: 1.1;
}
.timeline-page .lk-featured .card .back p {
  margin: 18px 24px;
  color: var(--color-white);
  text-align: left;
  font-size: 14px;
  line-height: 22px;
  -webkit-line-clamp: 8;
  max-height: calc(22px * 8);
}
.timeline-page .lk-featured .card .back .btn {
  width: auto;
  left: 24px;
  right: 24px;
  margin: 0 0 28px;
  background: var(--color-white);
  color: var(--color-primary);
  border: 0;
}
.timeline-page .lk-featured .card .back .btn:hover {
  color: var(--color-primary);
}

/* slider side arrows */
.timeline-page .lk-featured .slick-prev,
.timeline-page .lk-featured .slick-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0;
  cursor: pointer;
  z-index: 5;
}
.timeline-page .lk-featured .slick-prev {
  left: -40px;
}
.timeline-page .lk-featured .slick-next {
  right: -40px;
}
.timeline-page .lk-featured .slick-prev:before,
.timeline-page .lk-featured .slick-next:before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  background-color: var(--color-primary);
  -webkit-mask: url(../images/chew-down.svg) center / contain no-repeat;
  mask: url(../images/chew-down.svg) center / contain no-repeat;
}
.timeline-page .lk-featured .slick-prev:before {
  transform: rotate(90deg);
}
.timeline-page .lk-featured .slick-next:before {
  transform: rotate(-90deg);
}
.timeline-page .lk-featured .slick-prev.slick-disabled,
.timeline-page .lk-featured .slick-next.slick-disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---- Timeline year-range slider (below cards) ---- */
.timeline-page form#Form_MemosSearchForm {
  margin: 30px 14px 44px;
}
.timeline-page .range-slider {
  background: var(--color-primary);
  height: 2px;
}
.timeline-page .range-slider .ui-slider-range {
  background: var(--color-primary);
}
.timeline-page .range-slider label {
  color: #00514e;
  font-size: 18px;
}
.timeline-page .range-slider label.active {
  color: var(--color-primary);
  font-size: 30px;
}
.timeline-page .range-slider label b {
  color: inherit;
}
/* dots */
.timeline-page .range-slider i {
  width: 11px;
  height: 11px;
  top: -5px;
  margin-left: -5px;
  background: var(--color-white);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
}
.timeline-page .range-slider i.in-range {
  background: var(--color-primary);
}
.timeline-page .range-slider i.ui-state-default {
  width: 16px;
  height: 16px;
  top: -8px;
  margin-left: -8px;
  background: var(--color-primary);
  border: 2px solid var(--color-primary);
}
@media (max-width: 1024px) {
  .timeline-page .range-slider label.active {
    font-size: 19px;
  }
}
@media (max-width: 767px) {
  .timeline-page form#Form_MemosSearchForm {
    margin: 38px 17px;
    left: 0;
    right: 0;
  }
  .gslide-image img {
    filter: grayscale(0) !important;
  }
}

@media (max-width: 480px) {
  .timeline-page {
    padding-bottom: 280px;
  }
  .timeline-page .range-slider i {
    width: 8px;
    height: 8px;
    top: -5px;
  }
  .timeline-page .range-slider i.ui-state-default {
    width: 11px;
    height: 11px;
    top: -6px;
  }
  .ui-slider-horizontal .ui-slider-range {
    top: -1px;
  }
}
@media (min-width: 481px) and (max-width: 560px) {
  .timeline-page .lk-featured .card .back p {
    max-height: calc(22px * 4);
  }
}

/* =============================================
   MOBILE TYPE SIZES — from "atminties vietos mobile darbinis.ai" (390px)
   Sizes only. This sheet loads after main-site.css, so the timeline and
   page-builder sizes have to be settled here rather than there.
   ============================================= */
@media all and (max-width: 640px) {
  /* "LAIKOTARPIS" — the base rule is a vw clamp that lands on its 30px floor
     at 390px; the design asks for 36. */
  .timeline-page .lk-heading h1 {
    font-size: 36px;
  }
  /* "129 atminties vietos" */
  .timeline-page .lk-heading .lk-count {
    font-size: 18px;
  }
  /* Decade labels on the slider */
  .timeline-page .range-slider label,
  .timeline-page .range-slider label.active {
    font-size: 14px;
  }
  /* Featured cards: title 18, date 12, excerpt 14 */
  .timeline-page .lk-featured .card .front h4,
  .timeline-page .lk-featured .card .back > div h4 {
    font-size: 18px;
  }
  .timeline-page .lk-featured .card .back > div i {
    font-size: 12px;
  }
  .timeline-page .lk-featured .card .back p {
    font-size: 14px;
  }
}

/* ── Archive / index fallback listings ───────
   archive.php and index.php reuse the Post Builder grid, but they have no
   sidebar — .main .pb-posts-grid reserves 25% on the left for one, which would
   push these listings off-centre. */
.main.archive-page .pb-posts-grid {
  padding: 0 4.17% 200px;
}
.archive-page .archive-intro {
  padding: 4.17% 4.17% 2.5%;
}
.archive-page .archive-intro .page-title {
  margin: 0;
}
.archive-page .archive-description {
  margin-top: 16px;
}
.archive-page .index-search-again {
  margin-top: 32px;
}

/* ── Cascading global-category filters ───────
   Options that no longer lead to any post get the `hidden` attribute, from
   gc_available_child_ids() on first paint and from gcApplyAvailable() after
   each AJAX filter. The UA stylesheet's [hidden] { display: none } loses to
   the author-level .pb-gc-child-tab { display: block } above, so the rule has
   to be restated here or nothing would actually hide. */
.pb-gc-child-tab[hidden],
.pb-gc-holder[hidden] {
  display: none !important;
}
