/* Codenixo Projects Premium Redesign
   Approved visual direction: hero + filters/search + 3-column portfolio + premium CTA.
*/

.projects-premium {
  --pj-ink: #071127;
  --pj-copy: #60708f;
  --pj-line: rgba(148, 163, 184, .18);
  --pj-soft: #f7f9ff;
  --pj-card: #fff;
  --pj-shadow: 0 22px 60px -44px rgba(15, 23, 42, .28);
  color: var(--pj-ink);
  background: #fff;
}

html.dark .projects-premium {
  --pj-ink: #f8fafc;
  --pj-copy: #cbd5e1;
  --pj-line: rgba(255, 255, 255, .10);
  --pj-soft: #07101f;
  --pj-card: #0f172a;
  background: #020617;
}

.projects-premium p {
  color: var(--pj-copy);
}

.projects-premium a {
  text-decoration: none;
}

.pj-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 13px;
  color: var(--brand-dark);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.4;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.pj-eyebrow::after {
  content: "";
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand), transparent);
}

html.dark .pj-eyebrow {
  color: var(--brand-light);
}

/* Match Home / Services nav behavior: transparent until scroll. */
@media (min-width: 1181px) {
  body[data-page="projects"] .navbar:not(.scrolled) {
    background: transparent !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Hero */
.pj-hero {
  position: relative;
  overflow: hidden;
  padding: 136px 0 60px;
  background:
    radial-gradient(circle at 77% 14%, rgba(99, 102, 241, .11), transparent 29%),
    linear-gradient(180deg, #fbfcff 0%, #fff 100%);
}

html.dark .pj-hero {
  background:
    radial-gradient(circle at 77% 14%, rgba(99, 102, 241, .16), transparent 29%),
    linear-gradient(180deg, #020617 0%, #07101f 100%);
}

.pj-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(440px, 1.12fr);
  gap: clamp(48px, 6vw, 84px);
  align-items: center;
}

.pj-hero__title {
  margin: 0 0 20px;
  color: var(--pj-ink);
  font-family: var(--font-display);
  font-size: clamp(58px, 6vw, 86px);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.064em;
  text-wrap: balance;
}

.pj-hero__lead {
  max-width: 650px;
  margin: 0;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.62;
}

.pj-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 28px;
}

.pj-signals span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #53627f;
  font-size: 11.5px;
  font-weight: 650;
}

html.dark .pj-signals span {
  color: #cbd5e1;
}

.pj-signals i {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
  background: linear-gradient(145deg, #818cf8, #4f46e5);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .08);
}

.pj-hero__visual {
  position: relative;
  min-height: 430px;
}

.pj-hero__orb {
  position: absolute;
  left: 4%;
  top: 1%;
  width: 90%;
  aspect-ratio: 1.25;
  border-radius: 50%;
  background:
    radial-gradient(circle at 55% 45%, rgba(255, 255, 255, .82), rgba(224, 231, 255, .72) 42%, rgba(99, 102, 241, .05) 72%, transparent 73%);
  filter: blur(.2px);
}

.pj-device {
  position: absolute;
  z-index: 2;
}

.pj-device__screen {
  overflow: hidden;
  background: #0f172a;
}

.pj-device__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pj-device--laptop {
  left: 13%;
  top: 11%;
  width: 72%;
}

.pj-device--laptop .pj-device__screen {
  aspect-ratio: 16 / 10;
  padding: 10px;
  border: 8px solid #101827;
  border-radius: 22px;
  box-shadow: 0 32px 70px -38px rgba(15, 23, 42, .48);
}

.pj-device--laptop .pj-device__screen img {
  border-radius: 10px;
}

.pj-device__base {
  position: relative;
  left: -5%;
  width: 110%;
  height: 23px;
  margin-top: -3px;
  border-radius: 4px 4px 18px 18px;
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  box-shadow: 0 18px 34px -24px rgba(15, 23, 42, .50);
}

.pj-device__base::after {
  content: "";
  position: absolute;
  left: 43%;
  top: 3px;
  width: 14%;
  height: 4px;
  border-radius: 99px;
  background: #64748b;
  opacity: .45;
}

.pj-device--phone {
  right: 5%;
  top: 31%;
  width: 20%;
  transform: rotate(2deg);
}

.pj-device--phone .pj-device__screen {
  aspect-ratio: .53;
  padding: 6px;
  border: 6px solid #101827;
  border-radius: 23px;
  box-shadow: 0 24px 50px -30px rgba(15, 23, 42, .55);
}

.pj-device--phone .pj-device__screen img {
  border-radius: 14px;
}

.pj-device__placeholder {
  display: grid;
  place-items: center;
  min-height: 260px;
  color: #fff;
  font-weight: 800;
  letter-spacing: .12em;
}

.pj-stat {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
  padding: 13px 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 15px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 45px -28px rgba(15, 23, 42, .34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html.dark .pj-stat {
  background: rgba(15, 23, 42, .92);
}

.pj-stat--left {
  left: 3%;
  bottom: 16%;
}

.pj-stat--right {
  right: 0;
  bottom: 11%;
}

.pj-stat__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #8178ff, #5548f0);
  font-size: 18px;
  font-weight: 900;
}

.pj-stat strong,
.pj-stat small {
  display: block;
}

.pj-stat strong {
  color: var(--pj-ink);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
}

.pj-stat small {
  margin-top: 4px;
  color: var(--pj-copy);
  font-size: 10px;
  font-weight: 700;
}

.pj-hero__scribble {
  position: absolute;
  right: 3%;
  top: 6%;
  z-index: 5;
  color: #344770;
  font-family: Georgia, serif;
  font-size: 19px;
  font-style: italic;
  transform: rotate(-7deg);
}

html.dark .pj-hero__scribble {
  color: #9fb0d3;
}

/* Catalog */
.pj-catalog {
  padding: 12px 0 70px;
  background: #fff;
}

html.dark .pj-catalog {
  background: #020617;
}

.pj-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.pj-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}

.pj-filters button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid var(--pj-line);
  border-radius: 11px;
  background: var(--pj-card);
  color: var(--pj-copy);
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.pj-filters button:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, .25);
}

