/* Examples pages — landing header + Flipsnack-style masonry */

body.pf-examples-page {
  background: #f6f7f9;
}

/*
 * Examples viewer lightbox — match demo.css .pf-lightbox-wrapper look
 * (padded rounded stage + circular close), not edge-to-edge fullscreen.
 */
body.pf-examples-page .library-modal {
  position: fixed !important;
  inset: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background: rgba(50, 50, 50, 0.6) !important;
  display: none;
  z-index: 99999;
  box-sizing: border-box;
}
body.pf-examples-page .library-modal.show {
  display: block !important;
}
body.pf-examples-page .library-modal-content {
  margin: 0;
  position: absolute !important;
  top: 5.5%;
  left: 5.5%;
  right: 5.5%;
  bottom: 5.5%;
  width: auto !important;
  height: auto !important;
  max-width: none;
  max-height: none;
  transform: none !important;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28), 0 2px 10px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}
body.pf-examples-page .library-modal-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  border-radius: 25px;
}
body.pf-examples-page .library-modal-back {
  position: absolute;
  top: calc(2.25% + env(safe-area-inset-top, 0px));
  right: 2.25%;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  z-index: 100001;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
body.pf-examples-page .library-modal-back:hover {
  background: #fff;
  color: #111;
}
@media (max-width: 768px) {
  body.pf-examples-page .library-modal-content {
    top: 4%;
    left: 3.5%;
    right: 3.5%;
    bottom: 4%;
    border-radius: 18px;
  }
  body.pf-examples-page .library-modal-frame {
    border-radius: 18px;
  }
  body.pf-examples-page .library-modal-back {
    top: calc(1.25% + env(safe-area-inset-top, 0px));
    right: 1.5%;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }
}

body.pf-examples-page #page.page {
  background: #f6f7f9;
}

body.pf-examples-page .container-xxl {
  max-width: 1600px;
}

/* —— Hero —— */
.pf-ex-hero {
  padding: 5.5rem 0 0.35rem;
  background:
    radial-gradient(ellipse 70% 80% at 50% -20%, rgba(15, 188, 73, 0.1), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
}

.pf-ex-hero-inner {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.pf-ex-hero-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--green, #0fbc49);
  font-family: var(--main-font, "Roboto", sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pf-ex-hero-title {
  margin: 0 0 0.45rem;
  font-family: var(--main-font, "Roboto", sans-serif);
  color: #111111;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.pf-ex-hero-lead {
  margin: 0 auto 1.1rem;
  max-width: 40rem;
  font-family: var(--main-font, "Roboto", sans-serif);
  color: #3f4652;
  font-size: 1rem;
  line-height: 1.55;
}

.pf-ex-hero-actions {
  margin: 0 0 1.35rem;
}

.pf-ex-hero-actions .btn {
  margin: 0;
}

.pf-ex-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem auto 0;
  padding: 0.15rem 0 0.35rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pf-ex-nav::-webkit-scrollbar {
  display: none;
}

.pf-ex-nav-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: #fff;
  color: #1f2937;
  font-family: var(--main-font, "Roboto", sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}

.pf-ex-nav-link:hover {
  color: #0fbc49;
  border-color: rgba(15, 188, 73, 0.35);
}

.pf-ex-nav-link.is-active {
  color: #fff;
  background: #0fbc49;
  border-color: #0fbc49;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(15, 188, 73, 0.22);
}

/* —— Single embed (Excel, etc.) —— */
.pf-ex-embed-section {
  padding: 1rem 0 3.25rem;
}

.pf-ex-embed-label {
  margin: 0 0 0.85rem;
  text-align: center;
  font-family: var(--main-font, "Roboto", sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.pf-ex-embed-label .flaticon-ai {
  margin-right: 0.35rem;
}

.pf-ex-embed-section .pf-examples-embed-host {
  border-radius: 16px;
  overflow: hidden;
  background: #e8eaee;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
}

/* —— Masonry gallery —— */
.pf-ex-gallery-section {
  padding: 1.25rem 0 3.5rem;
}

.pf-ex-gallery-empty {
  margin: 2rem 0;
  text-align: center;
  color: #64748b;
}

/* Classic masonry — CSS columns, original cover aspect ratios */
.pf-ex-masonry {
  column-count: auto;
  column-width: 200px;
  column-gap: 1.1rem;
  width: 100%;
}

.pf-ex-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.1rem;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  position: relative;
  transform: translateZ(0);
}

.pf-ex-card-hit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.pf-ex-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #e8eaee;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pf-ex-card-media img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.pf-ex-card-hit:hover .pf-ex-card-media,
.pf-ex-card-hit:focus-visible .pf-ex-card-media {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
}

.pf-ex-card-hit:focus-visible {
  outline: none;
}

.pf-ex-card-hit:focus-visible .pf-ex-card-media {
  outline: 2px solid rgba(15, 188, 73, 0.55);
  outline-offset: 3px;
}

.pf-ex-card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 1.6rem 0.55rem 0.45rem;
  color: #fff;
  font-family: var(--main-font, "Roboto", sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-align: left;
  background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.72) 55%, rgba(17, 24, 39, 0.88) 100%);
  pointer-events: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Bookshelf page: keep shelves, polish hero only */
body.pf-examples-page--bookshelf .pf-ex-bookshelf-section {
  padding: 0.75rem 0 3rem;
}

body.pf-examples-page--bookshelf .book_shelf_container {
  min-height: inherit;
  background: transparent !important;
}

body.pf-examples-page--bookshelf .pf-ex-bookshelf-embed {
  margin-top: 2.5rem;
}

body.pf-examples-page--bookshelf .pf-ex-bookshelf-embed-label {
  margin: 0 0 1rem;
  text-align: center;
  font-family: var(--main-font, "Roboto", sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

body.pf-examples-page--bookshelf .pf-ex-bookshelf-embed-label .flaticon-ai {
  margin-right: 0.35rem;
}

@media (max-width: 1099px) {
  .pf-ex-masonry {
    column-width: 180px;
  }
}

@media (max-width: 767px) {
  .pf-ex-hero {
    padding: 5.1rem 0 0.25rem;
  }

  .pf-ex-masonry {
    column-width: 150px;
    column-gap: 0.85rem;
  }

  .pf-ex-card {
    margin-bottom: 0.85rem;
  }

  .pf-ex-card-title {
    font-size: 0.68rem;
    padding: 1.35rem 0.45rem 0.4rem;
  }

  .pf-ex-nav {
    justify-content: flex-start;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .pf-ex-nav-link {
    font-size: 0.78rem;
    padding: 0.32rem 0.62rem;
  }
}

@media (max-width: 420px) {
  .pf-ex-masonry {
    column-width: 140px;
  }
}
