:root{
  --pw-bg:#07111f;
  --pw-bg-2:#0a1629;
  --pw-panel:#0d1b31;
  --pw-panel-2:#101f38;
  --pw-border:rgba(255,255,255,.08);
  --pw-border-strong:rgba(106,208,227,.22);
  --pw-text:#eef6ff;
  --pw-muted:#aebdd1;
  --pw-brand:#6ad0e3;
  --pw-brand-2:#00b3c7;
  --pw-shadow:0 24px 60px rgba(0,0,0,.42);
}

.text-soft{
  color:var(--pw-muted);
}

.filters{
  position:relative;
  overflow:hidden;
}

.filters::before{
  content:"";
  position:absolute;
  inset:auto auto 0 0;
  width:180px;
  height:180px;
  background:radial-gradient(circle, rgba(106,208,227,.09), transparent 68%);
  pointer-events:none;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
}

.chip{
  font-weight:700;
  transition:all .22s ease;
  cursor:pointer;
}

.chip:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.24);
  background:rgba(255,255,255,.09);
}

.chip.active{
  background:linear-gradient(135deg, rgba(106,208,227,.20), rgba(0,179,199,.14));
  border-color:var(--pw-border-strong);
  box-shadow:0 10px 20px rgba(0,179,199,.14);
}

.project{
  transition:opacity .25s ease, transform .25s ease;
}

.project-card{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 14px 34px rgba(0,0,0,.16);
  transition:transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  cursor:pointer;
  height:100%;
  background:linear-gradient(180deg, rgba(12,19,36,.88), rgba(14,23,42,.96));
}

.project-card::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(106,208,227,.05) 100%);
  pointer-events:none;
  opacity:0;
  transition:opacity .24s ease;
}

.project-card:hover{
  transform:translateY(-7px);
  border-color:rgba(106,208,227,.18);
  box-shadow:0 24px 48px rgba(0,0,0,.34);
}

.project-card:hover::after{
  opacity:1;
}

.project-card .thumb{
  position:relative;
  overflow:hidden;
  border-radius:16px;
  background:#09152c;
}

.project-card .thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .38s ease, filter .28s ease;
}

.project-card:hover .thumb img{
  transform:scale(1.045);
  filter:saturate(1.04);
}

.project-card .p-3{
  display:flex;
  flex-direction:column;
  min-height:220px;
}

.project-actions{
  margin-top:auto;
}

.project-card h4{
  font-size:clamp(1.25rem, 1.4vw, 1.8rem);
  line-height:1.2;
  color:var(--pw-text);
}

.project-meta{
  font-size:.82rem;
  color:rgba(234,243,255,.74);
  letter-spacing:.2px;
  margin-bottom:.7rem;
}

.badge-soft{
  background:rgba(106,208,227,.10);
  border:1px solid rgba(106,208,227,.18);
  color:#dcf9ff;
  font-weight:700;
}

.price-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  padding:.42rem .72rem;
  border-radius:999px;
  background:linear-gradient(135deg, rgba(106,208,227,.16), rgba(0,179,199,.10));
  border:1px solid rgba(106,208,227,.24);
  color:#e8fdff;
  font-weight:800;
}

.featured-badge{
  position:absolute;
  top:12px;
  left:12px;
  z-index:2;
  background:linear-gradient(135deg, #6ad0e3, #00b3c7);
  color:#031016;
  font-size:.72rem;
  font-weight:800;
  padding:.38rem .62rem;
  border-radius:999px;
  box-shadow:0 10px 22px rgba(0,179,199,.22);
}

.btn-float{
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn-float:hover{
  transform:translateY(-1px);
}

.btn-outline-light.btn-float{
  border-color:rgba(255,255,255,.22);
  color:#eef8ff;
}

.btn-outline-light.btn-float:hover{
  background:rgba(255,255,255,.08);
  color:#fff;
  border-color:rgba(255,255,255,.34);
}

/* ===== Modal: stronger, cleaner, less background interference ===== */
.modal{
  z-index:1080;
}

.modal-backdrop{
  z-index:1070;
}

.modal-backdrop.show{
  opacity:.95 !important;
  background:#020611 !important;
}

.preview-modal{
  background:linear-gradient(180deg, #081220 0%, #0b1629 100%) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  box-shadow:0 32px 90px rgba(0,0,0,.62);
  overflow:hidden;
}

.preview-modal .modal-header{
  border-bottom:1px solid rgba(255,255,255,.07);
  padding:1rem 1.15rem;
  background:#0a1324;
}

.preview-modal .modal-title{
  color:#eef7ff;
  font-size:clamp(1rem,1.15vw,1.2rem);
  font-weight:800;
}

.preview-modal .modal-body{
  padding:1rem;
  background:#08111f;
}

.preview-modal .modal-footer{
  border-top:1px solid rgba(255,255,255,.07);
  padding:1rem 1.15rem;
  background:#0a1324;
}

.preview-modal .btn-close{
  filter:invert(1);
  opacity:.85;
}

.preview-modal .btn-close:hover{
  opacity:1;
}

#previewCarousel{
  border-radius:22px;
  overflow:hidden;
  background:#07101e;
  border:1px solid rgba(255,255,255,.06);
  min-height:360px;
}

#previewCarousel .carousel-inner{
  border-radius:22px;
}

#previewCarousel .carousel-item{
  min-height:360px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1.2rem 4.7rem;
}