.pj-filters button.is-active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(180deg, #6c63ff, #5548f0);
  box-shadow: 0 11px 26px -17px rgba(79, 70, 229, .65);
}

.pj-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid var(--pj-line);
  border-radius: 11px;
  background: var(--pj-card);
  box-shadow: 0 12px 34px -30px rgba(15, 23, 42, .28);
}

.pj-search svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.pj-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--pj-ink);
  background: transparent;
  font: inherit;
  font-size: 12.5px;
}

.pj-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pj-card {
  overflow: hidden;
  border: 1px solid var(--pj-line);
  border-radius: 16px;
  background: var(--pj-card);
  box-shadow: var(--pj-shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pj-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, .25);
  box-shadow: 0 28px 68px -46px rgba(79, 70, 229, .34);
}

.pj-card[hidden] {
  display: none;
}

.pj-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 70% 20%, rgba(99, 102, 241, .12), transparent 38%),
    #eef2ff;
}

html.dark .pj-card__media {
  background:
    radial-gradient(circle at 70% 20%, rgba(99, 102, 241, .18), transparent 38%),
    #111827;
}

.pj-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.pj-card:hover .pj-card__media img {
  transform: scale(1.018);
}

.pj-card__category {
  position: absolute;
  right: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 8px 22px -16px rgba(15, 23, 42, .45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: .06em;
  line-height: 1.2;
}

.pj-card__placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  color: #53627f;
}

.pj-card__placeholder span {
  color: var(--brand);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
}

.pj-card__placeholder strong {
  max-width: 82%;
  color: var(--pj-ink);
  text-align: center;
  font-size: 18px;
}

.pj-card__body {
  padding: 16px 17px 18px;
}

.pj-card__meta {
  min-height: 15px;
  margin-bottom: 5px;
  color: #7c8ba6;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
}

.pj-card h3 {
  margin: 0 0 7px;
  color: var(--pj-ink);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: -.025em;
}

.pj-card p {
  min-height: 59px;
  margin: 0 0 12px;
  font-size: 12.3px;
  line-height: 1.55;
}

.pj-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
  margin-bottom: 12px;
}

.pj-card__tags span {
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--brand-dark);
  background: rgba(99, 102, 241, .08);
  font-size: 8.8px;
  font-weight: 750;
}

html.dark .pj-card__tags span {
  color: #c7d2fe;
  background: rgba(99, 102, 241, .14);
}

.pj-card__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 850;
}

html.dark .pj-card__link {
  color: var(--brand-light);
}

.pj-empty {
  margin: 0;
  padding: 40px 0;
  text-align: center;
  font-size: 14px;
}

/* Final CTA — intentionally closely follows the approved mockup. */
.pj-cta {
  padding: 0 0 68px;
  background: #fff;
}

html.dark .pj-cta {
  background: #020617;
}

.pj-cta__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(235px, .60fr) auto;
  gap: 32px;
  align-items: center;
  overflow: hidden;
  padding: 30px 34px;
  border: 1px solid rgba(99, 102, 241, .11);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 35%, rgba(99, 102, 241, .20), transparent 28%),
    linear-gradient(118deg, #f9faff 0%, #eef2ff 100%);
  box-shadow: 0 24px 66px -48px rgba(79, 70, 229, .42);
}

