/* ==========================================================================
   Flooxio – Portfolio
   1. Listing page   (templates/portfolio.php)
   2. Single project (single-fx_project.php)
   3. Footer band colours
   4. Responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Listing page
   -------------------------------------------------------------------------- */
.pf-page { position: relative; overflow: hidden; background: var(--blue); }

.pf-hero { position: relative; height: 640px; padding-top: 150px; background: var(--neon); }
.pf-wave { position: absolute; left: 0; right: 0; bottom: -1px; display: block; width: 100%; height: 340px; }

.pf-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 60px;
  margin-top: -490px;
  padding-bottom: 140px;
}

.pf-intro { position: sticky; top: 130px; align-self: start; }
.pf-intro .pf-lead { max-width: 440px; line-height: 1.55; }

.pf-big {
  margin-top: 190px;
  font-size: 76px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--dark-blue);
}

/* filters */
.pf-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.pf-filter {
  padding: 8px 18px;
  border: 1px solid var(--black);
  border-radius: 50px;
  background: transparent;
  color: var(--black);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.pf-filter.active { background: var(--black); color: var(--cyan); }

/* project list: one column, newest first (the two PHP columns are flattened) */
.pf-cols { display: flex; flex-direction: column; gap: 30px; }
.pf-col { display: contents; }
.pf-col:first-child > :nth-child(1) { order: 1; }  .pf-col:last-child > :nth-child(1) { order: 2; }
.pf-col:first-child > :nth-child(2) { order: 3; }  .pf-col:last-child > :nth-child(2) { order: 4; }
.pf-col:first-child > :nth-child(3) { order: 5; }  .pf-col:last-child > :nth-child(3) { order: 6; }
.pf-col:first-child > :nth-child(4) { order: 7; }  .pf-col:last-child > :nth-child(4) { order: 8; }
.pf-col:first-child > :nth-child(5) { order: 9; }  .pf-col:last-child > :nth-child(5) { order: 10; }
.pf-col:first-child > :nth-child(6) { order: 11; } .pf-col:last-child > :nth-child(6) { order: 12; }
.pf-col:first-child > :nth-child(7) { order: 13; } .pf-col:last-child > :nth-child(7) { order: 14; }
.pf-col:first-child > :nth-child(8) { order: 15; } .pf-col:last-child > :nth-child(8) { order: 16; }
.pf-col:first-child > :nth-child(9) { order: 17; } .pf-col:last-child > :nth-child(9) { order: 18; }
.pf-col:first-child > :nth-child(10) { order: 19; } .pf-col:last-child > :nth-child(10) { order: 20; }

/* project card: 16:9, black offset shadow; on hover the card slides onto its shadow */
.pf-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin: 0 0 18px 20px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: -20px 18px 0 var(--black);
  text-decoration: none;
  transition: transform .35s ease, box-shadow .35s ease;
}
/* the image never stretches the card: every card stays 16:9 */
.pf-card { min-height: 0; }
.pf-card img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.pf-card-over {
  position: absolute;
  inset: auto 0 0 0;
  padding: 30px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0));
  color: var(--white);
}
.pf-card-over .pf-client { display: none; }
.pf-card-over .pf-title { font-size: 30px; font-weight: 600; line-height: 1.2; color: var(--white); }
.pf-card.is-hidden { display: none; }
.pf-empty { color: var(--white); }

@media (hover: hover) and (pointer: fine) {
  .pf-filter:hover { background: var(--black); color: var(--cyan); }
  a.pf-card:hover { transform: translate(-20px, 18px); box-shadow: 0 0 0 var(--black); }
}
a.pf-card:focus-visible { transform: translate(-20px, 18px); box-shadow: 0 0 0 var(--black); }

/* --------------------------------------------------------------------------
   2. Single project (XD "PROIECT SINGLE")
   -------------------------------------------------------------------------- */
.pjs { background: var(--dark-blue); }

.pjs-hero { position: relative; padding: 150px 0 40px; background: var(--neon); text-align: center; }
.pjs-hero .pjs-hero-in {
  position: relative;
  z-index: 2;
  box-sizing: content-box;
  max-width: 1064px;
  margin: 0 auto;
  padding: 0 20px;
}
.pjs-title { font-size: 60px; font-weight: 700; line-height: 1.1; color: var(--black); }
.pjs-intro { margin: 24px auto 0; font-size: 21px; line-height: 1.55; color: var(--black); }

/* client website link under the intro */
.pjs-site {
  display: inline-block;
  margin-top: 21px;
  padding-top: 4px;
  border-top: 2px solid currentColor;
  color: var(--dark-blue);
  text-decoration: none;
}

/* service pills */
.pjs-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.pjs-pills a,
.pjs-pills span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--dark-blue);
  border-radius: 40px;
  color: var(--dark-blue);
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .25s, color .25s;
}

@media (hover: hover) and (pointer: fine) {
  .pjs-site:hover { color: var(--blue); }
  .pjs-pills a:hover { background: var(--dark-blue); color: var(--white); }
}

/* body sections: 40px between all blocks */
.pjs-body { padding: 40px 0 120px; }
.pjs-wrap,
.pjs-wide { box-sizing: content-box; margin: 40px auto 0; padding: 0 20px; }
.pjs-wrap { max-width: 1064px; }
.pjs-wide { max-width: 1334px; }
.pjs-body > section:first-child { margin-top: 0; }