#previewCarousel .carousel-item img{
  width:100%;
  max-height:68vh;
  object-fit:contain;
  display:block;
  border-radius:16px;
  background:#0a1730;
  box-shadow:0 14px 30px rgba(0,0,0,.28);
}

#previewCarousel .carousel-control-prev,
#previewCarousel .carousel-control-next{
  width:64px;
  opacity:1;
}

#previewCarousel .carousel-control-prev-icon,
#previewCarousel .carousel-control-next-icon{
  width:44px;
  height:44px;
  border-radius:999px;
  background-color:rgba(255,255,255,.88);
  background-size:45% 45%;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
  filter:drop-shadow(0 8px 18px rgba(0,0,0,.18));
}

.preview-meta-panel{
  margin-top:1rem;
  padding:1rem;
  border-radius:18px;
  background:#0c172b;
  border:1px solid rgba(255,255,255,.07);
}

.preview-meta-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:.85rem;
}

.preview-meta-box{
  padding:.9rem 1rem;
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.06);
}

.preview-meta-label{
  display:block;
  font-size:.74rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:rgba(234,243,255,.55);
  margin-bottom:.35rem;
}

.preview-meta-value{
  color:#eef7ff;
  font-weight:700;
  font-size:.98rem;
  line-height:1.35;
}

.preview-desc{
  margin-top:.95rem;
  color:var(--pw-muted);
  font-size:.98rem;
  line-height:1.7;
  white-space:pre-line;
}

.preview-actions{
  display:flex;
  justify-content:flex-end;
  gap:.75rem;
  flex-wrap:wrap;
}

/* Prevent ugly transparency over page behind */
.modal-content,
.modal-header,
.modal-body,
.modal-footer{
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

/* ===== mobile ===== */
@media (max-width:991.98px){
  #previewCarousel .carousel-item{
    padding:1rem 3.3rem;
  }
}

@media (max-width:767.98px){
  .project-card .thumb{
    height:190px;
  }

  .project-card .p-3{
    min-height:unset;
  }

  .preview-modal .modal-dialog{
    margin:.45rem;
  }

  .preview-modal .modal-header{
    padding:.85rem .9rem;
  }

  .preview-modal .modal-body{
    padding:.8rem;
  }

  .preview-modal .modal-footer{
    padding:.85rem .9rem;
  }

  #previewCarousel{
    min-height:250px;
    border-radius:18px;
  }

  #previewCarousel .carousel-item{
    min-height:250px;
    padding:.75rem 2.5rem;
  }

  #previewCarousel .carousel-item img{
    max-height:50vh;
    border-radius:12px;
  }

  #previewCarousel .carousel-control-prev,
  #previewCarousel .carousel-control-next{
    width:42px;
  }

  #previewCarousel .carousel-control-prev-icon,
  #previewCarousel .carousel-control-next-icon{
    width:34px;
    height:34px;
  }

  .preview-meta-grid{
    grid-template-columns:1fr;
  }

  .preview-desc{
    font-size:.92rem;
    line-height:1.58;
  }

  .preview-actions{
    justify-content:stretch;
    width:100%;
  }

  .preview-actions .btn{
    flex:1 1 auto;
  }
}

@media (max-width:480px){
  .filters{
    padding:.9rem !important;
  }

  .chip{
    font-size:.88rem;
    padding:.42rem .62rem;
  }

  .project-card .thumb{
    height:180px;
  }

  #previewCarousel .carousel-item{
    padding:.65rem 2.2rem;
  }

  .preview-modal .modal-title{
    font-size:.96rem;
  }
}