/* Wrapper:
   Desktop: full 100vw
   Mobile: ~94vw
--------------------------------------------------*/
/* Wrapper: clean & centered
--------------------------------------------------*/
.fpg-wrap {
  width: min(100%, 100vw); /* prevents overflow */
  max-width: 100vw;
  margin: 0 auto;
  padding: 2.5rem 5vw;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .fpg-wrap {
    width: 100%;
    max-width: 100%;
  }
}


/* Grid: 3 columns desktop, 1 column mobile
--------------------------------------------------*/
.fpg-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;

}

@media (max-width: 768px) {
  .fpg-grid {
    grid-template-columns: 1fr;
	  gap: 8px;
  }
}

/* Each item is a perfect square
--------------------------------------------------*/
.fpg-item {
  position: relative;
  width: 100%;
}

.fpg-item::before {
  content: "";
  display: block;
  padding-bottom: 66.666%; /* 6:4 ratio (3:2) */
}


.fpg-item-inner {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #080808;
  text-decoration: none;
	  aspect-ratio: 3 / 2;  /* width 3, height 2 */
}

/* Thumbnail
--------------------------------------------------*/
.fpg-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  filter: grayscale(0.1);
  transition:
    transform 0.45s ease,
    filter 0.45s ease,
    opacity 0.45s ease;
}

/* Overlay with title
--------------------------------------------------*/
.fpg-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.4rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6),
    rgba(0, 0, 0, 0.0)
  );
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.fpg-title {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
}

/* Hover / focus states
--------------------------------------------------*/
.fpg-item-inner:hover .fpg-thumb,
.fpg-item-inner:focus-visible .fpg-thumb {
  transform: scale(1.07);
  filter: grayscale(0);
}

.fpg-item-inner:hover .fpg-overlay,
.fpg-item-inner:focus-visible .fpg-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile: keep overlay visible for readability
--------------------------------------------------*/
@media (max-width: 768px) {
  .fpg-overlay {
    opacity: 1;
    transform: translateY(0);
    background: 
      rgba(0,0,0,0);
  }
}

/* Small notice style
--------------------------------------------------*/
.fpg-notice {
  font-size: 0.9rem;
  opacity: 0.7;
}

@media (max-width: 768px) {
.ppf-extra video{
	max-height: 400px;
}
}

/* Tabs layout on top of portfolio
--------------------------------------------------*/
.fpg-wrap-tabs {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Tabs bar */
.fpg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding-bottom: 0.6rem;
}

@media (max-width: 768px) {
  .fpg-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.8rem;
  }
}

/* Individual tab */
.fpg-tab {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  opacity: 1;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.fpg-tab:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.fpg-tab.is-active {
  opacity: 1;
  background: rgba(0,0,0,0.06);
}

/* Each category grid reuses the same card styling */
.fpg-grid-cat {
  display: none;
}

.fpg-grid-cat.is-active-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

@media (max-width: 768px) {
  .fpg-grid-cat.is-active-grid {
	  display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}