/* text block */
.pjs-text { display: grid; grid-template-columns: 388fr 659fr; gap: 17px; }
.pjs-text-l,
.pjs-text-r { border-radius: 40px; background: var(--neon); }
.pjs-text-l { display: flex; align-items: center; padding: 40px 60px; }
.pjs-text-l h2 { font-size: 48px; font-weight: 700; line-height: 1.05; color: var(--dark-blue); }
.pjs-text-r { padding: 28px 44px; font-size: 16px; line-height: 1.45; color: var(--dark-blue); }
.pjs-text-r p + p { margin-top: 16px; }

/* image blocks */
.pjs-imgs { display: grid; gap: 17px; }
.pjs-imgs--half { grid-template-columns: 1fr 1fr; }
.pjs-imgs--wide-narrow { grid-template-columns: 661fr 391fr; }
.pjs-imgs--narrow-wide { grid-template-columns: 391fr 661fr; }
.pjs-imgs--full { grid-template-columns: 1fr; }
.pjs-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 40px; }
.pjs-imgs--half .pjs-img { aspect-ratio: 526 / 296; }
.pjs-imgs--wide-narrow .pjs-img,
.pjs-imgs--narrow-wide .pjs-img { height: clamp(220px, 25vw, 372px); }
.pjs-imgs--full .pjs-img { aspect-ratio: 1068 / 600; }

/* cards */
.pjs-heading { margin-bottom: 40px; font-size: 60px; font-weight: 700; line-height: 1.1; color: var(--white); }
.pjs-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; }
.pjs-card {
  position: relative;
  box-sizing: border-box;
  min-height: 231px;
  margin: 0 0 18px 20px;
  padding: 40px 30px 40px 50px;
  border-radius: 20px;
  box-shadow: -20px 18px 0 var(--black);
}
.pjs-card h3 { font-size: 24px; font-weight: 700; line-height: 1.2; }
.pjs-card p { margin-top: 12px; font-size: 16px; line-height: 1.45; }
.pjs-card--blue { background: var(--blue); color: var(--white); }
.pjs-card--cyan { background: var(--cyan); color: var(--black); }

/* goals */
.pjs-goals {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 388fr 659fr;
  gap: 17px;
  align-items: center;
  max-width: 1064px;
  padding: 40px 60px;
  border-radius: 40px;
  background: var(--black);
  color: var(--white);
}
.pjs-goals h2 { font-size: 48px; font-weight: 700; line-height: 1.05; }
.pjs-goals ul { margin: 0; padding: 0 0 0 30px; list-style: none; }
.pjs-goals li { font-size: 16px; line-height: 1.45; }
.pjs-goals li + li { margin-top: 22px; }
.pjs-goals strong { display: block; margin-bottom: 6px; }

/* video */
.pjs-video { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 40px; background: #000; }
.pjs-video iframe { display: block; width: 100%; height: 100%; border: 0; }

/* --------------------------------------------------------------------------
   3. Footer band above the cyan wave: match the page background
   -------------------------------------------------------------------------- */
body.page-template-templatesportfolio-php .site-footer { background-color: var(--blue) !important; }
body.single-fx_project .site-footer { background-color: var(--dark-blue) !important; }

/* --------------------------------------------------------------------------
   4. Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  .pf-hero { height: 780px; }
  .pf-grid { margin-top: -630px; }
  .pf-intro .pf-lead { max-width: 480px; font-size: 20px; }
  .pf-big { margin-top: 150px; }
}

@media (max-width: 1200px) {
  .pf-big { font-size: 60px; }
}

@media (max-width: 1024px) {
  .pf-hero { height: auto; padding: 130px 0 120px; }
  .pf-grid { grid-template-columns: 1fr; margin-top: -60px; }
  .pf-intro { position: static; }
  .pf-big { display: none; }

  .pjs-title,
  .pjs-heading { font-size: 44px; }
  .pjs-text,
  .pjs-goals { grid-template-columns: 1fr; }
  .pjs-text-l h2,
  .pjs-goals h2 { font-size: 36px; }
  .pjs-goals ul { padding: 0; }
  .pjs-cards { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .pf-cols { gap: 18px; }
  .pf-card { margin: 0 0 10px 12px; box-shadow: -12px 10px 0 var(--black); }
  a.pf-card:focus-visible { transform: translate(-12px, 10px); }
  .pf-card-over { padding: 18px; }
  .pf-card-over .pf-title { font-size: 20px; }

  .pjs-hero { padding: 120px 0 40px; }
  .pjs-title,
  .pjs-heading { font-size: 34px; }
  .pjs-intro { font-size: 18px; }
  .pjs-pills a,
  .pjs-pills span { height: 40px; }
  .pjs-imgs--half,
  .pjs-imgs--wide-narrow,
  .pjs-imgs--narrow-wide { grid-template-columns: 1fr; }
  .pjs-imgs--wide-narrow .pjs-img,
  .pjs-imgs--narrow-wide .pjs-img { height: auto; aspect-ratio: 16 / 10; }
  .pjs-text-l,
  .pjs-text-r,
  .pjs-goals { padding: 28px; border-radius: 24px; }
  .pjs-img,
  .pjs-video { border-radius: 24px; }
}

@media (max-width: 767px) and (hover: hover) and (pointer: fine) {
  a.pf-card:hover { transform: translate(-12px, 10px); }
}

@media (prefers-reduced-motion: reduce) {
  .pf-card { transition: none; }
}