html.dark .pj-cta__panel {
  background:
    radial-gradient(circle at 92% 35%, rgba(99, 102, 241, .24), transparent 28%),
    linear-gradient(118deg, #0b1220 0%, #101a31 100%);
}

.pj-cta__eyebrow {
  margin: 0 0 7px;
  color: var(--brand) !important;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.pj-cta__copy h2 {
  margin: 0 0 7px;
  color: var(--pj-ink);
  font-family: var(--font-display);
  font-size: clamp(29px, 3vw, 42px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.pj-cta__copy p {
  max-width: 620px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.56;
}

.pj-cta__points {
  display: grid;
  gap: 10px;
}

.pj-cta__points span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--pj-ink);
  font-size: 11.5px;
  font-weight: 700;
}

.pj-cta__points i {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  flex: none;
  border-radius: 50%;
  color: var(--brand);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 20px -14px rgba(79, 70, 229, .50);
  font-style: normal;
}

html.dark .pj-cta__points i {
  background: #111c33;
}

.pj-cta__button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 11px;
  color: #fff;
  background: #081126;
  box-shadow: 0 16px 30px -20px rgba(8, 17, 38, .65);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

html.dark .pj-cta__button {
  color: #071127;
  background: #fff;
}

.pj-cta__cubes {
  position: absolute;
  right: 28px;
  bottom: 7px;
  width: 92px;
  height: 82px;
  opacity: .65;
  pointer-events: none;
}

.pj-cta__cubes i {
  position: absolute;
  width: 38px;
  height: 38px;
  transform: rotate(30deg) skew(-4deg, -4deg);
  border-radius: 7px;
  background: linear-gradient(145deg, #9b94ff, #5548f0);
  box-shadow: 0 16px 28px -18px rgba(79, 70, 229, .68);
}

.pj-cta__cubes i:nth-child(1) {
  left: 20px;
  top: 2px;
}

.pj-cta__cubes i:nth-child(2) {
  left: 48px;
  top: 31px;
  opacity: .70;
}

.pj-cta__cubes i:nth-child(3) {
  left: 5px;
  top: 42px;
  opacity: .45;
}

/* Bangla */
html[lang="bn"] .pj-eyebrow,
html[lang="bn"] .pj-cta__eyebrow {
  font-family: var(--font-bn);
  letter-spacing: 0;
  text-transform: none;
}

html[lang="bn"] .pj-hero__title,
html[lang="bn"] .pj-card h3,
html[lang="bn"] .pj-cta__copy h2 {
  font-family: var(--font-bn);
  letter-spacing: -.01em;
  line-height: 1.18;
}

/* Responsive */
@media (max-width: 1120px) {
  .pj-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pj-cta__panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pj-cta__points {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pj-hero {
    padding: 118px 0 54px;
  }

  .pj-hero__grid {
    grid-template-columns: 1fr;
  }

  .pj-hero__visual {
    min-height: 410px;
    max-width: 720px;
  }

  .pj-toolbar {
    grid-template-columns: 1fr;
  }

  .pj-search {
    max-width: 420px;
  }
}

@media (max-width: 660px) {
  .pj-hero {
    padding-top: 106px;
  }

  .pj-hero__title {
    font-size: clamp(46px, 13vw, 62px);
  }

  .pj-hero__lead {
    font-size: 16px;
  }

  .pj-hero__visual {
    min-height: 330px;
  }

  .pj-device--laptop {
    left: 4%;
    width: 83%;
  }

  .pj-device--phone {
    right: 0;
    width: 24%;
  }

  .pj-stat {
    min-width: 138px;
    padding: 10px 12px;
  }

  .pj-stat--left {
    left: 0;
    bottom: 13%;
  }

  .pj-stat--right {
    right: 0;
    bottom: 6%;
  }

  .pj-stat__icon {
    width: 34px;
    height: 34px;
  }

  .pj-hero__scribble {
    display: none;
  }

  .pj-grid {
    grid-template-columns: 1fr;
  }

  .pj-card p {
    min-height: 0;
  }

  .pj-filters {
    margin-right: -16px;
    padding-right: 16px;
  }

  .pj-cta__panel {
    grid-template-columns: 1fr;
    padding: 26px 23px;
  }

  .pj-cta__points {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 1fr;
  }

  .pj-cta__button {
    justify-self: start;
  }

  .pj-cta__cubes {
    right: 6px;
    opacity: .26;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pj-filters button,
  .pj-card,
  .pj-card__media img {
    transition: none;
  }
}
